Skip to content

Commit

Permalink
PG16: Enable CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomello committed Oct 26, 2023
1 parent d01d950 commit 58abeba
Show file tree
Hide file tree
Showing 16 changed files with 166 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .github/ci_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
PG15_LATEST = "15.4"
PG15_ABI_MIN = "15.0"

PG16_EARLIEST = "16.0"
PG16_LATEST = "16.0"
PG16_ABI_MIN = "16.0"

PG_LATEST = [PG13_LATEST, PG14_LATEST, PG15_LATEST]
93 changes: 92 additions & 1 deletion .github/gh_matrix_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
PG14_LATEST,
PG15_EARLIEST,
PG15_LATEST,
PG16_EARLIEST,
PG16_LATEST,
PG_LATEST,
)

Expand All @@ -43,6 +45,7 @@
"include": [],
}


# helper functions to generate matrix entries
# the release and apache config inherit from the
# debug config to reduce repetition
Expand All @@ -69,6 +72,7 @@ def build_debug_config(overrides):
"bgw_db_scheduler_fixed",
"telemetry",
},
"skipped_tests": {},
"name": "Debug",
"os": "ubuntu-22.04",
"pg_extra_args": "--enable-debug --enable-cassert --with-llvm LLVM_CONFIG=llvm-config-14",
Expand Down Expand Up @@ -148,7 +152,7 @@ def macos_config(overrides):
"compressed_collation",
},
"os": "macos-11",
"pg_extra_args": "--with-libraries=/usr/local/opt/openssl/lib --with-includes=/usr/local/opt/openssl/include",
"pg_extra_args": "--with-libraries=/usr/local/opt/openssl/lib --with-includes=/usr/local/opt/openssl/include --without-icu",
"pginstallcheck": True,
"tsdb_build_args": "-DASSERTIONS=ON -DREQUIRE_ALL_TESTS=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl",
}
Expand All @@ -169,6 +173,18 @@ def macos_config(overrides):
"telemetry",
}

# temporary skipped tests for PG16
# it should be removed once we fix the remaining issues
skipped_tests_pg16 = {
"compression_sorted_merge-16",
"transparent_decompression-16",
"transparent_decompression_ordered_index-16",
"transparent_decompress_chunk-16",
"transparent_decompression_join_index",
"ordered_append_join-16",
"decompress_join",
}

# always test debug build on latest of all supported pg versions
m["include"].append(
build_debug_config(
Expand All @@ -189,17 +205,50 @@ def macos_config(overrides):
build_debug_config({"pg": PG15_LATEST, "ignored_tests": ignored_tests})
)

m["include"].append(
build_debug_config(
{
"pg": PG16_LATEST,
"ignored_tests": ignored_tests,
"skipped_tests": skipped_tests_pg16,
}
)
)

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

m["include"].append(
build_release_config(
macos_config(
{
"pg": PG16_LATEST,
"ignored_tests": ignored_tests,
"skipped_tests": skipped_tests_pg16,
}
)
)
)

# test latest postgres release without telemetry
m["include"].append(
build_without_telemetry({"pg": PG15_LATEST, "ignored_tests": ignored_tests})
)

m["include"].append(
build_without_telemetry(
{
"pg": PG16_LATEST,
"ignored_tests": ignored_tests,
"skipped_tests": skipped_tests_pg16,
}
)
)

# 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 Down Expand Up @@ -235,19 +284,51 @@ def macos_config(overrides):
build_debug_config({"pg": PG15_EARLIEST, "ignored_tests": ignored_tests})
)

# add debug test for first supported PG16 version
m["include"].append(
build_debug_config(
{
"pg": PG16_EARLIEST,
"ignored_tests": ignored_tests,
"skipped_tests": skipped_tests_pg16,
}
)
)

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

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

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

# add apache only test for latest pg versions
for PG_LATEST_VER in PG_LATEST:
Expand All @@ -274,6 +355,16 @@ def macos_config(overrides):
}
)
)
m["include"].append(
build_debug_config(
{
"pg": 16,
"snapshot": "snapshot",
"ignored_tests": ignored_tests,
"skipped_tests": skipped_tests_pg16,
}
)
)
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
12 changes: 11 additions & 1 deletion .github/workflows/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ jobs:
pg13_abi_min: ${{ steps.config.outputs.pg13_abi_min }}
pg14_abi_min: ${{ steps.config.outputs.pg14_abi_min }}
pg15_abi_min: ${{ steps.config.outputs.pg15_abi_min }}
pg16_abi_min: ${{ steps.config.outputs.pg16_abi_min }}
pg13_latest: ${{ steps.config.outputs.pg13_latest }}
pg14_latest: ${{ steps.config.outputs.pg14_latest }}
pg15_latest: ${{ steps.config.outputs.pg15_latest }}
pg16_latest: ${{ steps.config.outputs.pg16_latest }}

steps:
- name: Checkout source code
Expand All @@ -40,7 +42,7 @@ jobs:
fail-fast: false
matrix:
test: [ "13backward", "13forward", "14backward", "14forward",
"15backward", "15forward" ]
"15backward", "15forward", "16backward", "16forward" ]
os: [ windows-2019 ]
include:
- test: 13backward
Expand Down Expand Up @@ -68,6 +70,14 @@ jobs:
pg: 15
builder: ${{ fromJson(needs.config.outputs.pg15_abi_min) }}
tester: ${{ fromJson(needs.config.outputs.pg15_latest) }}
- test: 16backward
pg: 16
builder: ${{ fromJson(needs.config.outputs.pg16_latest) }}
tester: ${{ fromJson(needs.config.outputs.pg16_abi_min) }}
- test: 16forward
pg: 16
builder: ${{ fromJson(needs.config.outputs.pg16_abi_min) }}
tester: ${{ fromJson(needs.config.outputs.pg16_latest) }}

steps:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
fail-fast: false
matrix:
# run only on the 3 latest PG versions as we have rate limit on coverity
pg: [13, 14, 15]
os: [ubuntu-20.04]
pg: [13, 14, 15 ]
os: [ubuntu-22.04]
steps:
- name: Install Dependencies
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/linux-32bit-build-and-test-ignored.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
matrix:
pg: ${{ fromJson(needs.config.outputs.pg_latest) }}
build_type: [ Debug ]
include:
- pg: ${{ fromJson(needs.config.outputs.pg15_latest) }}
steps:
- run: |
echo "No build required"
13 changes: 10 additions & 3 deletions .github/workflows/linux-32bit-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ jobs:
echo '/tmp/core.%h.%e.%t' > /proc/sys/kernel/core_pattern
apt-get install -y gcc make cmake libssl-dev libkrb5-dev libipc-run-perl \
libtest-most-perl sudo gdb git wget gawk lbzip2 flex bison lcov base-files \
locales clang-14 llvm-14 llvm-14-dev llvm-14-tools postgresql-client
locales clang-14 llvm-14 llvm-14-dev llvm-14-tools postgresql-client pkgconf \
icu-devtools
- name: Checkout TimescaleDB
uses: actions/checkout@v3
Expand Down Expand Up @@ -99,7 +100,7 @@ jobs:
# When building on i386 with the clang compiler, Postgres requires -msse2 to be used
./configure --prefix=$HOME/$PG_INSTALL_DIR --with-openssl \
--without-readline --without-zlib --without-libxml --enable-cassert \
--enable-debug --with-llvm LLVM_CONFIG=llvm-config-14 CFLAGS="-msse2"
--enable-debug --with-llvm --without-icu LLVM_CONFIG=llvm-config-14 CFLAGS="-msse2"
make -j $MAKE_JOBS
make -j $MAKE_JOBS -C src/test/isolation
make -j $MAKE_JOBS -C contrib/postgres_fdw
Expand Down Expand Up @@ -131,9 +132,15 @@ jobs:
run: |
set -o pipefail
export LANG=C.UTF-8
PG_MAJOR=$(echo "${{ matrix.pg }}" | sed -e 's![.].*!!')
# PG16: It should be removed when we fix remaining issues
if [ $PG_MAJOR -eq 16 ]; then
SKIPS="${SKIPS} compression_sorted_merge-16 transparent_decompression-16 transparent_decompression_ordered_index-16 \
transparent_decompress_chunk-16 transparent_decompression_join_index ordered_append_join-16 decompress_join"
fi
# PostgreSQL cannot be run as root. So, switch to postgres user.
sudo -u postgres make -k -C build installcheck IGNORES="${IGNORES}" \
SKIPS="${SKIPS}" | tee installcheck.log
SKIPS="${SKIPS}" PSQL="${HOME}/${PG_INSTALL_DIR}/bin/psql" | tee installcheck.log
- name: Show regression diffs
if: always()
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/linux-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
# If needed, install them before opening the core dump.
sudo apt-get update
sudo apt-get install flex bison lcov systemd-coredump gdb libipc-run-perl \
libtest-most-perl ${{ matrix.extra_packages }}
libtest-most-perl pkgconf icu-devtools ${{ matrix.extra_packages }}
- name: Install macOS Dependencies
if: runner.os == 'macOS'
Expand Down Expand Up @@ -162,7 +162,8 @@ jobs:
run: |
set -o pipefail
make -k -C build installcheck IGNORES="${{ join(matrix.ignored_tests, ' ') }}" \
SKIPS="${{ join(matrix.skipped_tests, ' ') }}" ${{ matrix.installcheck_args }} | tee installcheck.log
SKIPS="${{ join(matrix.skipped_tests, ' ') }}" ${{ matrix.installcheck_args }} \
PSQL="${HOME}/${PG_INSTALL_DIR}/bin/psql" | tee installcheck.log
- name: pginstallcheck
if: matrix.pginstallcheck
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/memory-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ name: Memory tests
jobs:
memory_leak:
name: Memory leak on insert PG${{ matrix.pg }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
pg: [13, 14, 15]
pg: [13, 14, 15 ]
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sqlsmith.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
sudo apt-get update
sudo apt-get install gnupg systemd-coredump gdb postgresql-common \
libkrb5-dev build-essential autoconf autoconf-archive \
libboost-regex-dev libsqlite3-dev
libboost-regex-dev libsqlite3-dev icu-devtools
yes | sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt-get purge postgresql*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-build-and-test-ignored.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pg: [ 13, 14, 15 ]
pg: [ 13, 14, 15, 16 ]
os: [ windows-2022 ]
build_type: ${{ fromJson(needs.config.outputs.build_type) }}
steps:
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/windows-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pg: [ 13, 14, 15 ]
pg: [ 13, 14, 15, 16 ]
os: [ windows-2022 ]
build_type: ${{ fromJson(needs.config.outputs.build_type) }}
ignores: ["chunk_adaptive metadata telemetry"]
Expand All @@ -72,6 +72,11 @@ jobs:
# pkg_version: ${{ fromJson(needs.config.outputs.pg15_latest) }}
pkg_version: 15.0.1 # hardcoded due to issues with PG15.1 on chocolatey
tsl_skips_version: dist_partial_agg-15 dist_grant-15
- pg: 16
pkg_version: ${{ fromJson(needs.config.outputs.pg16_latest) }}
tsl_skips_version: compression_sorted_merge-16 transparent_decompression-16 transparent_decompression_ordered_index-16
transparent_decompress_chunk-16 transparent_decompression_join_index ordered_append_join-16

env:
# PostgreSQL configuration
PGPORT: 55432
Expand Down Expand Up @@ -185,10 +190,11 @@ jobs:
# isolationtester is only packaged with pg14+ so we would have to build our own postgres
# to get it for earlier versions so we skip it for < 14.
if [[ "${{ matrix.pg }}" -ge "14" ]]; then
make -C build_wsl isolationchecklocal | tee -a installcheck.log
make -C build_wsl isolationchecklocal PSQL="$HOME/PostgreSQL/${{ matrix.pg }}/bin/psql" | tee -a installcheck.log
fi
make -C build_wsl regresschecklocal IGNORES="${{ matrix.ignores }}" | tee -a installcheck.log
make -C build_wsl regresschecklocal IGNORES="${{ matrix.ignores }}" \
PSQL="$HOME/PostgreSQL/${{ matrix.pg }}/bin/psql" | tee -a installcheck.log
- name: Setup postgres cluster for TSL tests
run: |
Expand All @@ -211,12 +217,13 @@ jobs:
# isolationtester is only packaged with pg14+ so we would have to build our own postgres
# to get it for earlier versions so we skip it for < 14.
if [[ "${{ matrix.pg }}" -ge "14" ]]; then
make -C build_wsl isolationchecklocal-t | tee -a installcheck.log
make -C build_wsl isolationchecklocal-t PSQL="$HOME/PostgreSQL/${{ matrix.pg }}/bin/psql" | tee -a installcheck.log
fi
make -C build_wsl -k regresschecklocal-t \
IGNORES="${{ matrix.tsl_ignores }} ${{ matrix.tsl_ignores_version }}" \
SKIPS="${{ matrix.tsl_skips }} ${{ matrix.tsl_skips_version }}" | tee -a installcheck.log
SKIPS="${{ matrix.tsl_skips }} ${{ matrix.tsl_skips_version }}" \
PSQL="$HOME/PostgreSQL/${{ matrix.pg }}/bin/psql" | tee -a installcheck.log
- name: Show regression diffs
id: collectlogs
Expand Down
1 change: 1 addition & 0 deletions scripts/backport.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def git_returncode(command):
]
branch_commit_titles = {x[1] for x in branch_commits}


# We will do backports per-PR, because one PR, though not often, might contain
# many commits. So as the first step, go through the commits unique to main, find
# out which of them have to be backported, and remember the corresponding PRs.
Expand Down
1 change: 1 addition & 0 deletions scripts/test_memory_spikes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
CHECK_INTERVAL = 15
DEBUG = False


# finds processes with name as argument
def find_procs_by_name(name):
# Return a list of processes matching 'name'
Expand Down
Loading

0 comments on commit 58abeba

Please sign in to comment.