fix: Correctly resolve staged version parameter - #1870
Open
acme wants to merge 1 commit into
Open
Conversation
- Use ListVersions to find staged version instead of unsupported filter - Add test for when latest ≠ staged version This ensures that `--version staged` returns the actual staged version.
kpfleming
reviewed
Aug 5, 2026
| case "staged": | ||
| serviceDetails, err := client.GetServiceDetails(context.TODO(), &fastly.GetServiceDetailsInput{ | ||
| // Find staged version by listing all versions and searching for staging=true. | ||
| vs, err := client.ListVersions(context.TODO(), &fastly.ListVersionsInput{ |
Member
There was a problem hiding this comment.
We intentionally changed from listing all versions to using filters because the 'list all versions' API endpoint is problematic for a number of reasons. In previous testing the 'staged' filter worked properly, so if it is not working now we need to work with the API team to correct that, not revert the code in the CLI.
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.
Change summary
This ensures that
--version stagedreturns the actual staged version.All Submissions:
New Feature Submissions:
Changes to Core Features:
User Impact
This ensures that
--version stagedreturns the actual staged version.Are there any considerations that need to be addressed for release?
This changes behaviour, but makes it correct.