-
Notifications
You must be signed in to change notification settings - Fork 378
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
stop accepting empty body in /attach API #4282
Comments
This PR adds support for supplying the tenant config upon /attach. Before this change, when relocating a tenant using `/detach` and `/attach`, the tenant config after `/attach` would be the default config from `pageserver.toml`. That is undesirable for settings such as the PITR-interval: if the tenant's config on the source was `30 days` and the default config on the attach-side is `7 days`, then the first GC run would eradicate 23 days worth of PITR capability. The API change is backwards-compatible: if the body is empty, we continue to use the default config. We'll remove that capability as soon as the cloud.git code is updated to use attach-time tenant config (#4282 keeps track of this). unblocks neondatabase/cloud#5092 fixes #1555 part of #886 (Tenant Relocation) Implementation ============== The preliminary PRs for this work were (most-recent to least-recent) * #4279 * #4267 * #4252 * #4235
This will be obsoleted by the move to the upsert location endpoint. |
If I understand correctly, https://github.com/neondatabase/cloud/pull/10927 removed the last calls of the I think the python tests are still using it though (tenant_attach in test_runner/fixtures/pageserver/http.py). Should they be changed to use the new API? What exactly is the corresponding new API? |
Yeah, my understanding also is that there shouldn't be any more production users of
Let's take this conversation into the team channel. |
## Problem These APIs have been deprecated for some time, but were still used from test code. Closes: #4282 ## Summary of changes - It is still convenient to do a "tenant_attach" from a test without having to write out a location_conf body, so those test methods have been retained with implementations that call through to their location_conf equivalent.
## Problem These APIs have been deprecated for some time, but were still used from test code. Closes: #4282 ## Summary of changes - It is still convenient to do a "tenant_attach" from a test without having to write out a location_conf body, so those test methods have been retained with implementations that call through to their location_conf equivalent.
PR #4255 adds the attach-time tenant config capability, but continues to accept the default tenant config for backwards-comaptibility reasons.
Once the corresponding
cloud.git
work to use attach-time tenant config is done, we should error out if the request body is empty and instead require a correctTenantAttachRequest
object in the body.Required work (in correct order)
config={}
tenant_attach_handler
test_empty_body
added in attach-time tenant config #4255 to expect failure (=> useNegativeEnv
)json_request_or_empty_body
The text was updated successfully, but these errors were encountered: