diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index bd57d5bd5a..18b8aaff07 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -444,7 +444,7 @@ jobs: create-test-report: needs: [ check-permissions, regress-tests, coverage-report, benchmarks ] - if: ${{ !cancelled() }} + if: ${{ !cancelled() && contains(fromJSON('["skipped", "success"]'), needs.check-permissions.result) }} runs-on: [ self-hosted, gen3, small ] container: diff --git a/scripts/comment-test-report.js b/scripts/comment-test-report.js index ce92534dea..07fb35cfc5 100755 --- a/scripts/comment-test-report.js +++ b/scripts/comment-test-report.js @@ -268,7 +268,7 @@ module.exports = async ({ github, context, fetch, report, coverage }) => { commentBody += "```\n" } } else { - commentBody += `#### Test coverage report is not avaibale\n` + commentBody += `\n#### Test coverage report is not available\n` } commentBody += autoupdateNotice diff --git a/test_runner/pg_clients/test_pg_clients.py b/test_runner/pg_clients/test_pg_clients.py index 7c20bac399..8381eac946 100644 --- a/test_runner/pg_clients/test_pg_clients.py +++ b/test_runner/pg_clients/test_pg_clients.py @@ -48,6 +48,6 @@ def test_pg_clients(test_output_dir: Path, remote_pg: RemotePostgres, client: st subprocess_capture(test_output_dir, build_cmd, check=True) run_cmd = [docker_bin, "run", "--rm", "--env-file", env_file, image_tag] - basepath = subprocess_capture(test_output_dir, run_cmd, check=True) + basepath, _, _ = subprocess_capture(test_output_dir, run_cmd, check=True) assert Path(f"{basepath}.stdout").read_text().strip() == "1" diff --git a/test_runner/regress/test_compatibility.py b/test_runner/regress/test_compatibility.py index ad08a4b5ce..b00cf983ed 100644 --- a/test_runner/regress/test_compatibility.py +++ b/test_runner/regress/test_compatibility.py @@ -40,6 +40,54 @@ from pytest import FixtureRequest # - prepare_snapshot copies the snapshot, cleans it up and makes it ready for the current version of Neon (replaces paths and ports in config files). # - check_neon_works performs the test itself, feel free to add more checks there. # +# +# How to run `test_backward_compatibility` locally: +# +# export DEFAULT_PG_VERSION=15 +# export BUILD_TYPE=release +# export CHECK_ONDISK_DATA_COMPATIBILITY=true +# +# # Build previous version of binaries and create a data snapshot: +# rm -rf pg_install target +# git checkout +# CARGO_BUILD_FLAGS="--features=testing" make -s -j`nproc` +# ./scripts/pytest -k test_create_snapshot +# +# # Build current version of binaries +# rm -rf pg_install target +# git checkout +# CARGO_BUILD_FLAGS="--features=testing" make -s -j`nproc` +# +# # Run backward compatibility test +# COMPATIBILITY_SNAPSHOT_DIR=test_output/compatibility_snapshot_pgv${DEFAULT_PG_VERSION} \ +# ./scripts/pytest -k test_backward_compatibility +# +# +# How to run `test_forward_compatibility` locally: +# +# export DEFAULT_PG_VERSION=15 +# export BUILD_TYPE=release +# export CHECK_ONDISK_DATA_COMPATIBILITY=true +# +# # Build previous version of binaries and store them somewhere: +# rm -rf pg_install target +# git checkout +# CARGO_BUILD_FLAGS="--features=testing" make -s -j`nproc` +# mkdir -p neon_previous/target +# cp -a target/${BUILD_TYPE} ./neon_previous/target/${BUILD_TYPE} +# cp -a pg_install ./neon_previous/pg_install +# +# # Build current version of binaries and create a data snapshot: +# rm -rf pg_install target +# git checkout +# CARGO_BUILD_FLAGS="--features=testing" make -s -j`nproc` +# ./scripts/pytest -k test_create_snapshot +# +# # Run forward compatibility test +# COMPATIBILITY_NEON_BIN=neon_previous/target/${BUILD_TYPE} \ +# COMPATIBILITY_POSTGRES_DISTRIB_DIR=neon_previous/pg_install \ +# ./scripts/pytest -k test_forward_compatibility +# check_ondisk_data_compatibility_if_enabled = pytest.mark.skipif( os.environ.get("CHECK_ONDISK_DATA_COMPATIBILITY") is None,