-
Notifications
You must be signed in to change notification settings - Fork 9
Document get_deployment_payload / delete_deployment_payload response contracts #600
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -697,9 +697,11 @@ Returns the raw tarball for a deployment. Useful for inspecting or re-deploying | |
| } | ||
| ``` | ||
|
|
||
| The response is the raw tarball bytes (`Content-Type: application/octet-stream`, with a `Content-Disposition` download filename) - not JSON and not base64-encoded, so payloads of any size stream without inflation. Returns `404` if the deployment does not exist or its payload has already been reclaimed (by payload retention or `delete_deployment_payload`). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Medium: get_deployment_payload's super_user requirement is stricter than delete_deployment_payload's, but the doc doesn't say so Both ops are registered with This PR's stated goal is documenting "previously-unspecified behavioral contracts" for these two ops, so this asymmetry belongs here rather than staying implicit in the Suggested fix: append a sentence to this paragraph, e.g. "Unlike most other — |
||
|
|
||
| ### `delete_deployment_payload` | ||
|
|
||
| Removes the tarball blob from a deployment record. The deployment record itself is retained; only the binary payload is deleted. Use this to reclaim storage after confirming a deployment is stable. | ||
| Removes the tarball blob from a deployment record. The deployment record itself is retained; only the binary payload is deleted. Use this to reclaim storage after confirming a deployment is stable. The deletion replicates, so one call frees the payload's storage on every node in the cluster. | ||
|
|
||
| ```json | ||
| { | ||
|
|
@@ -708,6 +710,18 @@ Removes the tarball blob from a deployment record. The deployment record itself | |
| } | ||
| ``` | ||
|
|
||
| Response: | ||
|
|
||
| ```json | ||
| { | ||
| "message": "Deleted payload for deployment 'a3f8c2d1...'", | ||
| "deployment_id": "a3f8c2d1...", | ||
| "freed_bytes": 52428800 | ||
| } | ||
| ``` | ||
|
|
||
| The deployment must be in a terminal status (`success`, `failed`, or `rolled_back`); deleting the payload of an in-progress deployment fails with `409`, since its payload may still be replicating to peers. Deleting an already-reclaimed payload succeeds with `freed_bytes: 0` (the operation is idempotent). A `payload_dropped` entry recording the deleting user is appended to the deployment's `event_log`. | ||
|
|
||
| ### `add_ssh_key` | ||
|
|
||
| Adds an SSH key (must be ed25519) for authenticating deployments from private repositories. | ||
|
|
||
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.
For consistency with the rest of the document, use an em-dash (
—) instead of a hyphen (-) to separate the clauses.