From c5af3c576e7ab6d897b3de9a7f93922cc58bc8f8 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 22 Jan 2025 01:03:34 +0100 Subject: [PATCH] the previous patch didn't cover test_version_mismatch; this one is far more universal --- test_runner/fixtures/neon_fixtures.py | 10 +++++++++- test_runner/regress/test_compatibility.py | 9 +-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/test_runner/fixtures/neon_fixtures.py b/test_runner/fixtures/neon_fixtures.py index 3c7b344d99..af427b92d2 100644 --- a/test_runner/fixtures/neon_fixtures.py +++ b/test_runner/fixtures/neon_fixtures.py @@ -460,6 +460,7 @@ class NeonEnvBuilder: self.test_name = test_name self.compatibility_neon_binpath = compatibility_neon_binpath self.compatibility_pg_distrib_dir = compatibility_pg_distrib_dir + self.test_may_use_compatibility_snapshot_binaries = False self.version_combination = combination self.mixdir = self.test_output_dir / "mixdir_neon" if self.version_combination is not None: @@ -471,6 +472,7 @@ class NeonEnvBuilder: ), "the environment variable COMPATIBILITY_POSTGRES_DISTRIB_DIR is required when using mixed versions" self.mixdir.mkdir(mode=0o755, exist_ok=True) self._mix_versions() + self.test_may_use_compatibility_snapshot_binaries = True def init_configs(self, default_remote_storage_if_missing: bool = True) -> NeonEnv: # Cannot create more than one environment from one builder @@ -1133,7 +1135,13 @@ class NeonEnv: # Concurrent IO (https://github.com/neondatabase/neon/issues/9378): # enable concurrent IO by default in tests and benchmarks. # Compat tests are exempt because old versions fail to parse the new config. - if self.pageserver_get_vectored_concurrent_io is not None: + get_vectored_concurrent_io = self.pageserver_get_vectored_concurrent_io + if config.test_may_use_compatibility_snapshot_binaries: + log.info( + "Forcing use of binary-built-in default to avoid forward-compatibility related test failures" + ) + get_vectored_concurrent_io = None + if get_vectored_concurrent_io is not None: ps_cfg["get_vectored_concurrent_io"] = { "mode": self.pageserver_get_vectored_concurrent_io, } diff --git a/test_runner/regress/test_compatibility.py b/test_runner/regress/test_compatibility.py index b4c6229faa..ac44630d30 100644 --- a/test_runner/regress/test_compatibility.py +++ b/test_runner/regress/test_compatibility.py @@ -251,14 +251,7 @@ def test_forward_compatibility( os.environ.get("ALLOW_FORWARD_COMPATIBILITY_BREAKAGE", "false").lower() == "true" ) - # Concurrent I/O (https://github.com/neondatabase/neon/issues/9378): - # As of 2025-10-22, the compatibility snapshot (=last release) does not - # yet support the pageserver.toml config option that is set in the toml - # if pageserver_get_vectored_concurrent_io is not None. So, don't set it - # to make this test pass. We will not start using the new config option - # until we are certain that we will never roll back to a release that - # doesn't understand the config option. - neon_env_builder.pageserver_get_vectored_concurrent_io = None + neon_env_builder.test_may_use_compatibility_snapshot_binaries = True try: neon_env_builder.num_safekeepers = 3