fix: asobi delete says what the control plane actually does - #52
Merged
Merged
Conversation
widgrensit/asobi_saas#291 routes CLI destruction through the FSM, so a durable environment now retires - compute down, database kept 30 days, name reusable immediately - instead of being dropped inline, and the response is the queued "destroying" rather than a completed "deleted". "Environment X deleted" promised something the control plane deliberately does not do, and would have kept promising it. Two refusals also get their own message. A 403 is a role refusal, not an expired session, and the generic "delete failed (403)" sends somebody to re-run `asobi login` to fix a permission they do not have. A 409 means deletion protection is set, which is a thing they can act on rather than retry.
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.
Client half of widgrensit/asobi_saas#291. Merge that one first.
Why
That PR routes CLI destruction through the FSM, so a durable environment now retires — compute down, database kept 30 days, name reusable immediately — instead of being torn down and
DROP DATABASE'd inline. Ephemeral environments still drop. The response is the queueddestroyingrather than a completeddeleted.Environment X deletedpromised something the control plane deliberately does not do, and would have kept promising it. Now:Environment X is being destroyed.Two refusals worth naming
asobi_saas#291adds a role gate and starts honouring theprotectedflag, so this route can now refuse for reasons a generic message obscures:delete failed (403)sends somebody off to re-runasobi loginto fix a permission they do not have.Both get their own message and a test.
Checks
gofmt -lclean,go vetclean,go build ./...,go test ./...pass (2 new). Usage text and README updated to describe retirement rather than deletion.