-
Notifications
You must be signed in to change notification settings - Fork 485
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
Dump current tenant config #3534
Conversation
The second bullet point sounds like this will fix #3471. Could you confirm, edit |
a5455f7
to
06c3dc4
Compare
Yes, looks it is the one. I've embedded the test for this fix with the new http endpoint value checks, but presumably can use old sql api to check these values too and separate into another PR. The fix without tests is in its own commit: dc688af |
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.
I think this is looking good. As always, some related and unrelated questions :)
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.
Oh yeah, we should update openapi.
This time, I agree fully. |
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.
This mostly LGTM, apart from the discussion regarding persistence of the tenant config.
Let's unblock this PR by changing it to the old behavior (apply in memory, and best-effort save to disk).
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.
Thank you, now have understood indeed and added another issue in the description. |
The PR adds an endpoint to show tenant's current config:
GET /v1/tenant/:tenant_id/config
Tenant's config consists of two parts: tenant overrides (could be changed via other management API requests) and the default part, substituting all missing overrides (constant, hardcoded in pageserver).
The API returns the custom overrides and the final tenant config, after applying all the defaults.
Along the way, it had to fix two things in the config:
null
's (same as toml serializer behaves by default), and to understand such shortened format when deserialized. A unit test is addedPUT /v1/tenant/config
endpoint rewritten the local file with what had came in the request, but updating (not rewriting the old values) the in-memory state instead.That got uncovered during adjusting the e2e test and fixed to do the replacement everywhere, otherwise there's no way to revert existing overrides. Fixes Changing tenant configuration writes only changed values to disk, continues with different config #3471 (commit dc688af)