-
Notifications
You must be signed in to change notification settings - Fork 456
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
refactor: use serde for TenantConf deserialization Fixes: #5300 #5310
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
koivunej
reviewed
Sep 14, 2023
koivunej
reviewed
Sep 16, 2023
rmodpur
force-pushed
the
tenant-conf-validation
branch
from
September 18, 2023 04:21
bc5e8b5
to
5ba1c13
Compare
rmodpur
requested review from
conradludgate and
koivunej
and removed request for
a team
September 18, 2023 04:23
rmodpur
force-pushed
the
tenant-conf-validation
branch
from
September 19, 2023 02:53
5ba1c13
to
74fda81
Compare
rmodpur
force-pushed
the
tenant-conf-validation
branch
from
September 26, 2023 09:26
74fda81
to
006a358
Compare
@koivunej could you pls review this ? |
… config Signed-off-by: Rahul Modpur <[email protected]>
rmodpur
force-pushed
the
tenant-conf-validation
branch
from
September 26, 2023 09:31
006a358
to
45061a8
Compare
github-actions
bot
removed
the
approved-for-ci-run
Changes are safe to trigger CI for the PR
label
Nov 6, 2023
Closed
github-actions
bot
removed
the
approved-for-ci-run
Changes are safe to trigger CI for the PR
label
Nov 28, 2023
github-actions
bot
removed
the
approved-for-ci-run
Changes are safe to trigger CI for the PR
label
Nov 28, 2023
github-actions
bot
removed
the
approved-for-ci-run
Changes are safe to trigger CI for the PR
label
Nov 29, 2023
github-actions
bot
removed
the
approved-for-ci-run
Changes are safe to trigger CI for the PR
label
Nov 29, 2023
github-actions
bot
removed
the
approved-for-ci-run
Changes are safe to trigger CI for the PR
label
Nov 29, 2023
unwrapping in tests is always preferable to anything else; the panic message will be much better than what assert! of a bool could be.
github-actions
bot
removed
the
approved-for-ci-run
Changes are safe to trigger CI for the PR
label
Nov 29, 2023
github-actions
bot
removed
the
approved-for-ci-run
Changes are safe to trigger CI for the PR
label
Nov 29, 2023
shanyp
changed the title
use serde_path_to_error for deserializing
Remove handcrafted deserialization code and use serde_path_to_error for detecting misconfiguration fields
Nov 29, 2023
shanyp
changed the title
Remove handcrafted deserialization code and use serde_path_to_error for detecting misconfiguration fields
Remove handcrafted deserialization code and use serde_path_to_error for detecting misconfiguration fields Fix: #5300
Nov 29, 2023
2406 tests run: 2310 passed, 0 failed, 96 skipped (full report)Flaky tests (5)Postgres 16
Postgres 15
Postgres 14Code coverage (full report)
The comment gets automatically updated with the latest test results
b26f4c8 at 2023-11-29T18:51:03.490Z :recycle: |
koivunej
changed the title
Remove handcrafted deserialization code and use serde_path_to_error for detecting misconfiguration fields Fix: #5300
refactor: use serde for TenantConf deserialization
Nov 30, 2023
koivunej
approved these changes
Nov 30, 2023
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.
We do have quite the few tenant conf deserialization related tests, so I think the code must work. I mentioned what is being left undone in the PR description.
koivunej
reviewed
Nov 30, 2023
shanyp
changed the title
refactor: use serde for TenantConf deserialization
refactor: use serde for TenantConf deserialization Fixes: #5300
Nov 30, 2023
@rmodpur thank you for this contribution! |
koivunej
added a commit
that referenced
this pull request
Dec 15, 2023
Before any json parsing from the http api only returned errors were per field errors. Now they are done using `serde_path_to_error`, which at least helped greatly with the `disk_usage_eviction_run` used for testing. I don't think this can conflict with anything added in #5310.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove handcrafted TenantConf deserialization code. Use
serde_path_to_error
to include the field which failed parsing. Leaves the duplicated TenantConf in pageserver and models, does not touch PageserverConf handcrafted deserialization.Error change:
checkpoint_distance
cannot be negative"checkpoint_distance
: invalid value: integer-1
, expected u64"Fixes: #5300
Cc: #3682