Upgrade to go-fastly version 11.#1514
Merged
kpfleming merged 1 commit intofastly:mainfrom Aug 11, 2025
Merged
Conversation
go-fastly version 11 requires a context.Context object to be passed as the first argument in all of the API functions it exports. This commit modifies all of the code in the CLI to pass context.TODO() in that case, since the CLI does not use context objects for any other purpose. The CLI also has an internal 'interface' which maps to the complete set of API functions in the 'fastly' namespace exported by go-fastly, and hundreds of 'mock' functions used in the CLI test suite. Those have also been updated, and along the way many inconsistencies in those function signatures were corrected. go-fastly version 11 removed a deprecated set of product enablement API functions, so the 'fastly products' command has been updated to use the new API functions. The tests for the `fastly products` command no longer mock the API calls as they no longer exist, and the new 'fastly product' command which will appear in the next release will provide full test coverage of the CLI's use of the new product enablement API functions. There are no functional changes in this commit, and the entire test suite still passes. At least 80% of the changes in this commit were produced using [comby](https://comby.dev/).
Integralist
reviewed
Aug 8, 2025
anthony-gomez-fastly
approved these changes
Aug 11, 2025
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.
go-fastly version 11 requires a context.Context object to be passed as the first argument in all of the API functions it exports. This commit modifies all of the code in the CLI to pass context.TODO() in that case, since the CLI does not use context objects for any other purpose.
The CLI also has an internal 'interface' which maps to the complete set of API functions in the 'fastly' namespace exported by go-fastly, and hundreds of 'mock' functions used in the CLI test suite. Those have also been updated, and along the way many inconsistencies in those function signatures were corrected.
go-fastly version 11 removed a deprecated set of product enablement API functions, so the
fastly productscommand has been updated to use the new API functions. The tests for thefastly productscommand no longer mock the API calls as they no longer exist, and the newfastly productcommand which will appear in the next release will provide full test coverage of the CLI's use of the new product enablement API functions.There are no functional changes in this commit, and the entire test suite still passes.
At least 80% of the changes in this commit were produced using comby.
All Submissions:
Changes to Core Features: