Commit 030b081
error if both --build-id and --unversioned used (#991)
The CLI documentation for the `--build-id` and `--unversioned` flags for
the `temporal worker deployment set-current-version` command indicate
that these flags are mutually exclusive:
```
> ./temporal worker deployment set-current-version --help
<snip>
--build-id string Build ID of the Worker Deployment Version. Required unless --unversioned is specified.
--deployment-name string Name of the Worker Deployment. Required.
-h, --help help for set-current-version
--ignore-missing-task-queues Override protection to accidentally remove task queues.
--unversioned Set unversioned workers as the target version. Cannot be used with --build-id.
```
However, there was no error returned if both `--build-id` and
`--unversioned` were supplied on the command line.
This commit returns an error indicating that the flags are mutually
exclusive and adds a simple unit test verifying the behaviour.
Signed-off-by: Jay Pipes <jay.pipes@temporal.io>
Co-authored-by: Alex Stanfield <13949480+chaptersix@users.noreply.github.com>1 parent c3447af commit 030b081
2 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
835 | 839 | | |
836 | 840 | | |
837 | 841 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
189 | 200 | | |
190 | 201 | | |
191 | 202 | | |
| |||
0 commit comments