Repository navigation
[M8.2b] CLI: deploy, rollback and server removal - #194
Merged
Merged
Conversation
…al API Signed-off-by: review <[email protected]>
This file contains hidden or 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
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.
What changed
deploy: validatesshipkeep.ymllocally, creates the application or saves its configuration with the expected hash, queues a deployment and follows it. It exits non-zero unless the deployment succeeded. Stopping to follow never stops the deployment, and the message says so.rollback: returns to the newest good deployment of another release than the one serving, or to--to ID.server remove ID --confirm NAME: gets a confirmation token for the exact name, then spends it.Why
PLAN M8.2b.
How it was tested
cli.integration.spec.tsbuilds the real binary and runs it against the real API and database (local PostgreSQL 18.4), with a real scoped token and an environment holding onlyPATH,HOMEandXDG_CONFIG_HOME:rollback.confirmation_name_mismatch), then succeeds.Unit tests add malicious input: IDs from the server or flags that would change the URL, hostile files, terminal escapes in a failure reason, and rollback cases with nothing to return to.
Not covered: following a deployment to completion against a real worker. Following is unit-tested against a stub, because the integration fixture runs no worker, so deployments there are finished by SQL. Nothing has run on a real server.
Security considerations
--confirmhas no default and the server checks the name (rule 7). The confirmation token is never printed.go-cli.tsspawns with a fixed argv and no shell; it is test tooling, and secrets go through standard input.Checklist