Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions internal/temporalcli/commands.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -3158,24 +3158,24 @@ func NewTemporalWorkerDeploymentSetRampingVersionCommand(cctx *CommandContext, p
return &s
}

type TemporalWorkerDeploymentUpdateMetadataVersionCommand struct {
type TemporalWorkerDeploymentUpdateVersionMetadataCommand struct {
Parent *TemporalWorkerDeploymentCommand
Command cobra.Command
DeploymentVersionOptions
Metadata []string
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.")
Expand Down
2 changes: 1 addition & 1 deletion internal/temporalcli/commands.worker.deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions internal/temporalcli/commands.worker.deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions internal/temporalcli/commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
```
Expand All @@ -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
Expand Down