Skip to content

feat: add ephemeral-environment list, view and delete commands - #754

Draft
justin-newman wants to merge 4 commits into
OctopusDeploy:mainfrom
justin-newman:kepler/issue-753-ephemeral-environment-status-delete
Draft

justin-newman wants to merge 4 commits into
OctopusDeploy:mainfrom
justin-newman:kepler/issue-753-ephemeral-environment-status-delete

Conversation

@justin-newman

@justin-newman justin-newman commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #753

Blocked on go-octopusdeploy

This depends on OctopusDeploy/go-octopusdeploy#489, which adds ephemeralenvironments.GetStatus and Delete. It can't merge until that PR is merged and released and go.mod is bumped here. It won't build against the currently pinned client, so it's a draft until then.

Changes

  • ephemeral-environment list lists the ephemeral environments in the space. With --project it adds a STATUS column, since the provisioning status is per project. If the status of one environment can't be read it is reported on stderr and shown as Unknown, and the rest of the list still prints.
  • ephemeral-environment view --name <name> --project <project> shows the provisioning status of an environment for a project. Supports table, basic and --output-format json.
  • ephemeral-environment delete --name <name> deletes an ephemeral environment directly, for cases where it can't be deprovisioned (for example ProvisioningFailed). It confirms by name unless --confirm is passed.

Not included

I considered an ephemeral fallback in environment delete (and accepting an ID there) and decided against it. I don't think a fallback is as safe for a delete command: a name that matches nothing in the classic list could silently resolve to a different, ephemeral resource. A dedicated ephemeral-environment delete makes the target explicit. Happy to revisit if there's demand.

@justin-newman justin-newman changed the title feat: add ephemeral-environment view and delete commands feat: add ephemeral-environment list, view and delete commands Oct 14, 2026
@justin-newman

Copy link
Copy Markdown
Contributor Author

@NickJosevski for your consideration

view shows the provisioning status of an ephemeral environment for a project, and delete removes an ephemeral environment directly (for example when provisioning failed and it cannot be deprovisioned). Both use the new GetStatus and Delete functions in go-octopusdeploy.
list shows the ephemeral environments in a space. With --project it also shows the provisioning status of each environment for that project, since the status is per project. A failure to read one status is reported and shown as Unknown rather than stopping the listing.
@justin-newman
justin-newman force-pushed the kepler/issue-753-ephemeral-environment-status-delete branch from 0488402 to 82f8aa9 Compare October 15, 2026 17:01
Expect the name query parameter the updated client sends, and serve the client's initial requests in the tests that validate missing flags so they no longer block.
The updated go-octopusdeploy client includes an empty name parameter on ephemeral environment lookups. Update the mocked request URLs in the tests that hard-code them, so they pass once go.mod is bumped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ephemeral environments: add a way to read provisioning status and to delete an ephemeral environment

1 participant