550 Commits

Author SHA1 Message Date
Sven Klemm
3afdf7cc72 Add pg13 to CI build matrix
Since the actual tests have not been adjusted for PG13 yet this
only checks compiling against PG13. A subsequent PR will enable
tests for PG13.
2021-01-15 13:07:52 +01:00
Mats Kindahl
a2275c7479 Fix Coverity build to not use -Werror
The coverity build should not build with warnings-as-errors, so
disabling it for the build.
2020-12-18 16:28:00 +01:00
Sven Klemm
cab2347942 Fix postgres versions in build matrix
Versions in the build matrix with significant leading/trailing zeroes
need the version string quoted otherwise it will get treated as number
and those zeroes will be removed. As currently those tests fixed by
this patch run PG 11.1 instead of 11.10.
2020-12-01 22:55:57 +01:00
Mats Kindahl
1e7f961055 Show more information in get_git_commit
The command `get_git_commit` shows quite a little information and
especially if mistakes are made it is hard to verify what the binary is
actually based on.

This commit extends the function to provide some more information:
specifically the SHA of the HEAD regardless of whether there is a tag
on it or not and the time for the HEAD commit.

```
postgres=# select * from _timescaledb_internal.get_git_commit();
        commit_tag        | commit_hash |      commit_time
--------------------------+-------------+------------------------
 1.7.4-10-g09b0b778-dirty | 09b0b778    | 2020-09-13 17:50:38+02
(1 row)
```

If git is not installed, the function `get_git_commit` will return an
error indicating that no git information is available. If some of the
fields are available, they will be emitted and the remaining fields
will be NULL.

Fixes #2457
2020-11-26 21:43:13 +01:00
Ruslan Fomkin
47da8790bc Test latest PG 11.10 and 12.5 2020-11-18 15:26:57 +01:00
Sven Klemm
94af62f813 Adjust package test to 2.0 package name change 2020-10-16 21:54:27 +02:00
Sven Klemm
d8048f2a33 Use environment files for github actions
GitHub deprecates use of set-env in workflows so switch to using
environment files.

https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
2020-10-13 12:18:05 +02:00
Sven Klemm
03deb65b0f Fix update test diff display
The latest update test refactoring renamed some of the output files
to better state their origin but not all places in the github
workflow were adjusted to handle the new names.
2020-10-12 16:15:29 +02:00
gayyappan
b341506cb2 Enable continuous_aggs_policy test
Disable NOTICE messages for time based tables in
continuous_aggs_policy test. The refresh sometimes
does not have anything to update as the intervals
are computed based off now(). This causes intermittent
failures due to NOTICEs that the cagg is up to date.

Remove continuous_aggs_policy from ignores list in CI
scripts.
2020-10-01 16:47:10 -04:00
Ruslan Fomkin
cdb4c8fa4f Ignore flaky test for now
continuous_aggs_policy is flaky and prevents to proceed with current
PRs. This commit ignores it until it is fixed.
2020-10-01 12:40:19 +02:00
Sven Klemm
6cc9871be8 Make update test consistent
This patch changes the update test to use the same checks
between clean / updated install and dumped/restored install.
Previously only a small subset of the checks would be run against
the updated instance and most of the tests would only run against
the dumped and restored container.
2020-09-28 17:19:04 +02:00
Sven Klemm
e79158e717 Run postgres regression test suite as part of our CI
During migration of CI from travis to github actions running
postgres regression test suite was missed. This patch changes
our regression workflow to run postgres regression test suite
as well.
2020-09-16 04:07:07 +02:00
Sven Klemm
0d8fc61886 Make regression test names consistent 2020-09-14 09:54:05 +02:00
Sven Klemm
a01e729375 Remove duplicate lines from apt package test 2020-09-14 09:54:05 +02:00
Erik Nordström
202692f1ef Make tests use the new continuous aggregate API
Tests are updated to no longer use continuous aggregate options that
will be removed, such as `refresh_lag`, `max_interval_per_job` and
`ignore_invalidation_older_than`. `REFRESH MATERIALIZED VIEW` has also
been replaced with `CALL refresh_continuous_aggregate()` using ranges
that try to replicate the previous refresh behavior.

The materializer test (`continuous_aggregate_materialize`) has been
removed, since this tested the "old" materializer code, which is no
longer used without `REFRESH MATERIALIZED VIEW`. The new API using
`refresh_continuous_aggregate` already allows manual materialization
and there are two previously added tests (`continuous_aggs_refresh`
and `continuous_aggs_invalidate`) that cover the new refresh path in
similar ways.

