diff --git a/internal/temporalcli/commands.gen.go b/internal/temporalcli/commands.gen.go index 1b44438b..acacd436 100644 --- a/internal/temporalcli/commands.gen.go +++ b/internal/temporalcli/commands.gen.go @@ -2866,7 +2866,7 @@ func NewTemporalWorkerDeploymentCommand(cctx *CommandContext, parent *TemporalWo s.Command.AddCommand(&NewTemporalWorkerDeploymentManagerIdentityCommand(cctx, &s).Command) s.Command.AddCommand(&NewTemporalWorkerDeploymentSetCurrentVersionCommand(cctx, &s).Command) s.Command.AddCommand(&NewTemporalWorkerDeploymentSetRampingVersionCommand(cctx, &s).Command) - s.Command.AddCommand(&NewTemporalWorkerDeploymentUpdateMetadataVersionCommand(cctx, &s).Command) + s.Command.AddCommand(&NewTemporalWorkerDeploymentUpdateVersionMetadataCommand(cctx, &s).Command) return &s } @@ -3158,7 +3158,7 @@ func NewTemporalWorkerDeploymentSetRampingVersionCommand(cctx *CommandContext, p return &s } -type TemporalWorkerDeploymentUpdateMetadataVersionCommand struct { +type TemporalWorkerDeploymentUpdateVersionMetadataCommand struct { Parent *TemporalWorkerDeploymentCommand Command cobra.Command DeploymentVersionOptions @@ -3166,16 +3166,16 @@ type TemporalWorkerDeploymentUpdateMetadataVersionCommand struct { RemoveEntries []string } -func NewTemporalWorkerDeploymentUpdateMetadataVersionCommand(cctx *CommandContext, parent *TemporalWorkerDeploymentCommand) *TemporalWorkerDeploymentUpdateMetadataVersionCommand { - var s TemporalWorkerDeploymentUpdateMetadataVersionCommand +func NewTemporalWorkerDeploymentUpdateVersionMetadataCommand(cctx *CommandContext, parent *TemporalWorkerDeploymentCommand) *TemporalWorkerDeploymentUpdateVersionMetadataCommand { + var s TemporalWorkerDeploymentUpdateVersionMetadataCommand s.Parent = parent s.Command.DisableFlagsInUseLine = true - s.Command.Use = "update-metadata-version [flags]" + s.Command.Use = "update-version-metadata [flags]" s.Command.Short = "Change user-provided metadata for a Version" if hasHighlighting { - s.Command.Long = "\x1b[1m+---------------------------------------------------------------------+\n| CAUTION: Worker Deployment is experimental. Deployment commands are |\n| subject to change. |\n+---------------------------------------------------------------------+\x1b[0m\n\nUpdate metadata associated with a Worker Deployment Version.\n\nFor example:\n\n\x1b[1m temporal worker deployment update-metadata-version \\\n --deployment-name YourDeploymentName --build-id YourBuildID \\\n --metadata bar=1 \\\n --metadata foo=true\x1b[0m\n\nThe current metadata is also returned with \x1b[1mdescribe-version\x1b[0m:\n\x1b[1m temporal worker deployment describe-version \\\n --deployment-name YourDeploymentName --build-id YourBuildID \\\x1b[0m" + s.Command.Long = "\x1b[1m+---------------------------------------------------------------------+\n| CAUTION: Worker Deployment is experimental. Deployment commands are |\n| subject to change. |\n+---------------------------------------------------------------------+\x1b[0m\n\nUpdate metadata associated with a Worker Deployment Version.\n\nFor example:\n\n\x1b[1m temporal worker deployment update-version-metadata \\\n --deployment-name YourDeploymentName --build-id YourBuildID \\\n --metadata bar=1 \\\n --metadata foo=true\x1b[0m\n\nThe current metadata is also returned with \x1b[1mdescribe-version\x1b[0m:\n\x1b[1m temporal worker deployment describe-version \\\n --deployment-name YourDeploymentName --build-id YourBuildID \\\x1b[0m" } else { - s.Command.Long = "```\n+---------------------------------------------------------------------+\n| CAUTION: Worker Deployment is experimental. Deployment commands are |\n| subject to change. |\n+---------------------------------------------------------------------+\n```\n\nUpdate metadata associated with a Worker Deployment Version.\n\nFor example:\n\n```\n temporal worker deployment update-metadata-version \\\n --deployment-name YourDeploymentName --build-id YourBuildID \\\n --metadata bar=1 \\\n --metadata foo=true\n```\n\nThe current metadata is also returned with `describe-version`:\n```\n temporal worker deployment describe-version \\\n --deployment-name YourDeploymentName --build-id YourBuildID \\\n```" + s.Command.Long = "```\n+---------------------------------------------------------------------+\n| CAUTION: Worker Deployment is experimental. Deployment commands are |\n| subject to change. |\n+---------------------------------------------------------------------+\n```\n\nUpdate metadata associated with a Worker Deployment Version.\n\nFor example:\n\n```\n temporal worker deployment update-version-metadata \\\n --deployment-name YourDeploymentName --build-id YourBuildID \\\n --metadata bar=1 \\\n --metadata foo=true\n```\n\nThe current metadata is also returned with `describe-version`:\n```\n temporal worker deployment describe-version \\\n --deployment-name YourDeploymentName --build-id YourBuildID \\\n```" } s.Command.Args = cobra.NoArgs s.Command.Flags().StringArrayVar(&s.Metadata, "metadata", nil, "Set deployment metadata using `KEY=\"VALUE\"` pairs. Keys must be identifiers, and values must be JSON values. For example: `YourKey={\"your\": \"value\"}` Can be passed multiple times.") diff --git a/internal/temporalcli/commands.worker.deployment.go b/internal/temporalcli/commands.worker.deployment.go index 1b535c7f..59975960 100644 --- a/internal/temporalcli/commands.worker.deployment.go +++ b/internal/temporalcli/commands.worker.deployment.go @@ -679,7 +679,7 @@ func (c *TemporalWorkerDeploymentSetRampingVersionCommand) run(cctx *CommandCont return nil } -func (c *TemporalWorkerDeploymentUpdateMetadataVersionCommand) run(cctx *CommandContext, args []string) error { +func (c *TemporalWorkerDeploymentUpdateVersionMetadataCommand) run(cctx *CommandContext, args []string) error { cl, err := dialClient(cctx, &c.Parent.Parent.ClientOptions) if err != nil { return err diff --git a/internal/temporalcli/commands.worker.deployment_test.go b/internal/temporalcli/commands.worker.deployment_test.go index 3ceb4c18..86df4368 100644 --- a/internal/temporalcli/commands.worker.deployment_test.go +++ b/internal/temporalcli/commands.worker.deployment_test.go @@ -137,7 +137,7 @@ func (s *SharedServerSuite) TestDeployment_Set_Current_Version() { // set metadata res = s.Execute( - "worker", "deployment", "update-metadata-version", + "worker", "deployment", "update-version-metadata", "--address", s.Address(), "--deployment-name", version.DeploymentName, "--build-id", version.BuildID, "--metadata", "bar=1", @@ -154,7 +154,7 @@ func (s *SharedServerSuite) TestDeployment_Set_Current_Version() { // remove metadata res = s.Execute( - "worker", "deployment", "update-metadata-version", + "worker", "deployment", "update-version-metadata", "--address", s.Address(), "--deployment-name", version.DeploymentName, "--build-id", version.BuildID, "--remove-entries", "bar", diff --git a/internal/temporalcli/commands.yaml b/internal/temporalcli/commands.yaml index 0bc3b163..049e82cb 100644 --- a/internal/temporalcli/commands.yaml +++ b/internal/temporalcli/commands.yaml @@ -843,7 +843,7 @@ commands: - worker deployment set-current-version - worker deployment set-ramping-version - worker deployment delete-version - - worker deployment update-metadata-version + - worker deployment update-version-metadata - worker deployment manager-identity - name: temporal worker deployment describe @@ -1117,7 +1117,7 @@ commands: type: bool description: Don't prompt to confirm set Ramping Version. - - name: temporal worker deployment update-metadata-version + - name: temporal worker deployment update-version-metadata summary: Change user-provided metadata for a Version description: | ``` @@ -1132,7 +1132,7 @@ commands: For example: ``` - temporal worker deployment update-metadata-version \ + temporal worker deployment update-version-metadata \ --deployment-name YourDeploymentName --build-id YourBuildID \ --metadata bar=1 \ --metadata foo=true