Skip to content

Commit f91ae9d

Browse files
committed
fix hidden flag property
1 parent 32e30b1 commit f91ae9d

File tree

4 files changed

+27
-23
lines changed

4 files changed

+27
-23
lines changed

internal/commandsgen/code.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,5 +492,8 @@ func (o *Option) writeFlagBuilding(selfVar, flagVar string, w *codeWriter) error
492492
if o.Deprecated != "" {
493493
w.writeLinef("_ = %v.MarkDeprecated(%q, %q)", flagVar, o.Name, o.Deprecated)
494494
}
495+
if o.Hidden {
496+
w.writeLinef("_ = %v.MarkHidden(%q)", flagVar, o.Name)
497+
}
495498
return nil
496499
}

internal/commandsgen/parse.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type (
2828
Aliases []string `yaml:"aliases,omitempty"`
2929
EnumValues []string `yaml:"enum-values,omitempty"`
3030
Experimental bool `yaml:"experimental,omitempty"`
31+
Hidden bool `yaml:"hidden,omitempty"`
3132
HiddenLegacyValues []string `yaml:"hidden-legacy-values,omitempty"`
3233
}
3334

internal/temporalcli/commands.gen.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,9 +2275,11 @@ func NewTemporalTaskQueueConfigSetCommand(cctx *CommandContext, parent *Temporal
22752275
s.Command.Flags().StringVar(&s.QueueRpsLimit, "queue-rps-limit", "", "Queue rate limit in requests per second. Accepts a float; or 'default' to unset.")
22762276
overrideFlagDisplayType(s.Command.Flags().Lookup("queue-rps-limit"), "float|default")
22772277
s.Command.Flags().StringVar(&s.QueueRpsLimitReason, "queue-rps-limit-reason", "", "Reason for queue rate limit update.")
2278+
_ = s.Command.Flags().MarkHidden("queue-rps-limit-reason")
22782279
s.Command.Flags().StringVar(&s.FairnessKeyRpsLimitDefault, "fairness-key-rps-limit-default", "", "Fairness key rate limit default in requests per second. Accepts a float; or 'default' to unset.")
22792280
overrideFlagDisplayType(s.Command.Flags().Lookup("fairness-key-rps-limit-default"), "float|default")
22802281
s.Command.Flags().StringVar(&s.FairnessKeyRpsLimitReason, "fairness-key-rps-limit-reason", "", "Reason for fairness key rate limit update.")
2282+
_ = s.Command.Flags().MarkHidden("fairness-key-rps-limit-reason")
22812283
s.Command.Run = func(c *cobra.Command, args []string) {
22822284
if err := s.run(cctx, args); err != nil {
22832285
cctx.Options.Fail(err)

internal/temporalcli/commands.yaml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ commands:
360360
361361
Either `activity-id`, `activity-type`, or `--match-all` must be specified.
362362
363-
Activity options can be updated in bulk with a visibility query list filter.
363+
Activity options can be updated in bulk with a visibility query list filter.
364364
For example, if you want to reset for activities of type Foo, do:
365365
366366
```
@@ -592,7 +592,7 @@ commands:
592592
593593
Either `activity-id`, `activity-type`, or `--match-all` must be specified.
594594
595-
Activities can be reset in bulk with a visibility query list filter.
595+
Activities can be reset in bulk with a visibility query list filter.
596596
For example, if you want to reset activities of type Foo:
597597
598598
```
@@ -1274,17 +1274,17 @@ commands:
12741274
```
12751275
temporal worker deployment manager-identity [command] [options]
12761276
```
1277-
1278-
When present, `ManagerIdentity` is the identity of the user that has the
1277+
1278+
When present, `ManagerIdentity` is the identity of the user that has the
12791279
exclusive right to make changes to this Worker Deployment. Empty by default.
12801280
When set, users whose identity does not match the `ManagerIdentity` will not
12811281
be able to change the Worker Deployment.
1282-
1282+
12831283
This is especially useful in environments where multiple users (such as CLI
12841284
users and automated controllers) may interact with the same Worker Deployment.
12851285
`ManagerIdentity` allows different users to communicate with one another about
12861286
who is expected to make changes to the Worker Deployment.
1287-
1287+
12881288
The current Manager Identity is returned with `describe`:
12891289
```
12901290
temporal worker deployment describe \
@@ -1310,12 +1310,12 @@ commands:
13101310
```
13111311
13121312
Set the `ManagerIdentity` of a Worker Deployment given its Deployment Name.
1313-
1314-
When present, `ManagerIdentity` is the identity of the user that has the
1313+
1314+
When present, `ManagerIdentity` is the identity of the user that has the
13151315
exclusive right to make changes to this Worker Deployment. Empty by default.
13161316
When set, users whose identity does not match the `ManagerIdentity` will not
13171317
be able to change the Worker Deployment.
1318-
1318+
13191319
This is especially useful in environments where multiple users (such as CLI
13201320
users and automated controllers) may interact with the same Worker Deployment.
13211321
`ManagerIdentity` allows different users to communicate with one another about
@@ -1324,7 +1324,7 @@ commands:
13241324
```
13251325
temporal worker deployment manager-identity set [options]
13261326
```
1327-
1327+
13281328
For example:
13291329
13301330
```
@@ -1334,17 +1334,17 @@ commands:
13341334
--identity YourUserIdentity # optional, populated by CLI if not provided
13351335
```
13361336
1337-
Sets the Manager Identity of the Deployment to the identity of the user making
1338-
this request. If you don't specifically pass an identity field, the CLI will
1337+
Sets the Manager Identity of the Deployment to the identity of the user making
1338+
this request. If you don't specifically pass an identity field, the CLI will
13391339
generate your identity for you.
1340-
1340+
13411341
For example:
13421342
```
13431343
temporal worker deployment manager-identity set \
13441344
--deployment-name DeploymentName \
13451345
--manager-identity NewManagerIdentity
13461346
```
1347-
1347+
13481348
Sets the Manager Identity of the Deployment to any string.
13491349
13501350
options:
@@ -1373,12 +1373,12 @@ commands:
13731373
```
13741374
13751375
Unset the `ManagerIdentity` of a Worker Deployment given its Deployment Name.
1376-
1377-
When present, `ManagerIdentity` is the identity of the user that has the
1376+
1377+
When present, `ManagerIdentity` is the identity of the user that has the
13781378
exclusive right to make changes to this Worker Deployment. Empty by default.
13791379
When set, users whose identity does not match the `ManagerIdentity` will not
13801380
be able to change the Worker Deployment.
1381-
1381+
13821382
This is especially useful in environments where multiple users (such as CLI
13831383
users and automated controllers) may interact with the same Worker Deployment.
13841384
`ManagerIdentity` allows different users to communicate with one another about
@@ -1387,7 +1387,7 @@ commands:
13871387
```
13881388
temporal worker deployment manager-identity unset [options]
13891389
```
1390-
1390+
13911391
For example:
13921392
13931393
```
@@ -1410,7 +1410,7 @@ commands:
14101410
summary: List worker status information in a specific namespace (EXPERIMENTAL)
14111411
description: |
14121412
Get a list of workers to the specified namespace.
1413-
1413+
14141414
```
14151415
temporal worker list --namespace YourNamespace --query 'TaskQueue="YourTaskQueue"'
14161416
```
@@ -1427,7 +1427,7 @@ commands:
14271427
summary: Returns information about a specific worker (EXPERIMENTAL)
14281428
description: |
14291429
Look up information of a specific worker.
1430-
1430+
14311431
```
14321432
temporal worker describe --namespace YourNamespace --worker-instance-key YourKey
14331433
```
@@ -3475,7 +3475,6 @@ commands:
34753475
- name: queue-rps-limit-reason
34763476
type: string
34773477
description: Reason for queue rate limit update.
3478-
hidden: true
34793478
- name: fairness-key-rps-limit-default
34803479
type: string
34813480
display-type: float|default
@@ -3485,7 +3484,6 @@ commands:
34853484
- name: fairness-key-rps-limit-reason
34863485
type: string
34873486
description: Reason for fairness key rate limit update.
3488-
hidden: true
34893487

34903488
- name: temporal workflow
34913489
summary: Start, list, and operate on Workflows
@@ -4979,7 +4977,7 @@ option-sets:
49794977
Temporal workflow headers in 'KEY=VALUE' format.
49804978
Keys must be identifiers, and values must be JSON values.
49814979
May be passed multiple times to set multiple Temporal headers.
4982-
Note: These are workflow headers, not gRPC headers.
4980+
Note: These are workflow headers, not gRPC headers.
49834981
49844982
- name: workflow-update-options
49854983
options:

0 commit comments

Comments
 (0)