When updated to use the new refresh API, some of the concurrency
tests, like `continuous_aggs_insert` and `continuous_aggs_multi`, have
slightly different concurrency behavior. This is explained by
different and sometimes more conservative locking. For instance, the
first transaction of a refresh serializes around an exclusive lock on
the invalidation threshold table, even if no new threshold is
written. The previous code, only took the heavier lock once, and if, a
new threshold was written. This new, and stricter locking, means that
insert processes that read the invalidation threshold will block for a
short time when there are concurrent refreshes. However, since this
blocking only occurs during the first transaction of the refresh
(which is quite short), it probably doesn't matter too much in
practice. The relaxing of locks to improve concurrency and performance
can be implemented in the future.
2020-09-11 16:07:21 +02:00
Sven Klemm
86f8b9d481 Run 32bit regression tests on PR
Enable 32-bit regression tests on pull requests to catch improper
use of datatype conversion functions earlier.
2020-09-10 19:26:40 +02:00
Sven Klemm
08f6e6f2ad Remove Ubuntu 19.10 from APT package test
This patch removes Ubuntu 19.10 from APT package test because
19.10 is no longer supported by Ubuntu and we don't build packages
for it anymore.
2020-09-01 05:28:37 +02:00
Sven Klemm
1c92a29ba3 Fix macos ci builds
Since GitHub updated the macos image used for CI it updated llvm
to a version that is buggy on macos. So this patch disables building
postgres with llvm support on macos. It also fixes the cache suffix
code for macos because it changed with the latest runner version,
and uses the image version now as cache suffix.

https://bugs.llvm.org/show_bug.cgi?id=47226
2020-08-24 17:02:16 +02:00
Sven Klemm
91f64b8177 Run regression tests on PG 11.9 and 12.4
This patch changes all regression tests that were running on 11.8
and 12.3 to 11.9 and 12.4.
2020-08-15 00:38:21 +02:00
Sven Klemm
cb801fb215 Run update test on PG 11.8 and 12.3
This patch changes the update test to run on PG 11.8 and 12.3 instead
of 11.0 and 12.0. This patch also adds additional diagnostic output
when errors occur during the update test.
2020-08-12 02:29:24 +02:00
Sven Klemm
530cb8296e Add check for unreferenced test files
This patch adds a check for test files not referenced in the
CMakeLists.txt file to CI.
2020-08-11 19:16:27 +02:00
Sven Klemm
656d3a4ef4 Update package lists before installing packages in CI 2020-08-07 09:20:14 +02:00
Sven Klemm
aec8758b06 Improve update test github output
This patch adds the diff output of the update test in a separate step
in the workflow and also uploads the update test diff as artifact.
2020-07-28 18:15:14 +02:00
Sven Klemm
8801781fd6 Move coverity scan to github actions
Migrate the travis coverity config to github actions. This new workflow
will depend on the cached postgres build of the main regression workflow
so we don't have to duplicate the build matrix in this workflow. Since
the main regression workflow runs at least once a day there should
always be a cache hit. In case of a cache miss this workflow will abort.

