-
Notifications
You must be signed in to change notification settings - Fork 473
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
Add basic remote storage test #1079
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config option changes look good to me, I didn't look at the rest of the patch
let cmd = cmd.env_clear().env("RUST_BACKTRACE", "1"); | ||
|
||
const RUST_LOG_KEY: &str = "RUST_LOG"; | ||
if let Ok(rust_log_value) = std::env::var(RUST_LOG_KEY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does RUST_LOG_KEY do?
Would it make sense to pass through all env variables with RUST_*
prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does RUST_LOG_KEY do?
That's just a variable to hold the RUST_LOG
value to use it twice on the next lines. const
forces it to BE_NAMED_THIS_WAY , so might be a bit confusing. I can define it as let rust_log_key = ...
, would that reduce the confusion?
Would it make sense to pass through all env variables with RUST_* prefix?
I'm not aware of any others that start with such prefix, actually.
Seems that the RUST_LOG
one emerged from env_logger
crate and still isn't a standard really, since has to be supported in every logging backend separately. For instance, the slog
one we've used before tracing
did not support such variable.
Lastly, the only documentation about any rust-related env vars I was able to find is about cargo
:
https://doc.rust-lang.org/cargo/reference/environment-variables.html
So, I'd rather keep the RUST_LOG
one only for now.
55032e2
to
8588f26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Looks good to me, left few minor comments
I plan to use pageserver related utilities in a tenant migration tests
e4a7cda
to
75cada5
Compare
75cada5
to
654992e
Compare
Part of #755
All fixes and improvements are put as different commits in the same PR for simplicity and better context, but I can split them off, if needed, but the changes are rather small combined IMO and depend on each other anyway, so I'd left it all as is now.
Fixes:
Improves:
RUST_LOG
env var to safekpeer and pageserver CLI commands, python tests can also specify the same env var to automatically propagate it into the CLI or programmatically set arust_log_override
property to enable the same for a certain test--pageserver-config-override
params that get passed into pageserver as-c
(--config-override
), which is used to specify remote storage params to pageserver via Zenith CLI.Also,
ZENITH_PAGESERVER_OVERRIDES
env var can be used to set those config values globally for all python tests (so that all existing tests could be run with overrides, e.g. remote storage enabled)Adds:
The remote storage test is not finished yet, it requires more fixes to properly read the WAL after the timeline data got restored, I will do that later: right now the test is useful already, since it brings the remote storage code needed by #995 and tests that pageserver is capable to upload, download and load a timeline into its memory correctly.
Also, all remote storage tests now use local fs as a storage, so future improvements are needed to bring some form of S3 into the tests.