Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG17: Enable CI #7303

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/ci_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@
#

PG14_EARLIEST = "14.0"
PG14_LATEST = "14.12"
PG14_LATEST = "14.13"
PG14_ABI_MIN = "14.0"

PG15_EARLIEST = "15.0"
PG15_LATEST = "15.7"
PG15_LATEST = "15.8"
PG15_ABI_MIN = "15.0"

PG16_EARLIEST = "16.0"
PG16_LATEST = "16.3"
PG16_LATEST = "16.4"
PG16_ABI_MIN = "16.0"

PG_LATEST = [PG14_LATEST, PG15_LATEST, PG16_LATEST]
PG17_EARLIEST = "17.0"
PG17_LATEST = "17.0"
PG17_ABI_MIN = "17.0"

PG_LATEST = [PG14_LATEST, PG15_LATEST, PG16_LATEST, PG17_LATEST]
43 changes: 31 additions & 12 deletions .github/gh_matrix_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
PG15_LATEST,
PG16_EARLIEST,
PG16_LATEST,
PG17_LATEST,
PG_LATEST,
)

Expand Down Expand Up @@ -165,31 +166,24 @@ def macos_config(overrides):

m["include"].append(build_debug_config({"pg": PG16_LATEST}))

m["include"].append(build_debug_config({"pg": PG17_LATEST}))

# test timescaledb with release config on latest postgres release in MacOS
m["include"].append(build_release_config(macos_config({"pg": PG16_LATEST})))
m["include"].append(build_release_config(macos_config({"pg": PG17_LATEST})))

# Test latest postgres release without telemetry. Also run clang-tidy on it
# because it's the fastest one.
m["include"].append(
build_without_telemetry(
{
"pg": PG16_LATEST,
"pg": PG17_LATEST,
"cc": "clang-14",
"cxx": "clang++-14",
"tsdb_build_args": "-DLINTER=ON -DWARNINGS_AS_ERRORS=ON",
}
)
)

m["include"].append(
build_debug_config(
{
"pg": "17",
"snapshot": "snapshot",
}
)
)

# if this is not a pull request e.g. a scheduled run or a push
# to a specific branch like prerelease_test we add additional
# entries to the matrix
Expand All @@ -210,15 +204,21 @@ def macos_config(overrides):
# add debug test for first supported PG16 version
m["include"].append(build_debug_config({"pg": PG16_EARLIEST}))

# add debug test for first supported PG16 version
m["include"].append(build_debug_config({"pg": PG17_EARLIEST}))

# add debug tests for timescaledb on latest postgres release in MacOS
m["include"].append(build_debug_config(macos_config({"pg": PG15_LATEST})))

m["include"].append(build_debug_config(macos_config({"pg": PG16_LATEST})))

m["include"].append(build_debug_config(macos_config({"pg": PG17_LATEST})))

# add release test for latest pg releases
m["include"].append(build_release_config({"pg": PG14_LATEST}))
m["include"].append(build_release_config({"pg": PG15_LATEST}))
m["include"].append(build_release_config({"pg": PG16_LATEST}))
m["include"].append(build_release_config({"pg": PG17_LATEST}))

