From 041453f2e1d60ebfa04696989db670c051ab2630 Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Tue, 28 Apr 2026 09:46:18 -0400 Subject: [PATCH 1/6] fix: fix spelling and grammar issues found in the codebase by jsoref --- CHANGELOG.md | 4 ++-- DEVELOPMENT.md | 2 +- TESTING.md | 2 +- pkg/app/run.go | 2 +- pkg/commands/compute/build.go | 2 +- pkg/commands/compute/init_test.go | 6 +++--- pkg/commands/compute/publish.go | 4 ++-- pkg/commands/compute/serve.go | 4 ++-- pkg/commands/kvstore/create.go | 2 +- pkg/commands/kvstore/delete.go | 2 +- pkg/commands/kvstore/describe.go | 2 +- pkg/commands/kvstoreentry/create.go | 2 +- pkg/commands/kvstoreentry/delete.go | 2 +- pkg/commands/kvstoreentry/describe.go | 2 +- pkg/commands/kvstoreentry/get.go | 2 +- pkg/commands/ngwaf/workspace/create.go | 8 ++++---- pkg/commands/ngwaf/workspace/update.go | 8 ++++---- pkg/commands/objectstorage/accesskeys/accesskeys_test.go | 8 ++++---- .../service/imageoptimizerdefaults/imageoptimizer_test.go | 4 ++-- pkg/commands/service/logging/grafanacloudlogs/update.go | 2 +- pkg/commands/service/ratelimit/ratelimit_test.go | 2 +- pkg/commands/service/service_test.go | 2 +- pkg/commands/version/version_test.go | 2 +- pkg/config/config_test.go | 6 +++--- pkg/errors/errors.go | 2 +- pkg/text/accesskey.go | 2 +- pkg/text/kvstore.go | 2 +- 27 files changed, 44 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d7634504..b730455ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -208,13 +208,13 @@ both the old and new forms are: - feat(compute/hashfiles): remove hashsum subcommand ([#1608](https://github.com/fastly/cli/pull/1608)) - feat(ngwaf/rules): add support for CRUD operations for NGWAF rules ([#1605](https://github.com/fastly/cli/pull/1605)) - feat(compute/deploy): added the `--no-default-domain` flag to allow for the skipping of automatic domain creation when deploying a Compute service([#1610](https://github.com/fastly/cli/pull/1610)) -- refactor(argparser/flags.go): add flag conversion utilities for converting string flags to bools and checking ascending and desecnding flags ([#1611](https://github.com/fastly/cli/pull/1611)) +- refactor(argparser/flags.go): add flag conversion utilities for converting string flags to bools and checking ascending and descending flags ([#1611](https://github.com/fastly/cli/pull/1611)) - feat(service/purge): Add 'service purge' command as replacement for 'purge', with an unlisted and deprecated alias of 'purge'. ([#1612](https://github.com/fastly/cli/pull/1612)) - feat(service/version): Add 'service version ...' commands as replacements for 'service-version ...', with unlisted and deprecated aliases of 'service-version ...'. ([#1614](https://github.com/fastly/cli/pull/1614)) - feat(service/vcl): moved the `vcl` command under the `service` command, with an unlisted and deprecated alias of `vcl` ([#1616](https://github.com/fastly/cli/pull/1616)) - feat(service/healthcheck): moved the `healthcheck` command under the `service` command, with an unlisted and deprecated alias of `healthcheck` ([#1619](https://github.com/fastly/cli/pull/1619)) - feat(service/backend): moved the `backend` command under the `service` command, with an unlisted and deprecated alias of `backend` ([#1621](https://github.com/fastly/cli/pull/1621)) -- feat(service/acl): moved the `acl` and `aclentry` commands under the `service` command, with a unlisted and deprecated aliases of `acl` and `aclentry` ([#1621](https://github.com/fastly/cli/pull/1624)) +- feat(service/acl): moved the `acl` and `aclentry` commands under the `service` command, with unlisted and deprecated aliases of `acl` and `aclentry` ([#1621](https://github.com/fastly/cli/pull/1624)) - feat(version): If the latest version is at least one major version higher than the current version, provide links to the release notes for the major version(s) so the user can review them before upgrading. ([#1623](https://github.com/fastly/cli/pull/1623)) - feat(service/imageoptimizerdefaults): moved the `imageoptimizerdefaults` commands under the `service` command, with an unlisted and deprecated alias of `imageoptimizerdefaults` ([#1627](https://github.com/fastly/cli/pull/1627)) - feat(service/alert): moved the `alerts` command to the `service alert` command, with an unlisted and deprecated alias of `alerts` ([#1616](https://github.com/fastly/cli/pull/1626)) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 5d446ecdf..527f868ef 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -68,7 +68,7 @@ The resulting configuration is then saved to disk at `./pkg/config/config.toml` When a user installs the CLI for the first time, they'll have no existing config and so the embedded config will be used. In the future, when the user updates their CLI, the existing config they have will be used. -If the config has changed in any way, then you (the CLI developer) should ensure the `config_version` number is bumped before publishing a new CLI release. This is because when the user updates to that new CLI version and the invoke the CLI, the CLI will identify a mismatch between the user's local config version and the embedded config version. This will cause the embedded config to be merged with the local config and consequently the user's config will be updated to include the new fields. +If the config has changed in any way, then you (the CLI developer) should ensure the `config_version` number is bumped before publishing a new CLI release. This is because when the user updates to that new CLI version and they invoke the CLI, the CLI will identify a mismatch between the user's local config version and the embedded config version. This will cause the embedded config to be merged with the local config and consequently the user's config will be updated to include the new fields. > **NOTE:** The CLI does provide a `fastly config --reset` option that resets the config to a version compatible with the user's current CLI version. This is fallback for users who run into issues for whatever reason. diff --git a/TESTING.md b/TESTING.md index afa89e34c..561699af3 100644 --- a/TESTING.md +++ b/TESTING.md @@ -44,7 +44,7 @@ When running the tests locally, if you don't have the relevant language ecosyste > **NOTE**: you might notice a discrepancy between CI and your local environment which is caused by the difference in Rust toolchain versions as defined in .github/workflows/pr_test.yml which specifies the version required to be tested for in CI. Running `rustup toolchain install ` and `rustup target add wasm32-wasip1 --toolchain ` will resolve any failing integration tests you may be running locally. -To the run the full test suite: +To run the full test suite: ```sh TEST_COMPUTE_INIT=1 TEST_COMPUTE_BUILD=1 TEST_COMPUTE_DEPLOY=1 TEST_COMMAND=gotest make all diff --git a/pkg/app/run.go b/pkg/app/run.go index 0707b0662..4186727c1 100644 --- a/pkg/app/run.go +++ b/pkg/app/run.go @@ -255,7 +255,7 @@ func Exec(data *global.Data) error { } // User can set env.DebugMode env var or the --debug-mode boolean flag. - // This will prioritise the flag over the env var. + // This will prioritize the flag over the env var. if data.Flags.Debug { data.Env.DebugMode = "true" } diff --git a/pkg/commands/compute/build.go b/pkg/commands/compute/build.go index b8833a1ad..6ac5a88d7 100644 --- a/pkg/commands/compute/build.go +++ b/pkg/commands/compute/build.go @@ -672,7 +672,7 @@ func updateWasmtools( // identifyToolchain determines the programming language. // -// It prioritises the --language flag over the manifest field. +// It prioritizes the --language flag over the manifest field. // Will error if neither are provided. // Lastly, it will normalise with a trim and lowercase. func identifyToolchain(c *BuildCommand) (string, error) { diff --git a/pkg/commands/compute/init_test.go b/pkg/commands/compute/init_test.go index e2b54c762..049830b28 100644 --- a/pkg/commands/compute/init_test.go +++ b/pkg/commands/compute/init_test.go @@ -515,7 +515,7 @@ func TestInit_ExistingService(t *testing.T) { expectInManifest []string expectNoManifest bool expectInError string - suppresBeacon bool + suppressBeacon bool }{ { name: "when the service exists", @@ -624,7 +624,7 @@ func TestInit_ExistingService(t *testing.T) { args: testutil.SplitArgs("compute init --from LsyQ2UXDGk6d4EN"), expectInError: "--from url seems invalid", // Not a valid URL OR Service ID - suppresBeacon: true, + suppressBeacon: true, }, { name: "service has a cloned_from value", @@ -778,7 +778,7 @@ func TestInit_ExistingService(t *testing.T) { t.Log(stdout.String()) - if testcase.suppresBeacon { + if testcase.suppressBeacon { testutil.AssertLength(t, 0, httpClient.Requests) } else { testutil.AssertLength(t, 1, httpClient.Requests) diff --git a/pkg/commands/compute/publish.go b/pkg/commands/compute/publish.go index 5d4cb5815..86339f634 100644 --- a/pkg/commands/compute/publish.go +++ b/pkg/commands/compute/publish.go @@ -178,10 +178,10 @@ func (c *PublishCommand) Deploy(in io.Reader, out io.Writer) error { c.deploy.PackagePath = c.pkg.Value } if c.serviceName.WasSet { - c.deploy.ServiceName = c.serviceName // deploy's field is a argparser.OptionalServiceNameID + c.deploy.ServiceName = c.serviceName // deploy's field is an argparser.OptionalServiceNameID } if c.serviceVersion.WasSet { - c.deploy.ServiceVersion = c.serviceVersion // deploy's field is a argparser.OptionalServiceVersion + c.deploy.ServiceVersion = c.serviceVersion // deploy's field is an argparser.OptionalServiceVersion } if c.domain.WasSet { c.deploy.Domain = c.domain.Value diff --git a/pkg/commands/compute/serve.go b/pkg/commands/compute/serve.go index 790d67e7e..66fe3f72e 100644 --- a/pkg/commands/compute/serve.go +++ b/pkg/commands/compute/serve.go @@ -928,7 +928,7 @@ func (c *ServeCommand) startPushpin(spinner text.Spinner, out io.Writer) (pushpi // - path to the routes file to use // - A routes file that sets up the routes. In our case, we: // - wires up a backend name (id) to the server host - // - if the backend sets an override host, then we set thatt + // - if the backend sets an override host, then we set that // - if the backend enables HTTPS, then we enable that // - if the backend has a path prefix, then we set that up // - enables WebSocket-over-HTTP @@ -1253,7 +1253,7 @@ func watchFiles(root string, gi *ignore.GitIgnore, verbose bool, s *fstexec.Stre // We do this because if we didn't, then we'd get an error after one // restart of the viceroy executable: "os: process already finished". // - // This error happens happens because the compute.watchFiles() function is + // This error happens because the compute.watchFiles() function is // run in a goroutine and so it will keep running with a copy of the // fstexec.Streaming command instance that wraps a process which has // already been terminated. diff --git a/pkg/commands/kvstore/create.go b/pkg/commands/kvstore/create.go index 2c99ff090..c638f8f97 100644 --- a/pkg/commands/kvstore/create.go +++ b/pkg/commands/kvstore/create.go @@ -12,7 +12,7 @@ import ( "github.com/fastly/cli/pkg/text" ) -// CreateCommand calls the Fastly API to create an kv store. +// CreateCommand calls the Fastly API to create a kv store. type CreateCommand struct { argparser.Base argparser.JSONOutput diff --git a/pkg/commands/kvstore/delete.go b/pkg/commands/kvstore/delete.go index 4b39a1e23..5b40e1be0 100644 --- a/pkg/commands/kvstore/delete.go +++ b/pkg/commands/kvstore/delete.go @@ -15,7 +15,7 @@ import ( "github.com/fastly/cli/pkg/text" ) -// DeleteCommand calls the Fastly API to delete an kv store. +// DeleteCommand calls the Fastly API to delete a kv store. type DeleteCommand struct { argparser.Base argparser.JSONOutput diff --git a/pkg/commands/kvstore/describe.go b/pkg/commands/kvstore/describe.go index 0e08a9796..dcc9d545a 100644 --- a/pkg/commands/kvstore/describe.go +++ b/pkg/commands/kvstore/describe.go @@ -12,7 +12,7 @@ import ( "github.com/fastly/cli/pkg/text" ) -// DescribeCommand calls the Fastly API to fetch the value of a key from an kv store. +// DescribeCommand calls the Fastly API to fetch the value of a key from a kv store. type DescribeCommand struct { argparser.Base argparser.JSONOutput diff --git a/pkg/commands/kvstoreentry/create.go b/pkg/commands/kvstoreentry/create.go index b8f1113c9..34439f825 100644 --- a/pkg/commands/kvstoreentry/create.go +++ b/pkg/commands/kvstoreentry/create.go @@ -54,7 +54,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman return &c } -// CreateCommand calls the Fastly API to insert a key into an kv store. +// CreateCommand calls the Fastly API to insert a key into a kv store. type CreateCommand struct { argparser.Base argparser.JSONOutput diff --git a/pkg/commands/kvstoreentry/delete.go b/pkg/commands/kvstoreentry/delete.go index cc3b5e76b..d5fd5d791 100644 --- a/pkg/commands/kvstoreentry/delete.go +++ b/pkg/commands/kvstoreentry/delete.go @@ -24,7 +24,7 @@ const DeleteKeysPoolSize int = 100 // stopping the goroutines from executing. const DeleteKeysMaxErrors int = 100 -// DeleteCommand calls the Fastly API to delete an kv store. +// DeleteCommand calls the Fastly API to delete a kv store. type DeleteCommand struct { argparser.Base argparser.JSONOutput diff --git a/pkg/commands/kvstoreentry/describe.go b/pkg/commands/kvstoreentry/describe.go index c658a9fcb..66a45c4bd 100644 --- a/pkg/commands/kvstoreentry/describe.go +++ b/pkg/commands/kvstoreentry/describe.go @@ -12,7 +12,7 @@ import ( "github.com/fastly/cli/pkg/global" ) -// DescribeCommand calls the Fastly API to fetch the value of a key from an kv store. +// DescribeCommand calls the Fastly API to fetch the value of a key from a kv store. type DescribeCommand struct { argparser.Base argparser.JSONOutput diff --git a/pkg/commands/kvstoreentry/get.go b/pkg/commands/kvstoreentry/get.go index adf3d4d93..993eeadef 100644 --- a/pkg/commands/kvstoreentry/get.go +++ b/pkg/commands/kvstoreentry/get.go @@ -15,7 +15,7 @@ import ( "github.com/fastly/cli/pkg/text" ) -// GetCommand calls the Fastly API to fetch the value of a key from an kv store. +// GetCommand calls the Fastly API to fetch the value of a key from a kv store. type GetCommand struct { argparser.Base argparser.JSONOutput diff --git a/pkg/commands/ngwaf/workspace/create.go b/pkg/commands/ngwaf/workspace/create.go index e9e3dd77f..8a6ba2159 100644 --- a/pkg/commands/ngwaf/workspace/create.go +++ b/pkg/commands/ngwaf/workspace/create.go @@ -31,7 +31,7 @@ type CreateCommand struct { defaultBlockingCode argparser.OptionalInt defaultRedirectURL argparser.OptionalString clientIPHeaders argparser.OptionalString - ipAnonimization argparser.OptionalString + IPAnonymization argparser.OptionalString } // NewCreateCommand returns a usable command registered under the parent. @@ -53,7 +53,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("clientIPHeaders", "Specify the request header containing the client IP address. Input accepted as colon separated string.").Action(c.clientIPHeaders.Set).StringVar(&c.clientIPHeaders.Value) c.CmdClause.Flag("defaultBlockingCode", "Default status code that is returned when a request to your web application is blocked.").Action(c.defaultBlockingCode.Set).IntVar(&c.defaultBlockingCode.Value) c.CmdClause.Flag("defaultRedirectURL", "Redirect url to be used if code 301 or 302 is used.").Action(c.defaultRedirectURL.Set).StringVar(&c.defaultRedirectURL.Value) - c.CmdClause.Flag("ipAnonimization", "Agents will anonymize IP addresses according to the option selected.").Action(c.ipAnonimization.Set).StringVar(&c.ipAnonimization.Value) + c.CmdClause.Flag("IPAnonymization", "Agents will anonymize IP addresses according to the option selected.").Action(c.IPAnonymization.Set).StringVar(&c.IPAnonymization.Value) c.RegisterFlagBool(c.JSONFlag()) return &c @@ -85,8 +85,8 @@ func (c *CreateCommand) Exec(_ io.Reader, out io.Writer) error { if c.defaultRedirectURL.WasSet { input.DefaultRedirectURL = &c.defaultRedirectURL.Value } - if c.ipAnonimization.WasSet { - input.IPAnonymization = &c.ipAnonimization.Value + if c.IPAnonymization.WasSet { + input.IPAnonymization = &c.IPAnonymization.Value } fc, ok := c.Globals.APIClient.(*fastly.Client) diff --git a/pkg/commands/ngwaf/workspace/update.go b/pkg/commands/ngwaf/workspace/update.go index 7257c5443..9decd8359 100644 --- a/pkg/commands/ngwaf/workspace/update.go +++ b/pkg/commands/ngwaf/workspace/update.go @@ -32,7 +32,7 @@ type UpdateCommand struct { defaultBlockingCode argparser.OptionalInt defaultRedirectURL argparser.OptionalString clientIPHeaders argparser.OptionalString - ipAnonimization argparser.OptionalString + IPAnonymization argparser.OptionalString } // NewUpdateCommand returns a usable command registered under the parent. @@ -55,7 +55,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("clientIPHeaders", "Specify the request header containing the client IP address. Input accepted as colon separated string.").Action(c.clientIPHeaders.Set).StringVar(&c.clientIPHeaders.Value) c.CmdClause.Flag("defaultBlockingCode", "Default status code that is returned when a request to your web application is blocked.").Action(c.defaultBlockingCode.Set).IntVar(&c.defaultBlockingCode.Value) c.CmdClause.Flag("defaultRedirectURL", "Redirect url to be used if code 301 or 302 is used.").Action(c.defaultRedirectURL.Set).StringVar(&c.defaultRedirectURL.Value) - c.CmdClause.Flag("ipAnonimization", "Agents will anonymize IP addresses according to the option selected.").Action(c.ipAnonimization.Set).StringVar(&c.ipAnonimization.Value) + c.CmdClause.Flag("IPAnonymization", "Agents will anonymize IP addresses according to the option selected.").Action(c.IPAnonymization.Set).StringVar(&c.IPAnonymization.Value) c.RegisterFlagBool(c.JSONFlag()) return &c @@ -96,8 +96,8 @@ func (c *UpdateCommand) Exec(_ io.Reader, out io.Writer) error { if c.defaultRedirectURL.WasSet { input.DefaultRedirectURL = &c.defaultRedirectURL.Value } - if c.ipAnonimization.WasSet { - input.IPAnonymization = &c.ipAnonimization.Value + if c.IPAnonymization.WasSet { + input.IPAnonymization = &c.IPAnonymization.Value } fc, ok := c.Globals.APIClient.(*fastly.Client) diff --git a/pkg/commands/objectstorage/accesskeys/accesskeys_test.go b/pkg/commands/objectstorage/accesskeys/accesskeys_test.go index d815bdcb2..4c34f8f89 100644 --- a/pkg/commands/objectstorage/accesskeys/accesskeys_test.go +++ b/pkg/commands/objectstorage/accesskeys/accesskeys_test.go @@ -110,7 +110,7 @@ func TestAccessKeysDelete(t *testing.T) { Status: http.StatusText(http.StatusBadRequest), Body: io.NopCloser(bytes.NewReader(testutil.GenJSON(` { - "title": "invalid Acess Key ID", + "title": "invalid Access Key ID", "status": 400 } `))), @@ -167,7 +167,7 @@ func TestAccessKeysGet(t *testing.T) { Status: http.StatusText(http.StatusBadRequest), Body: io.NopCloser(bytes.NewReader(testutil.GenJSON(` { - "title": "invalid Acess Key ID", + "title": "invalid Access Key ID", "status": 400 } `))), @@ -303,11 +303,11 @@ Created (UTC): 2021-06-15 23:00 `) + "\n" var listAccessKeysString = strings.TrimSpace(` -ID Secret Description Permssion Buckets Created At +D Secret Description Permission Buckets Created At foo bar bat read-only-objects all 0001-01-01 00:00:00 +0000 UTC foobar baz bizz read-only-objects [b1 b2] 0001-01-01 00:00:00 +0000 UTC `) + "\n" var zeroListAccessKeysString = strings.TrimSpace(` -ID Secret Description Permssion Buckets Created At +ID Secret Description Permission Buckets Created At `) + "\n" diff --git a/pkg/commands/service/imageoptimizerdefaults/imageoptimizer_test.go b/pkg/commands/service/imageoptimizerdefaults/imageoptimizer_test.go index 48fd47857..4fdbe7871 100644 --- a/pkg/commands/service/imageoptimizerdefaults/imageoptimizer_test.go +++ b/pkg/commands/service/imageoptimizerdefaults/imageoptimizer_test.go @@ -36,7 +36,7 @@ func TestImageOptimizerDefaultsUpdate(t *testing.T) { WantError: "problem with field 'ResizeFilter, Webp, WebpQuality, JpegType, JpegQuality, Upscale, AllowVideo': at least one of the available optional fields is required", }, { - Name: "valudate successful boolean updates of webp, upscale and allow-video", + Name: "validate successful boolean updates of webp, upscale and allow-video", Args: "--service-id 123 --version 1 --webp=true --upscale=false --allow-video=true", API: &mock.API{ ListVersionsFn: testutil.ListVersions, @@ -45,7 +45,7 @@ func TestImageOptimizerDefaultsUpdate(t *testing.T) { WantOutput: "Updated Image Optimizer default settings for service 123 (version 1)\n\nAllow Video: true\nJPEG Quality: 85\nJPEG Type: auto\nResize Filter: lanczos3\nUpscale: false\nWebP: true\nWebP Quality: 85\n", }, { - Name: "validate successful upate of the --resize, --webp-quality and --jpeg-quality flags", + Name: "validate successful update of the --resize, --webp-quality and --jpeg-quality flags", Args: "--service-id 123 --version 1 --resize-filter bicubic --webp-quality 90 --jpeg-quality 80", API: &mock.API{ ListVersionsFn: testutil.ListVersions, diff --git a/pkg/commands/service/logging/grafanacloudlogs/update.go b/pkg/commands/service/logging/grafanacloudlogs/update.go index a6757de40..ec22029f3 100644 --- a/pkg/commands/service/logging/grafanacloudlogs/update.go +++ b/pkg/commands/service/logging/grafanacloudlogs/update.go @@ -84,7 +84,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman Dst: &c.ServiceName.Value, }) c.CmdClause.Flag("user", "Your Grafana Cloud Logs User ID.").Action(c.User.Set).StringVar(&c.User.Value) - c.CmdClause.Flag("auth-token", "Your Granana Access Policy Token").Action(c.Token.Set).StringVar(&c.Token.Value) + c.CmdClause.Flag("auth-token", "Your Grafana Access Policy Token").Action(c.Token.Set).StringVar(&c.Token.Value) c.CmdClause.Flag("url", "URL of your Grafana Instance").Action(c.URL.Set).StringVar(&c.URL.Value) c.CmdClause.Flag("index", "Stream identifier").Action(c.Index.Set).StringVar(&c.Index.Value) return &c diff --git a/pkg/commands/service/ratelimit/ratelimit_test.go b/pkg/commands/service/ratelimit/ratelimit_test.go index 8ac03e9f3..f7104d104 100644 --- a/pkg/commands/service/ratelimit/ratelimit_test.go +++ b/pkg/commands/service/ratelimit/ratelimit_test.go @@ -143,7 +143,7 @@ func TestRateLimitList(t *testing.T) { testutil.RunCLIScenarios(t, []string{root.CommandName, sub.CommandName, "list"}, scenarios) } -func TesRateLimittUpdate(t *testing.T) { +func TesRateLimitUpdate(t *testing.T) { scenarios := []testutil.CLIScenario{ { Name: "validate UpdateERL API error", diff --git a/pkg/commands/service/service_test.go b/pkg/commands/service/service_test.go index 9fc3a3fab..da5c79215 100644 --- a/pkg/commands/service/service_test.go +++ b/pkg/commands/service/service_test.go @@ -365,7 +365,7 @@ func TestServiceDelete(t *testing.T) { for testcaseIdx := range scenarios { testcase := &scenarios[testcaseIdx] t.Run(strings.Join(testcase.args, " "), func(t *testing.T) { - // We're going to chdir to an temp environment, + // We're going to chdir to a temp environment, // so save the PWD to return to, afterwards. pwd, err := os.Getwd() if err != nil { diff --git a/pkg/commands/version/version_test.go b/pkg/commands/version/version_test.go index ba14e4ad5..779bbaa20 100644 --- a/pkg/commands/version/version_test.go +++ b/pkg/commands/version/version_test.go @@ -23,7 +23,7 @@ func TestVersion(t *testing.T) { t.Skip("skipping test due to unix specific mock shell script") } - // We're going to chdir to an temp environment, + // We're going to chdir to a temp environment, // so save the PWD to return to, afterwards. pwd, err := os.Getwd() if err != nil { diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 25ec9d48a..c705534bd 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -74,7 +74,7 @@ func TestConfigRead(t *testing.T) { for _, testcase := range scenarios { t.Run(testcase.name, func(t *testing.T) { - // We're going to chdir to an temp environment, + // We're going to chdir to a temp environment, // so save the PWD to return to, afterwards. pwd, err := os.Getwd() if err != nil { @@ -167,7 +167,7 @@ func TestConfigRead(t *testing.T) { // TestUseStatic validates legacy user data is migrated successfully. func TestUseStatic(t *testing.T) { - // We're going to chdir to an temp environment, + // We're going to chdir to a temp environment, // so save the PWD to return to, afterwards. pwd, err := os.Getwd() if err != nil { @@ -294,7 +294,7 @@ func TestInvalidConfig(t *testing.T) { for testcaseIdx := range scenarios { testcase := &scenarios[testcaseIdx] t.Run(testcase.Name, func(t *testing.T) { - // We're going to chdir to an temp environment, + // We're going to chdir to a temp environment, // so save the PWD to return to, afterwards. pwd, err := os.Getwd() if err != nil { diff --git a/pkg/errors/errors.go b/pkg/errors/errors.go index 14347a600..035c78c41 100644 --- a/pkg/errors/errors.go +++ b/pkg/errors/errors.go @@ -177,7 +177,7 @@ var ErrInvalidKVCombo = RemediationError{ } // ErrInvalidStdinFileDirCombo means the user provided more than one of --stdin, -// --file or --dir flags, which are mutally exclusive behaviours. +// --file or --dir flags, which are mutually exclusive behaviours. var ErrInvalidStdinFileDirCombo = RemediationError{ Inner: fmt.Errorf("invalid flag combination"), Remediation: "Use only one of --stdin, --file or --dir.", diff --git a/pkg/text/accesskey.go b/pkg/text/accesskey.go index 33a3bf568..5caccf47e 100644 --- a/pkg/text/accesskey.go +++ b/pkg/text/accesskey.go @@ -21,7 +21,7 @@ func PrintAccessKey(out io.Writer, accessKey *accesskeys.AccessKey) { // PrintAccessKeyTbl displays access keys in a table format. func PrintAccessKeyTbl(out io.Writer, accessKeys []accesskeys.AccessKey) { tbl := NewTable(out) - tbl.AddHeader("ID", "Secret", "Description", "Permssion", "Buckets", "Created At") + tbl.AddHeader("ID", "Secret", "Description", "Permission", "Buckets", "Created At") if accessKeys == nil { tbl.Print() diff --git a/pkg/text/kvstore.go b/pkg/text/kvstore.go index bad7fe20f..e36171469 100644 --- a/pkg/text/kvstore.go +++ b/pkg/text/kvstore.go @@ -34,7 +34,7 @@ func PrintKVStoreKeys(out io.Writer, prefix string, keys []string) { } } -// PrintKVStoreKeyValue pretty prints a value from an kv store to a +// PrintKVStoreKeyValue pretty prints a value from a kv store to a // given io.Writer. Consumers can provide a prefix string which will be used as // a prefix to each line, useful for indentation. func PrintKVStoreKeyValue(out io.Writer, prefix string, key, value string) { From e4a04daea4777db212650a1d25f62e2105df088d Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Tue, 28 Apr 2026 10:27:45 -0400 Subject: [PATCH 2/6] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b730455ab..3ac57a72b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Breaking: +- fix(ngwaf/workspace): change flag name to match API spec ((#1768)[https://github.com/fastly/cli/pull/1768]) + ### Bug Fixes: - fix(compute/deploy): remove compute trial activation code because trials no longer exist ([#1730](https://github.com/fastly/cli/pull/1730)) From 4615aaa99e8e969049943ab655bdad7d0b4280b6 Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Tue, 28 Apr 2026 10:28:54 -0400 Subject: [PATCH 3/6] add missing I --- pkg/commands/objectstorage/accesskeys/accesskeys_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/objectstorage/accesskeys/accesskeys_test.go b/pkg/commands/objectstorage/accesskeys/accesskeys_test.go index 4c34f8f89..6a67c7b7f 100644 --- a/pkg/commands/objectstorage/accesskeys/accesskeys_test.go +++ b/pkg/commands/objectstorage/accesskeys/accesskeys_test.go @@ -303,7 +303,7 @@ Created (UTC): 2021-06-15 23:00 `) + "\n" var listAccessKeysString = strings.TrimSpace(` -D Secret Description Permission Buckets Created At +ID Secret Description Permission Buckets Created At foo bar bat read-only-objects all 0001-01-01 00:00:00 +0000 UTC foobar baz bizz read-only-objects [b1 b2] 0001-01-01 00:00:00 +0000 UTC `) + "\n" From 6ce529401c930e83330e0aa6a665ad390d935eac Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Tue, 28 Apr 2026 10:35:28 -0400 Subject: [PATCH 4/6] change flag to be lowercase --- pkg/commands/ngwaf/workspace/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/ngwaf/workspace/update.go b/pkg/commands/ngwaf/workspace/update.go index 9decd8359..5854b0108 100644 --- a/pkg/commands/ngwaf/workspace/update.go +++ b/pkg/commands/ngwaf/workspace/update.go @@ -55,7 +55,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data) *UpdateComman c.CmdClause.Flag("clientIPHeaders", "Specify the request header containing the client IP address. Input accepted as colon separated string.").Action(c.clientIPHeaders.Set).StringVar(&c.clientIPHeaders.Value) c.CmdClause.Flag("defaultBlockingCode", "Default status code that is returned when a request to your web application is blocked.").Action(c.defaultBlockingCode.Set).IntVar(&c.defaultBlockingCode.Value) c.CmdClause.Flag("defaultRedirectURL", "Redirect url to be used if code 301 or 302 is used.").Action(c.defaultRedirectURL.Set).StringVar(&c.defaultRedirectURL.Value) - c.CmdClause.Flag("IPAnonymization", "Agents will anonymize IP addresses according to the option selected.").Action(c.IPAnonymization.Set).StringVar(&c.IPAnonymization.Value) + c.CmdClause.Flag("ipAnonymization", "Agents will anonymize IP addresses according to the option selected.").Action(c.IPAnonymization.Set).StringVar(&c.IPAnonymization.Value) c.RegisterFlagBool(c.JSONFlag()) return &c From 6117f402dd0c7b165c278870543c40e0e3dd704d Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Tue, 28 Apr 2026 10:44:10 -0400 Subject: [PATCH 5/6] fix command struct --- pkg/commands/ngwaf/workspace/create.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/commands/ngwaf/workspace/create.go b/pkg/commands/ngwaf/workspace/create.go index 8a6ba2159..969a0c7a6 100644 --- a/pkg/commands/ngwaf/workspace/create.go +++ b/pkg/commands/ngwaf/workspace/create.go @@ -31,7 +31,7 @@ type CreateCommand struct { defaultBlockingCode argparser.OptionalInt defaultRedirectURL argparser.OptionalString clientIPHeaders argparser.OptionalString - IPAnonymization argparser.OptionalString + ipAnonymization argparser.OptionalString } // NewCreateCommand returns a usable command registered under the parent. @@ -53,7 +53,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data) *CreateComman c.CmdClause.Flag("clientIPHeaders", "Specify the request header containing the client IP address. Input accepted as colon separated string.").Action(c.clientIPHeaders.Set).StringVar(&c.clientIPHeaders.Value) c.CmdClause.Flag("defaultBlockingCode", "Default status code that is returned when a request to your web application is blocked.").Action(c.defaultBlockingCode.Set).IntVar(&c.defaultBlockingCode.Value) c.CmdClause.Flag("defaultRedirectURL", "Redirect url to be used if code 301 or 302 is used.").Action(c.defaultRedirectURL.Set).StringVar(&c.defaultRedirectURL.Value) - c.CmdClause.Flag("IPAnonymization", "Agents will anonymize IP addresses according to the option selected.").Action(c.IPAnonymization.Set).StringVar(&c.IPAnonymization.Value) + c.CmdClause.Flag("IPAnonymization", "Agents will anonymize IP addresses according to the option selected.").Action(c.ipAnonymization.Set).StringVar(&c.ipAnonymization.Value) c.RegisterFlagBool(c.JSONFlag()) return &c @@ -85,8 +85,8 @@ func (c *CreateCommand) Exec(_ io.Reader, out io.Writer) error { if c.defaultRedirectURL.WasSet { input.DefaultRedirectURL = &c.defaultRedirectURL.Value } - if c.IPAnonymization.WasSet { - input.IPAnonymization = &c.IPAnonymization.Value + if c.ipAnonymization.WasSet { + input.IPAnonymization = &c.ipAnonymization.Value } fc, ok := c.Globals.APIClient.(*fastly.Client) From 459d308397a78ac5e1a0bd3fb54a744b07ad9ef8 Mon Sep 17 00:00:00 2001 From: Anthony Gomez Date: Tue, 28 Apr 2026 10:51:06 -0400 Subject: [PATCH 6/6] Update CHANGELOG.md Co-authored-by: Richard Carillo <77027245+rcaril@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ac57a72b..b3f1e67c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Breaking: -- fix(ngwaf/workspace): change flag name to match API spec ((#1768)[https://github.com/fastly/cli/pull/1768]) +- breaking(ngwaf/workspace): change flag name to match API spec ((#1768)[https://github.com/fastly/cli/pull/1768]) ### Bug Fixes: