fix: Update ephemeral env deprovisioning response types#235
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the response types for ephemeral environment deprovisioning API endpoints to include task IDs alongside runbook run IDs. The changes support the ability to quickly return service task IDs in GitHub actions while making the response structure more extensible for future properties.
- Introduces
DeprovisioningRunbookRuntype containing bothRunbookRunIdandTaskId - Updates
DeprovisionEphemeralEnvironmentProjectResponseto use the new type structure - Adds new
DeprovisionEphemeralEnvironmentResponsetype for the general deprovisioning endpoint
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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's this? 🌵
This PR add task ids to the responses for both of our ephemeral environment deprovisioning API endpoints to match backend changes here.
This is a breaking change, however both endpoints are marked as 'experimental` while the ephemeral environments feature is still in development, meaning that they should not be in use by any Octopus customers (or that any customers using them know that they are doing so at their own risk 👻).
This change will allow us to quickly return service task ids in our GitHub action to deprovision environments. It should also give our deprovisioning response types a more flexible shape for adding other properties after they are officially in use.
🐞 This PR also fixes a bug where the response type to deprovision for a single project was being used for both deprovisioning endpoints. With this change, the endpoint to deprovision across multiple projects now has its own response type representing an array of deprovisioning runs.
Testing 🧪
This has been tested locally using the example code under
examples/src/environments/How to review? 🔍
☑️ Code quality?
❔ Any scary consequences of the breaking change?
Fixes[sc-124036]