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
18 changes: 9 additions & 9 deletions temporalcli/commands.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func NewTemporalCommand(cctx *CommandContext) *TemporalCommand {
s.Command.PersistentFlags().StringVar(&s.Env, "env", "default", "Active environment name (`ENV`).")
cctx.BindFlagEnvVar(s.Command.PersistentFlags().Lookup("env"), "TEMPORAL_ENV")
s.Command.PersistentFlags().StringVar(&s.EnvFile, "env-file", "", "Path to environment settings file. Defaults to `$HOME/.config/temporalio/temporal.yaml`.")
s.Command.PersistentFlags().StringVar(&s.ConfigFile, "config-file", "", "File path to read TOML config from, defaults to `$CONFIG_PATH/temporal/temporal.toml` where `$CONFIG_PATH` is defined as `$HOME/.config` on Unix, \"$HOME/Library/Application Support\" on macOS, and %AppData% on Windows. EXPERIMENTAL.")
s.Command.PersistentFlags().StringVar(&s.ConfigFile, "config-file", "", "File path to read TOML config from, defaults to `$CONFIG_PATH/temporal/temporal.toml` where `$CONFIG_PATH` is defined as `$HOME/.config` on Unix, `$HOME/Library/Application Support` on macOS, and `%AppData%` on Windows. EXPERIMENTAL.")
s.Command.PersistentFlags().StringVar(&s.Profile, "profile", "", "Profile to use for config file. EXPERIMENTAL.")
s.Command.PersistentFlags().BoolVar(&s.DisableConfigFile, "disable-config-file", false, "If set, disables loading environment config from config file. EXPERIMENTAL.")
s.Command.PersistentFlags().BoolVar(&s.DisableConfigEnv, "disable-config-env", false, "If set, disables loading environment config from environment variables. EXPERIMENTAL.")
Expand Down Expand Up @@ -1332,14 +1332,14 @@ func NewTemporalOperatorNamespaceCreateCommand(cctx *CommandContext, parent *Tem
s.Command.Use = "create [flags]"
s.Command.Short = "Register a new Namespace"
if hasHighlighting {
s.Command.Long = "Create a new Namespace on the Temporal Service:\n\n\x1b[1mtemporal operator namespace create \\\n --namespace YourNewNamespaceName \\\n [options]\x1b[0m`\n\nCreate a Namespace with multi-region data replication:\n\n\x1b[1mtemporal operator namespace create \\\n --global \\\n --namespace YourNewNamespaceName\x1b[0m\n\nConfigure settings like retention and Visibility Archival State as needed.\nFor example, the Visibility Archive can be set on a separate URI:\n\n\x1b[1mtemporal operator namespace create \\\n --retention 5d \\\n --visibility-archival-state enabled \\\n --visibility-uri YourURI \\\n --namespace YourNewNamespaceName\x1b[0m\n\nNote: URI values for archival states can't be changed once enabled."
s.Command.Long = "Create a new Namespace on the Temporal Service:\n\n\x1b[1mtemporal operator namespace create \\\n --namespace YourNewNamespaceName \\\n [options]\x1b[0m\n\nCreate a Namespace with multi-region data replication:\n\n\x1b[1mtemporal operator namespace create \\\n --global \\\n --namespace YourNewNamespaceName\x1b[0m\n\nConfigure settings like retention and Visibility Archival State as needed.\nFor example, the Visibility Archive can be set on a separate URI:\n\n\x1b[1mtemporal operator namespace create \\\n --retention 5d \\\n --visibility-archival-state enabled \\\n --visibility-uri YourURI \\\n --namespace YourNewNamespaceName\x1b[0m\n\nNote: URI values for archival states can't be changed once enabled."
} else {
s.Command.Long = "Create a new Namespace on the Temporal Service:\n\n```\ntemporal operator namespace create \\\n --namespace YourNewNamespaceName \\\n [options]\n````\n\nCreate a Namespace with multi-region data replication:\n\n```\ntemporal operator namespace create \\\n --global \\\n --namespace YourNewNamespaceName\n```\n\nConfigure settings like retention and Visibility Archival State as needed.\nFor example, the Visibility Archive can be set on a separate URI:\n\n```\ntemporal operator namespace create \\\n --retention 5d \\\n --visibility-archival-state enabled \\\n --visibility-uri YourURI \\\n --namespace YourNewNamespaceName\n```\n\nNote: URI values for archival states can't be changed once enabled."
s.Command.Long = "Create a new Namespace on the Temporal Service:\n\n```\ntemporal operator namespace create \\\n --namespace YourNewNamespaceName \\\n [options]\n```\n\nCreate a Namespace with multi-region data replication:\n\n```\ntemporal operator namespace create \\\n --global \\\n --namespace YourNewNamespaceName\n```\n\nConfigure settings like retention and Visibility Archival State as needed.\nFor example, the Visibility Archive can be set on a separate URI:\n\n```\ntemporal operator namespace create \\\n --retention 5d \\\n --visibility-archival-state enabled \\\n --visibility-uri YourURI \\\n --namespace YourNewNamespaceName\n```\n\nNote: URI values for archival states can't be changed once enabled."
}
s.Command.Args = cobra.MaximumNArgs(1)
s.Command.Flags().StringVar(&s.ActiveCluster, "active-cluster", "", "Active Cluster (Service) name.")
s.Command.Flags().StringArrayVar(&s.Cluster, "cluster", nil, "Cluster (Service) names for Namespace creation. Can be passed multiple times.")
s.Command.Flags().StringArrayVar(&s.Data, "data", nil, "Namespace data as `KEY=VALUE` pairs. Keys must be identifiers, and values must be JSON values. For example: 'YourKey={\"your\": \"value\"}'. Can be passed multiple times.")
s.Command.Flags().StringArrayVar(&s.Data, "data", nil, "Namespace data as `KEY=VALUE` pairs. Keys must be identifiers, and values must be JSON values. For example: `YourKey={\"your\": \"value\"}` Can be passed multiple times.")
s.Command.Flags().StringVar(&s.Description, "description", "", "Namespace description.")
s.Command.Flags().StringVar(&s.Email, "email", "", "Owner email.")
s.Command.Flags().BoolVar(&s.Global, "global", false, "Enable multi-region data replication.")
Expand Down Expand Up @@ -1469,7 +1469,7 @@ func NewTemporalOperatorNamespaceUpdateCommand(cctx *CommandContext, parent *Tem
s.Command.Args = cobra.MaximumNArgs(1)
s.Command.Flags().StringVar(&s.ActiveCluster, "active-cluster", "", "Active Cluster (Service) name.")
s.Command.Flags().StringArrayVar(&s.Cluster, "cluster", nil, "Cluster (Service) names.")
s.Command.Flags().StringArrayVar(&s.Data, "data", nil, "Namespace data as `KEY=VALUE` pairs. Keys must be identifiers, and values must be JSON values. For example: 'YourKey={\"your\": \"value\"}'. Can be passed multiple times.")
s.Command.Flags().StringArrayVar(&s.Data, "data", nil, "Namespace data as `KEY=VALUE` pairs. Keys must be identifiers, and values must be JSON values. For example: `YourKey={\"your\": \"value\"}` Can be passed multiple times.")
s.Command.Flags().StringVar(&s.Description, "description", "", "Namespace description.")
s.Command.Flags().StringVar(&s.Email, "email", "", "Owner email.")
s.Command.Flags().BoolVar(&s.PromoteGlobal, "promote-global", false, "Enable multi-region data replication.")
Expand Down Expand Up @@ -2136,7 +2136,7 @@ func NewTemporalServerStartDevCommand(cctx *CommandContext, parent *TemporalServ
s.Command.Flags().StringVar(&s.UiAssetPath, "ui-asset-path", "", "UI custom assets path.")
s.Command.Flags().StringVar(&s.UiCodecEndpoint, "ui-codec-endpoint", "", "UI remote codec HTTP endpoint.")
s.Command.Flags().StringArrayVar(&s.SqlitePragma, "sqlite-pragma", nil, "SQLite pragma statements in \"PRAGMA=VALUE\" format.")
s.Command.Flags().StringArrayVar(&s.DynamicConfigValue, "dynamic-config-value", nil, "Dynamic configuration value using `KEY=VALUE` pairs. Keys must be identifiers, and values must be JSON values. For example: 'YourKey=\"YourString\"'. Can be passed multiple times.")
s.Command.Flags().StringArrayVar(&s.DynamicConfigValue, "dynamic-config-value", nil, "Dynamic configuration value using `KEY=VALUE` pairs. Keys must be identifiers, and values must be JSON values. For example: `YourKey=\"YourString\"` Can be passed multiple times.")
s.Command.Flags().BoolVar(&s.LogConfig, "log-config", false, "Log the server config to stderr.")
s.Command.Flags().StringArrayVar(&s.SearchAttribute, "search-attribute", nil, "Search attributes to register using `KEY=VALUE` pairs. Keys must be identifiers, and values must be the search attribute type, which is one of the following: Text, Keyword, Int, Double, Bool, Datetime, KeywordList.")
s.Command.Run = func(c *cobra.Command, args []string) {
Expand Down Expand Up @@ -3208,7 +3208,7 @@ func NewTemporalWorkerDeploymentUpdateMetadataVersionCommand(cctx *CommandContex
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.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.")
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.")
s.Command.Flags().StringArrayVar(&s.RemoveEntries, "remove-entries", nil, "Keys of entries to be deleted from metadata. Can be passed multiple times.")
s.DeploymentVersionOptions.buildFlags(cctx, s.Command.Flags())
s.Command.Run = func(c *cobra.Command, args []string) {
Expand Down Expand Up @@ -3565,9 +3565,9 @@ func NewTemporalWorkflowListCommand(cctx *CommandContext, parent *TemporalWorkfl
s.Command.Use = "list [flags]"
s.Command.Short = "Show Workflow Executions"
if hasHighlighting {
s.Command.Long = "List Workflow Executions. The optional \x1b[1m--query\x1b[0m limits the output to\nWorkflows matching a Query:\n\n\x1b[1mtemporal workflow list \\\n --query YourQuery\x1b[1m\x1b[0m\n\nVisit https://docs.temporal.io/visibility to read more about Search Attributes\nand Query creation. See \x1b[0mtemporal batch --help` for a quick reference.\n\nView a list of archived Workflow Executions:\n\n\x1b[1mtemporal workflow list \\\n --archived\x1b[0m"
s.Command.Long = "List Workflow Executions. The optional \x1b[1m--query\x1b[0m limits the output to\nWorkflows matching a Query:\n\n\x1b[1mtemporal workflow list \\\n --query YourQuery\x1b[0m\n\nVisit https://docs.temporal.io/visibility to read more about Search Attributes\nand Query creation. See \x1b[1mtemporal batch --help\x1b[0m for a quick reference.\n\nView a list of archived Workflow Executions:\n\n\x1b[1mtemporal workflow list \\\n --archived\x1b[0m"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyone know why the ANSI escapes changed here? Haven't tested in a terminal but the new version LGTM. (1m is a transition to bold and 0m is a transition that removes all flags.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is related to this change; previously there was an extraneous hanging backtick on the code block for temporal workflow list --query YourQuery, so the parser that creates the highlighted version of the help text may have gotten a bit confused. Here's how it looks today:

image

With this patch:

image

This is actually the exact typo that I noticed that sent me down this rabbit hole 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks for looking into this.

} else {
s.Command.Long = "List Workflow Executions. The optional `--query` limits the output to\nWorkflows matching a Query:\n\n```\ntemporal workflow list \\\n --query YourQuery`\n```\n\nVisit https://docs.temporal.io/visibility to read more about Search Attributes\nand Query creation. See `temporal batch --help` for a quick reference.\n\nView a list of archived Workflow Executions:\n\n```\ntemporal workflow list \\\n --archived\n```"
s.Command.Long = "List Workflow Executions. The optional `--query` limits the output to\nWorkflows matching a Query:\n\n```\ntemporal workflow list \\\n --query YourQuery\n```\n\nVisit https://docs.temporal.io/visibility to read more about Search Attributes\nand Query creation. See `temporal batch --help` for a quick reference.\n\nView a list of archived Workflow Executions:\n\n```\ntemporal workflow list \\\n --archived\n```"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVarP(&s.Query, "query", "q", "", "Content for an SQL-like `QUERY` List Filter.")
Expand Down
20 changes: 10 additions & 10 deletions temporalcli/commandsgen/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# temporal env set \
# --env prod \
# --key tls-cert-path \
# --value /home/my-user/certs/cluster.cert`
# --value /home/my-user/certs/cluster.cert
# ```
# * No: `temporal env set prod.tls-cert-path /home/my-user/certs/cluster.cert`.
# * Split invocation samples to multiple lines.
Expand Down Expand Up @@ -113,7 +113,7 @@

# * name, summary, and descrption are required fields. All other fields are optional.
# * Available option types are `bool`, `duration`, `int`, `float`, `string`, `string[]`,
# `string-enum`, string-enum[], or `timestamp`.
# `string-enum`, `string-enum[]`, or `timestamp`.
# * Include a new-line after each command entry.

# OPTION SET OVERVIEW
Expand Down Expand Up @@ -166,8 +166,8 @@ commands:
description: |
File path to read TOML config from, defaults to
`$CONFIG_PATH/temporal/temporal.toml` where `$CONFIG_PATH` is defined
as `$HOME/.config` on Unix, "$HOME/Library/Application Support" on
macOS, and %AppData% on Windows.
as `$HOME/.config` on Unix, `$HOME/Library/Application Support` on
macOS, and `%AppData%` on Windows.
experimental: true
implied-env: TEMPORAL_CONFIG_FILE
- name: profile
Expand Down Expand Up @@ -1251,7 +1251,7 @@ commands:
description: |
Set deployment metadata using `KEY="VALUE"` pairs.
Keys must be identifiers, and values must be JSON values.
For example: 'YourKey={"your": "value"}'.
For example: `YourKey={"your": "value"}`
Can be passed multiple times.
- name: remove-entries
type: string[]
Expand Down Expand Up @@ -1768,7 +1768,7 @@ commands:
temporal operator namespace create \
--namespace YourNewNamespaceName \
[options]
````
```

Create a Namespace with multi-region data replication:

Expand Down Expand Up @@ -1805,7 +1805,7 @@ commands:
description: |
Namespace data as `KEY=VALUE` pairs.
Keys must be identifiers, and values must be JSON values.
For example: 'YourKey={"your": "value"}'.
For example: `YourKey={"your": "value"}`
Can be passed multiple times.
- name: description
type: string
Expand Down Expand Up @@ -1945,7 +1945,7 @@ commands:
description: |
Namespace data as `KEY=VALUE` pairs.
Keys must be identifiers, and values must be JSON values.
For example: 'YourKey={"your": "value"}'.
For example: `YourKey={"your": "value"}`
Can be passed multiple times.
- name: description
type: string
Expand Down Expand Up @@ -2597,7 +2597,7 @@ commands:
description: |
Dynamic configuration value using `KEY=VALUE` pairs.
Keys must be identifiers, and values must be JSON values.
For example: 'YourKey="YourString"'.
For example: `YourKey="YourString"`
Can be passed multiple times.
- name: log-config
type: bool
Expand Down Expand Up @@ -3698,7 +3698,7 @@ commands:

```
temporal workflow list \
--query YourQuery`
--query YourQuery
```

Visit https://docs.temporal.io/visibility to read more about Search Attributes
Expand Down
Loading