the previous patch didn't cover test_version_mismatch; this one is far more universal

This commit is contained in:
Christian Schwarz
2025-01-22 01:03:34 +01:00
parent 3526d9aad3
commit c5af3c576e
2 changed files with 10 additions and 9 deletions
+9 -1
View File
@@ -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,
}
+1 -8
View File
@@ -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