Since there is a quota on coverity runs this workflow is configured to
run once a week every saturday. Additional runs can be triggered by
pushing to the coverity_scan branch.
2020-07-16 13:20:06 +02:00
Sven Klemm
c4aa8cf7cf Move cron tests to GitHub actions
This patch moves the sanitizer, abi breakage and memory leak
tests from travis to github actions.
2020-07-08 19:58:38 +02:00
Sven Klemm
dc5ed1a92d Remove debian 8 from package test
This patch removes Debian 8 from the package test since its no
longer supported. This patch also fixes the repository URL for
centos 8.
2020-07-08 19:16:37 +02:00
Sven Klemm
d1fda03473 Fix github action cache handling on macOS
On macOS the path used is depending on the runner version leading to cache
failure when the runner version changes or is different from the one used to
build the cache. This patch extracts the runner version and adds it as
suffix to the cache key on macOS.
2020-07-06 14:21:00 +02:00
Sven Klemm
666369ea2e Migrate update test to GitHub actions
This patch migrates the update tests from Travis to GitHub actions.
2020-07-06 14:21:00 +02:00
Sven Klemm
e6020e88d8 Fix syntax error in apt package test
The notification configuration for the apt package test was missing
a dollar sign in front of the variables leading to failing variable
interpolation.
2020-07-06 11:09:23 +02:00
Sven Klemm
d649d493f6 Add testing for RPM packages
This workflow will install our rpm packages and then try to enable
timescaledb in the database and also check the version installed
from the package against the expected version.
2020-07-03 16:10:18 +02:00
Sven Klemm
d85309d268 Add testing for released apt packages
This workflow will install our apt package and then try to enable
timescaledb in the database and also check the version installed
from the package against the expected version.
2020-06-30 22:57:03 +02:00
Sven Klemm
586f057ad0 Retain parallel schedule when using IGNORES
When either TESTS, SKIPS or IGNORES is set for a regression check
run we would generate a new temporary schedule based on those
variables without any parallelity. This patch changes the behaviour
to keep the original test schedule when only IGNORES is specified
and just prepend the ignore lines to a copy of the original schedule.
2020-06-30 17:47:40 +02:00
Sven Klemm
8a1976a6b9 Upload coredumps as artifact
This patch adds collecting coredumps to the regression workflow
in addition to the binary all shared libraries used by the coredump
are collected as well.
2020-06-29 21:48:12 +02:00
Sven Klemm
c96216e631 Improve github action stacktrace handling
Check for coredumps and only execute the stracktrace if there are
actually coredumps. This patch also changes the log handling to
always collect logs and upload them cause they might have useful
information even when all steps succeed. Additionally a list
of all failed tests is shown before the regression diff.
This patch also disables fail-fast so a single failed job does
not cancel other jobs still in progress.
2020-06-29 17:50:53 +02:00
Sven Klemm
0e532a165f Include local variables in github action stacktrace
This patch adds local variables to github action stacktraces to
add more context and make investigating issues easier.
2020-06-23 13:47:20 +02:00
Sven Klemm
71ed454779 Give regression artifacts unique names
Since within a workflow artifacts share a namespace we need to make
sure artifacts have a unique name within the workflow so other
runs in the same workflow don't overwrite artifacts.
2020-06-22 18:14:29 +02:00
Sven Klemm
5b7f2fec18 Disable CI fail-fast for code style and i386 test
When fail-fast is true a single failing job will cancel
the entire workflow which is not desirable for scheduled runs
and the code style tests. This patch changes fail-fast
to false for the code style tests and the scheduled i386 tests.
It also changes the different code style check steps to always
run.
2020-06-19 19:40:02 +02:00
Sven Klemm
b810dd3780 Add MacOS regression tests 2020-06-19 00:05:37 +02:00
Ruslan Fomkin
175edfa669 Force installing PostgreSQL in GH Actions on Windows
PostgreSQL 12 is preinstalled, while 11 is not. To unify different
paths of PG 11 and 12 binaries, this commit implements workaround by
forcing installation of PostgreSQL 12, so it is in the same path as
PostgreSQL 11.
2020-06-17 11:21:07 +02:00
Sven Klemm
0bff7dcac3 Run linux regression tests as GitHub action
Since we want to run additional test configurations when triggered
by a push to prerelease_test or by cron but github actions don't
allow a dynamic matrix via yaml configuration we generate the matrix
with a python script. While we could always have the full matrix
and have if checks on every step that would make the actual checks
harder to browse because the workflow will have lots of entries and
only by navigating into the individual jobs would t sit be visible
if a job was actually run.
Additionally we set fail-fast to true for pull requests and false
for other event types.
2020-06-15 00:56:33 +02:00
Sven Klemm
ca9b37d9de Improve i386 slack failure message
Change i386 slack notification to set border color to red and
to include last commit message.
2020-06-15 00:56:33 +02:00
Sven Klemm
c0f66a4e1f Move code style checks to github action
Move code formatting, license and git commit hook checks to
GitHub action.
2020-06-10 19:29:46 +02:00
Sven Klemm
6e3fa54a7c Add slack notification to i386 tests
This patch adds a slack notification on failed i386 tests.
Unfortunately most slack actions don't work with the 32bit
image so our options for better styling/costumisation are
somewhat limited.
2020-06-10 15:09:31 +02:00
Sven Klemm
c90397fd6a Remove support for PG9.6 and PG10
This patch removes code support for PG9.6 and PG10. In addition to
removing PG96 and PG10 macros the following changes are done:

remove HAVE_INT64_TIMESTAMP since this is always true on PG10+
remove PG_VERSION_SUPPORTS_MULTINODE
2020-06-02 23:48:35 +02:00
Sven Klemm
589aa898f7 Run 32 bit linux test as github action 2020-05-29 15:23:17 +02:00
Ruslan Fomkin
6bc4765f4d Remove regression tests on PG 9.6 and 10
The first step of removing support for PG 9.6 and 10 is to remove the
regression tests, which run against PostgreSQL versions 9.6 and 10.
2020-05-28 15:14:09 +02:00
Erik Nordström
a95308e917 Run Windows builds and tests using GitHub Actions
Windows builds, for Debug and Release configurations, are now tested
using GitHub Actions. The build test covers all currently supported
PostgreSQL versions (9.6, 10, 11, 12) using a build matrix.

Currently, the TimescaleDB regression test suite is not run since it
requires a Windows-specific test client that we do not
support. Instead, the binaries are tested by doing a `CREATE
EXTENSION` to verify that they load and run without, e.g., missing
symbols or similar.

The test configuration is optimized for speed by using a cache for the
PostgreSQL installation. This avoids repeated downloads and
installations of PostgreSQL from EnterpriseDB's servers. But it also
means that we won't have a full installation on cache hits, which
means no running PostgreSQL service. This requires manual PostgreSQL
starts, which is what we want anyway since we need to preload our
extension.

It's anticipated that this build configuration can be extended to
produce release binaries in the future.
2020-05-12 14:50:46 +02:00
Michael J. Freedman
5b5240c00c Point to Timescale Code of Conduct
Create file that points to Timescale Code of Conduct on webpage
2020-04-15 11:03:13 +02:00
Erik Nordström
ab5d06245f Add CODEOWNERS file to auto-assign reviewers
A `CODEOWNERS` file allows assigning default reviewers for a branch,
obviating the need to add reviewers manually.
2020-01-23 13:16:20 +01:00
RobAtticus
c0d9afb7fa Add bug report issue template 2018-10-30 11:20:34 -04:00