Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Remote storage refactorings #5243

Merged
merged 29 commits into from
Sep 8, 2023

Conversation

koivunej
Copy link
Member

@koivunej koivunej commented Sep 7, 2023

Remote storage cleanup split from #5198:

  • pageserver, extensions, and safekeepers now have their separate remote storage
  • RemoteStorageKind has the configuration code
  • S3Storage has the cleanup code
  • with MOCK_S3, pageserver, extensions, safekeepers use different buckets
  • with LOCAL_FS, repo_dir / "local_fs_remote_storage" / $user is used as path, where $user is pageserver, safekeeper
  • no more NeonEnvBuilder.enable_xxx_remote_storage but one enable_{pageserver,extensions,safekeeper}_remote_storage

Should not have any real changes. These will allow us to default to LOCAL_FS for pageserver on the next PR, remove RemoteStorageKind.NOOP, work towards #5172.

@koivunej koivunej requested review from bayandin and jcsp September 7, 2023 19:43
@koivunej koivunej force-pushed the remote_storage_refactorings_cleaned_up branch from 090b6cb to 2c37fc0 Compare September 7, 2023 19:44
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

1640 tests run: 1567 passed, 0 failed, 73 skipped (full report)


Code coverage (full report)

  • functions: 52.8% (7596 of 14380 functions)
  • lines: 81.4% (44653 of 54841 lines)

The comment gets automatically updated with the latest test results
eaa4c82 at 2023-09-08T10:47:04.474Z :recycle:

Copy link
Member

@bayandin bayandin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks really good! Great job!

Most of the comments are just pythonisms

test_runner/fixtures/neon_fixtures.py Show resolved Hide resolved
test_runner/fixtures/neon_fixtures.py Show resolved Hide resolved
test_runner/fixtures/remote_storage.py Outdated Show resolved Hide resolved
test_runner/fixtures/remote_storage.py Outdated Show resolved Hide resolved
test_runner/fixtures/remote_storage.py Outdated Show resolved Hide resolved
koivunej and others added 2 commits September 8, 2023 12:00
Co-authored-by: Alexander Bayandin <alexander@neon.tech>
@koivunej koivunej force-pushed the remote_storage_refactorings_cleaned_up branch from ce1d097 to e952ea3 Compare September 8, 2023 09:25
Copy link
Collaborator

@jcsp jcsp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@koivunej koivunej enabled auto-merge (squash) September 8, 2023 10:23
@koivunej koivunej added the a/tech_debt Area: related to tech debt label Sep 8, 2023
@koivunej koivunej merged commit ff87fc5 into main Sep 8, 2023
@koivunej koivunej deleted the remote_storage_refactorings_cleaned_up branch September 8, 2023 10:54
koivunej added a commit that referenced this pull request Sep 8, 2023
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.
koivunej added a commit that referenced this pull request Sep 28, 2023
Part of #5172. Builds upon #5243, #5298. Includes the test changes:
- no more RemoteStorageKind.NOOP
- no more testing of pageserver without remote storage
- benchmarks now use LOCAL_FS as well

Support for running without RemoteStorage is still kept but in practice,
there are no tests and should not be any tests.

Co-authored-by: Christian Schwarz <christian@neon.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants