Skip to content

Commit 4239a26

Browse files
authored
Rename update-metadata-version command to update-version-metadata (#920)
<!--- Note to EXTERNAL Contributors --> <!-- Thanks for opening a PR! If it is a significant code change, please **make sure there is an open issue** for this. We work best with you when we have accepted the idea first before you code. --> <!--- For ALL Contributors 👇 --> ## What was changed WISOTT ## Why? The old name is misleading because the command changes the metadata of a version, not the version of the metadata! ## Checklist <!--- add/delete as needed ---> 1. Closes <!-- add issue number here --> 2. How was this tested: <!--- Please describe how you tested your changes/how we can test them --> 3. Any docs updates needed? <!--- update README if applicable or point out where to update docs.temporal.io -->
1 parent d510fd8 commit 4239a26

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

internal/temporalcli/commands.gen.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2866,7 +2866,7 @@ func NewTemporalWorkerDeploymentCommand(cctx *CommandContext, parent *TemporalWo
28662866
s.Command.AddCommand(&NewTemporalWorkerDeploymentManagerIdentityCommand(cctx, &s).Command)
28672867
s.Command.AddCommand(&NewTemporalWorkerDeploymentSetCurrentVersionCommand(cctx, &s).Command)
28682868
s.Command.AddCommand(&NewTemporalWorkerDeploymentSetRampingVersionCommand(cctx, &s).Command)
2869-
s.Command.AddCommand(&NewTemporalWorkerDeploymentUpdateMetadataVersionCommand(cctx, &s).Command)
2869+
s.Command.AddCommand(&NewTemporalWorkerDeploymentUpdateVersionMetadataCommand(cctx, &s).Command)
28702870
return &s
28712871
}
28722872

@@ -3158,24 +3158,24 @@ func NewTemporalWorkerDeploymentSetRampingVersionCommand(cctx *CommandContext, p
31583158
return &s
31593159
}
31603160

3161-
type TemporalWorkerDeploymentUpdateMetadataVersionCommand struct {
3161+
type TemporalWorkerDeploymentUpdateVersionMetadataCommand struct {
31623162
Parent *TemporalWorkerDeploymentCommand
31633163
Command cobra.Command
31643164
DeploymentVersionOptions
31653165
Metadata []string
31663166
RemoveEntries []string
31673167
}
31683168

3169-
func NewTemporalWorkerDeploymentUpdateMetadataVersionCommand(cctx *CommandContext, parent *TemporalWorkerDeploymentCommand) *TemporalWorkerDeploymentUpdateMetadataVersionCommand {
3170-
var s TemporalWorkerDeploymentUpdateMetadataVersionCommand
3169+
func NewTemporalWorkerDeploymentUpdateVersionMetadataCommand(cctx *CommandContext, parent *TemporalWorkerDeploymentCommand) *TemporalWorkerDeploymentUpdateVersionMetadataCommand {
3170+
var s TemporalWorkerDeploymentUpdateVersionMetadataCommand
31713171
s.Parent = parent
31723172
s.Command.DisableFlagsInUseLine = true
3173-
s.Command.Use = "update-metadata-version [flags]"
3173+
s.Command.Use = "update-version-metadata [flags]"
31743174
s.Command.Short = "Change user-provided metadata for a Version"
31753175
if hasHighlighting {
3176-
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"
3176+
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"
31773177
} else {
3178-
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```"
3178+
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```"
31793179
}
31803180
s.Command.Args = cobra.NoArgs
31813181
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.")

internal/temporalcli/commands.worker.deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ func (c *TemporalWorkerDeploymentSetRampingVersionCommand) run(cctx *CommandCont
679679
return nil
680680
}
681681

682-
func (c *TemporalWorkerDeploymentUpdateMetadataVersionCommand) run(cctx *CommandContext, args []string) error {
682+
func (c *TemporalWorkerDeploymentUpdateVersionMetadataCommand) run(cctx *CommandContext, args []string) error {
683683
cl, err := dialClient(cctx, &c.Parent.Parent.ClientOptions)
684684
if err != nil {
685685
return err

internal/temporalcli/commands.worker.deployment_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (s *SharedServerSuite) TestDeployment_Set_Current_Version() {
137137

138138
// set metadata
139139
res = s.Execute(
140-
"worker", "deployment", "update-metadata-version",
140+
"worker", "deployment", "update-version-metadata",
141141
"--address", s.Address(),
142142
"--deployment-name", version.DeploymentName, "--build-id", version.BuildID,
143143
"--metadata", "bar=1",
@@ -154,7 +154,7 @@ func (s *SharedServerSuite) TestDeployment_Set_Current_Version() {
154154

155155
// remove metadata
156156
res = s.Execute(
157-
"worker", "deployment", "update-metadata-version",
157+
"worker", "deployment", "update-version-metadata",
158158
"--address", s.Address(),
159159
"--deployment-name", version.DeploymentName, "--build-id", version.BuildID,
160160
"--remove-entries", "bar",

internal/temporalcli/commands.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ commands:
843843
- worker deployment set-current-version
844844
- worker deployment set-ramping-version
845845
- worker deployment delete-version
846-
- worker deployment update-metadata-version
846+
- worker deployment update-version-metadata
847847
- worker deployment manager-identity
848848

849849
- name: temporal worker deployment describe
@@ -1117,7 +1117,7 @@ commands:
11171117
type: bool
11181118
description: Don't prompt to confirm set Ramping Version.
11191119

1120-
- name: temporal worker deployment update-metadata-version
1120+
- name: temporal worker deployment update-version-metadata
11211121
summary: Change user-provided metadata for a Version
11221122
description: |
11231123
```
@@ -1132,7 +1132,7 @@ commands:
11321132
For example:
11331133
11341134
```
1135-
temporal worker deployment update-metadata-version \
1135+
temporal worker deployment update-version-metadata \
11361136
--deployment-name YourDeploymentName --build-id YourBuildID \
11371137
--metadata bar=1 \
11381138
--metadata foo=true

0 commit comments

Comments
 (0)