From 6f28da173723c7a9ac800d11205bab8f8e19c9ec Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Fri, 8 Sep 2023 20:27:00 +0300 Subject: [PATCH] fix: LocalFs root in test_compatibility is PosixPath('...') (#5261) I forgot a `str(...)` conversion in #5243. This lead to log lines such as: ``` Using fs root 'PosixPath('/tmp/test_output/test_backward_compatibility[debug-pg14]/compatibility_snapshot/repo/local_fs_remote_storage/pageserver')' as a remote storage ``` This surprisingly works, creating hierarchy of under current working directory (`repo_dir` for tests): - `PosixPath('` - `tmp` .. up until .. `local_fs_remote_storage` - `pageserver')` It should not work but right now test_compatibility.py tests finds local metadata and layers, which end up used. After #5172 when remote storage is the source of truth it will no longer work. --- test_runner/regress/test_compatibility.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_runner/regress/test_compatibility.py b/test_runner/regress/test_compatibility.py index b00cf983ed..161662bc99 100644 --- a/test_runner/regress/test_compatibility.py +++ b/test_runner/regress/test_compatibility.py @@ -325,8 +325,8 @@ def prepare_snapshot( # For each pageserver config, edit it and rewrite for config_path, pageserver_config in path_to_config.items(): - pageserver_config["remote_storage"]["local_path"] = LocalFsStorage.component_path( - repo_dir, RemoteStorageUser.PAGESERVER + pageserver_config["remote_storage"]["local_path"] = str( + LocalFsStorage.component_path(repo_dir, RemoteStorageUser.PAGESERVER) ) for param in ("listen_http_addr", "listen_pg_addr", "broker_endpoint"):