# add apache only test for latest pg versions
for PG_LATEST_VER in PG_LATEST:
Expand Down Expand Up @@ -250,6 +250,14 @@ def macos_config(overrides):
}
)
)
m["include"].append(
build_debug_config(
{
"pg": 17,
"snapshot": "snapshot",
}
)
)
elif len(sys.argv) > 2:
# Check if we need to check for the flaky tests. Determine which test files
# have been changed in the PR. The sql files might include other files that
Expand Down Expand Up @@ -305,7 +313,18 @@ def macos_config(overrides):
"coverage": False,
"installcheck_args": f'TESTS="{" ".join(list(tests) * 20)}"',
"name": "Flaky Check Debug",
"pg": PG14_LATEST,
"pg": PG16_LATEST,
"pginstallcheck": False,
}
)
)
m["include"].append(
build_debug_config(
{
"coverage": False,
"installcheck_args": f'TESTS="{" ".join(list(tests) * 20)}"',
"name": "Flaky Check Debug",
"pg": PG17_LATEST,
"pginstallcheck": False,
}
)
Expand Down
24 changes: 3 additions & 21 deletions .github/workflows/code_style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,30 +98,12 @@ jobs:
- name: Install prerequisites
run: |
pip install --upgrade pip
# Inexplicably, at some point pip started to insist on installing
# prospector==1.7.7, which is incompatible with the new pylint.
# Also pin the version of the other tools so that they don't fail
# sporadically when a new version becomes available.
pip install black prospector==1.8.4 pylint==2.16.0 dodgy==0.2.1 \
mccabe==0.7.0 pycodestyle==2.9.1 pyflakes==2.5.0 \
psutil pygithub pglast
pip install black prospector pylint dodgy \
mccabe pycodestyle pyflakes \
psutil pygithub pglast testgres
pip list
pip list --user

# Using e375302a until 1.10.1 get released including the following PR
# https://github.com/postgrespro/testgres/pull/125
- name: Checkout testgres
uses: actions/checkout@v4
with:
repository: 'postgrespro/testgres'
path: 'testgres'
ref: e375302a114cd4df3ceed54d6526f250c44c08e7

- name: Build and install testgres
run: |
cd testgres
python setup.py install --user

- name: Checkout source
uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
# run only on the 3 latest PG versions as we have rate limit on coverity
pg: [14, 15, 16]
pg: [15, 16, 17]
os: [ubuntu-20.04]
steps:
- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-32bit-build-and-test-ignored.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
pg: ${{ fromJson(needs.config.outputs.pg_latest) }}
build_type: [ Debug ]
include:
- pg: ${{ fromJson(needs.config.outputs.pg16_latest) }}
- pg: ${{ fromJson(needs.config.outputs.pg17_latest) }}
build_type: Debug
steps:
- run: |
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/linux-32bit-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
pg_latest: ${{ steps.setter.outputs.PG_LATEST }}
pg16_latest: ${{ steps.setter.outputs.PG16_LATEST }}
pg17_latest: ${{ steps.setter.outputs.PG17_LATEST }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
pg: ${{ fromJson(needs.config.outputs.pg_latest) }}
build_type: [ Debug ]
include:
- pg: ${{ fromJson(needs.config.outputs.pg16_latest) }}
- pg: ${{ fromJson(needs.config.outputs.pg17_latest) }}
build_type: Debug
fail-fast: false

Expand Down Expand Up @@ -153,6 +153,15 @@ jobs:
run: |
set -o pipefail
export LANG=C.UTF-8
#
# Even disabling parallel plans the Sort Method on 32bits
# is always 'still in progress' for PG17. So for now added
# those tests to SKIPS.
#
PG_MAJOR=$(echo "${{ matrix.pg }}" | sed -e 's![.].*!!')
if [ ${PG_MAJOR} -eq 17 ]; then
SKIPS="${SKIPS} constraint_exclusion_prepared ordered_append*"
fi
# PostgreSQL cannot be run as root. So, switch to postgres user.
runuser -u postgres -- \
make -k -C build installcheck IGNORES="${IGNORES}" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/memory-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
pg: [14, 15, 16]
pg: [14, 15, 16, 17]
fail-fast: false

steps:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sanitizer-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
runs-on: ubuntu-latest
outputs:
pg_latest: ${{ steps.setter.outputs.PG_LATEST }}
pg16_latest: ${{ steps.setter.outputs.PG16_LATEST }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sqlsmith.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-22.04"]
pg: [ "15", "16" ]
pg: [ "15", "16", "17" ]
build_type: ["Debug"]
fail-fast: false
env:
Expand Down
6 changes: 3 additions & 3 deletions scripts/backport.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ def git_returncode(command):
# address. It is required so that the commits are recognized by Github as made
# by the user. That is, if you use a wrong e-mail, there won't be a clickable
# profile picture next to the commit in the Github interface.
os.environ[
"GIT_COMMITTER_EMAIL"
] = f"{token_user.id}+{token_user.login}@users.noreply.github.com"
os.environ["GIT_COMMITTER_EMAIL"] = (
f"{token_user.id}+{token_user.login}@users.noreply.github.com"
)
print(
f"Will commit as {os.environ['GIT_COMMITTER_NAME']} <{os.environ['GIT_COMMITTER_EMAIL']}>"
)
Expand Down
9 changes: 2 additions & 7 deletions test/expected/append-14.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') as "TEST_LOAD_NAME",
SELECT format('\! diff -u --label "Unoptimized results" --label "Optimized results" %s %s', :'TEST_RESULTS_UNOPTIMIZED', :'TEST_RESULTS_OPTIMIZED') as "DIFF_CMD"
\gset
SET timescaledb.enable_now_constify TO false;
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
enable_memoize
----------------
off
(1 row)

-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
\ir :TEST_LOAD_NAME
-- This file and its contents are licensed under the Apache License 2.0.
Expand Down
9 changes: 2 additions & 7 deletions test/expected/append-15.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') as "TEST_LOAD_NAME",
SELECT format('\! diff -u --label "Unoptimized results" --label "Optimized results" %s %s', :'TEST_RESULTS_UNOPTIMIZED', :'TEST_RESULTS_OPTIMIZED') as "DIFF_CMD"
\gset
SET timescaledb.enable_now_constify TO false;
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
enable_memoize
----------------
off
(1 row)

-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
\ir :TEST_LOAD_NAME
-- This file and its contents are licensed under the Apache License 2.0.
Expand Down
9 changes: 2 additions & 7 deletions test/expected/append-16.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') as "TEST_LOAD_NAME",
SELECT format('\! diff -u --label "Unoptimized results" --label "Optimized results" %s %s', :'TEST_RESULTS_UNOPTIMIZED', :'TEST_RESULTS_OPTIMIZED') as "DIFF_CMD"
\gset
SET timescaledb.enable_now_constify TO false;
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
enable_memoize
----------------
off
(1 row)

-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
\ir :TEST_LOAD_NAME
-- This file and its contents are licensed under the Apache License 2.0.
Expand Down
9 changes: 2 additions & 7 deletions test/expected/append-17.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ SELECT format('include/%s_load.sql', :'TEST_BASE_NAME') as "TEST_LOAD_NAME",
SELECT format('\! diff -u --label "Unoptimized results" --label "Optimized results" %s %s', :'TEST_RESULTS_UNOPTIMIZED', :'TEST_RESULTS_OPTIMIZED') as "DIFF_CMD"
\gset
SET timescaledb.enable_now_constify TO false;
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
enable_memoize
----------------
off
(1 row)

-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';
\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'
\ir :TEST_LOAD_NAME
-- This file and its contents are licensed under the Apache License 2.0.
Expand Down
4 changes: 2 additions & 2 deletions test/sql/append.sql.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ SELECT format('\! diff -u --label "Unoptimized results" --label "Optimized resul

SET timescaledb.enable_now_constify TO false;

-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';

\set PREFIX 'EXPLAIN (analyze, costs off, timing off, summary off)'

Expand Down
9 changes: 2 additions & 7 deletions tsl/test/expected/transparent_decompression-14.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMP
SET work_mem TO '50MB';
SET enable_incremental_sort TO off;
SET timezone TO PST8PDT;
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
enable_memoize
----------------
off
(1 row)

-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';
CREATE TABLE metrics (
filler_1 int,
filler_2 int,
Expand Down
9 changes: 2 additions & 7 deletions tsl/test/expected/transparent_decompression-15.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMP
SET work_mem TO '50MB';
SET enable_incremental_sort TO off;
SET timezone TO PST8PDT;
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
enable_memoize
----------------
off
(1 row)

-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';
CREATE TABLE metrics (
filler_1 int,
filler_2 int,
Expand Down
9 changes: 2 additions & 7 deletions tsl/test/expected/transparent_decompression-16.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMP
SET work_mem TO '50MB';
SET enable_incremental_sort TO off;
SET timezone TO PST8PDT;
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
enable_memoize
----------------
off
(1 row)

-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';
CREATE TABLE metrics (
filler_1 int,
filler_2 int,
Expand Down
9 changes: 2 additions & 7 deletions tsl/test/expected/transparent_decompression-17.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ SELECT format('\! diff %s %s', :'TEST_RESULTS_UNCOMPRESSED', :'TEST_RESULTS_COMP
SET work_mem TO '50MB';
SET enable_incremental_sort TO off;
SET timezone TO PST8PDT;
-- disable memoize node to make EXPLAIN output comparable between PG14 and previous versions
SELECT CASE WHEN current_setting('server_version_num')::int/10000 >= 14 THEN set_config('enable_memoize','off',false) ELSE 'off' END AS enable_memoize;
enable_memoize
----------------
off
(1 row)

-- disable memoize node to avoid flaky results
SET enable_memoize TO 'off';
CREATE TABLE metrics (
filler_1 int,
filler_2 int,
Expand Down
Loading
Loading