Repository navigation
feat: add GetStatus and Delete for ephemeral environments - #489
Open
justin-newman wants to merge 2 commits into
Open
justin-newman wants to merge 2 commits into
justin-newman wants to merge 2 commits into
Conversation
Contributor
Author
|
@NickJosevski for your consideration |
justin-newman
force-pushed
the
feat/ephemeral-environment-status-and-delete
branch
from
October 15, 2026 16:53
d864e5c to
d44f6be
Compare
GetStatus reads the per-project provisioning status of an ephemeral environment. Delete removes an ephemeral environment without running its deprovisioning runbook, for environments that cannot be deprovisioned, for example when provisioning failed.
GetStatus sent a request with an empty path segment when the environment or project id was empty. It now returns an error, as Delete does.
justin-newman
force-pushed
the
feat/ephemeral-environment-status-and-delete
branch
from
October 21, 2026 05:46
0f30e7b to
ed78b93
Compare
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.
Background
The CLI needs to read the provisioning status of an ephemeral environment and to delete one that cannot be deprovisioned, for example when provisioning failed. See OctopusDeploy/cli#753. The client exposes neither today.
Changes
GetStatus(client, spaceID, environmentId, projectId)callsGET /api/{spaceId}/projects/{projectId}/environments/ephemeral/{id}/statusand returns anEphemeralEnvironmentStatuswithStatus.Delete(client, spaceID, environmentId)callsDELETE /api/{spaceId}/environments/{id}, removing the environment without running its deprovisioning runbook.httptestcover the request method and URL, response decoding, and error cases. E2E tests cover both functions against a server.Deleteuses the standard environments route; the e2e test checks the environment is gone afterwards.Follow-up
OctopusDeploy/cli#754 uses these and is a draft until this is merged and released and the
go.modbump is made there.