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

remove neon_local --pageserver-config-override #7614

Merged
merged 42 commits into from
May 7, 2024

Conversation

problame
Copy link
Contributor

@problame problame commented May 4, 2024

Preceding PR #7613 reduced the usage of --pageserver-config-override.

This PR builds on top of that work and fully removes the neon_local --pageserver-config-override.

Tests that need a non-default pageserver.toml control it using two options:

  1. Specify NeonEnvBuilder.pageserver_config_override before NeonEnvBuilder.init_start(). This uses a new neon_local init --pageserver-config flag.
  2. After init_start(): env.pageserver.stop() + NeonPageserver.edit_config_toml() + env.pageserver.start()

A few test cases were using env.pageserver.start(overrides=("--pageserver-config-override...",)).
I changed them to use one of the options above.

Future Work

The neon_local init --pageserver-config flag still uses pageserver --config-override under the hood. In the future, neon_local should just write the pageserver.toml directly.

The NeonEnvBuilder.pageserver_config_override field should be renamed to pageserver_initial_config. Let's save this churn for a separate refactor commit.

problame added 30 commits May 3, 2024 12:35
…side of `neon_local init`

The `NeonCli.init()` persists the non-default pageserver config values
for remote storage & `NeonEnvBuilder.pageserver_config_override` in
`pageserver.toml`.

We don't need to repeat them on each pageserver start after that.
…blame/test-suite-narrow-pageserver-config-override
Rewrite the pageserver.toml instead.
This allows inlining append_pageserver_param_overrides into NeonCli.init()
…age during init, not start"

This reverts commit 511f593.
…into problame/remove-pageserver-config-overrides
…into problame/remove-pageserver-config-overrides
…into problame/remove-pageserver-config-overrides

Conflicts:
	control_plane/src/pageserver.rs
    => pick ours
@problame problame changed the title test suite + neon_local init + pageserver cli: simplify config override mechanism remove neon_local --pageserver-config-override May 5, 2024
@problame problame changed the base branch from problame/remove-pageserver-update-config-flag to problame/test-suite-narrow-pageserver-config-override May 5, 2024 17:03
@koivunej
Copy link
Contributor

koivunej commented May 6, 2024

Congrats! This had so large test report message that github refused it :) This is the first I've seen such.

From the logs this seems to be quite usual failure: https://neon-github-public-dev.s3.amazonaws.com/reports/pr-7614/8967600476/index.html#suites/7745dadbd815ab87f5798aa881796f47/baabb8517aad95b1

Base automatically changed from problame/test-suite-narrow-pageserver-config-override to main May 6, 2024 20:31
Copy link

github-actions bot commented May 7, 2024

2970 tests run: 2843 passed, 0 failed, 127 skipped (full report)


Code coverage* (full report)

  • functions: 31.3% (6245 of 19973 functions)
  • lines: 46.7% (46754 of 100078 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
3ab3007 at 2024-05-07T16:37:50.860Z :recycle:

@problame
Copy link
Contributor Author

problame commented May 7, 2024

The compat tests are failing because the old neon_local binary doesn't have the --pageserver-config flag.

This is immaterial to

  1. neon_local users unless they uses --pageserver-config-override
  2. out production usage, because we don't use neon_local in production

@problame problame added the forward compatibility breakage Broken forward compatibility. The previous version can't handle new data. It'll be hard to roll-back label May 7, 2024
@problame problame marked this pull request as ready for review May 7, 2024 12:35
The  test_forward_compatibility test runs the old production binaries,
but is supposed to always run the latest neon_local binary.

I think commit 6acbee2 broke that by accident because in that commit,
from_repo_dir is introduced and runs an `init_start()` before the
`test_forward_compatibility` gets a chance to patch up the
neon_local_binpath.
@problame problame removed the forward compatibility breakage Broken forward compatibility. The previous version can't handle new data. It'll be hard to roll-back label May 7, 2024
@problame
Copy link
Contributor Author

problame commented May 7, 2024

Extracted fix for test_forward_compatibility into PR #7637 , this one will be rebased after it gets merged.

@problame problame enabled auto-merge (squash) May 7, 2024 16:04
@problame problame merged commit 308227f into main May 7, 2024
47 of 48 checks passed
@problame problame deleted the problame/remove-pageserver-config-overrides branch May 7, 2024 16:30
conradludgate pushed a commit that referenced this pull request May 8, 2024
Preceding PR #7613 reduced the
usage of `--pageserver-config-override`.

This PR builds on top of that work and fully removes the `neon_local
--pageserver-config-override`.

Tests that need a non-default `pageserver.toml` control it using two
options:

1. Specify `NeonEnvBuilder.pageserver_config_override` before
`NeonEnvBuilder.init_start()`. This uses a new `neon_local init
--pageserver-config` flag.
2. After `init_start()`: `env.pageserver.stop()` +
`NeonPageserver.edit_config_toml()` + `env.pageserver.start()`

A few test cases were using
`env.pageserver.start(overrides=("--pageserver-config-override...",))`.
I changed them to use one of the options above. 

Future Work
-----------

The `neon_local init --pageserver-config` flag still uses `pageserver
--config-override` under the hood. In the future, neon_local should just
write the `pageserver.toml` directly.

The `NeonEnvBuilder.pageserver_config_override` field should be renamed
to `pageserver_initial_config`. Let's save this churn for a separate
refactor commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants