-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI rewrite branch to main #539
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement `temporal activity fail` and `temporal activity complete`
Fixes #430
## What was changed I've implemented the `workflow reset` command and tests for all its major functionality. Batch reset functionality will come in a second PR after this one
## What was changed CI will now run tests without `-v`. ## Why? When you run in verbose mode you need to dig through _all_ test outputs and logging to find even a single test failure. In https://github.com/temporalio/cli/actions/runs/7877883209/job/21494958729?pr=443 we have 1000 lines of output and only 20 lines were relevant to the actual failing test.
<!--- 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 <!-- Describe what has changed in this PR --> Add support for `workflow update` command. The functionality should be unchanged but the output may be different.
Add operator cluster commands
Add `operator cluster list`, `operator cluster upsert` and `operator cluster remove`. To write the tests I had to expose a bunch of cluster configs in the Test server and make sure the test could actually read them to use and verify the information.
## What was changed Add operator search-attribute commands ## Why? Add commands to operate search attributes ## 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 -->
## What was changed <!-- Describe what has changed in this PR --> Add support for `batch` commands. Notable differences to current `main`: - captures "not found" errors from Server and presents a better message - prints `batch describe` as card instead of table - prints empty JSON array for empty result set from `batch list` --------- Co-authored-by: Chad Retz <[email protected]>
## What was changed Adding support for batch reset commands. Please note, batch_reset command was removed. Instead, `-query` option was added to the reset command for performing batch operations. ## Why? Supported by older tools. ## Checklist How was this tested: implemented automated feature test.
<!--- 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 Wrapped tests for `batch terminate` with `Eventually`. ## Why? Ensure the tests for `batch terminate` are not flaky. ## Checklist
## What was changed Adding operator namespace commands to cli. These are the commands that are added * operator namespace create * operator namespace delete * operator namespace describe * operator namespace list * operator nemspace update ## Breaking changes * Removed --verbose option from `namespace update` command. This option is used to print update request payload. * Previous cli was printing historyArchivalUri and visibilityArchivalUri fields only if the option `--fields` is set to `long` when executing `namespace describe` command. Here we are always printing those fields since we dont have `--fields` option. ## Why? ## Checklist 2. How was this tested: Unit tests. 3. Any docs updates needed?
## What was changed Adding task-queue list-partition command ## Breaking changes * This command had --output option which can take values table, card and json. We will not have card and table options. Option text will print a table view. * --output json was printing some text line in current cli. Here we will print response object without that. ## Why? cli rewrite ## Checklist --------- Co-authored-by: Chad Retz <[email protected]>
<!--- 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 Add support for workflow delete command. The functionality is mostly unchanged from current CLI, but the output may be different. ## Why? For the CLI refresh ## Checklist <!--- add/delete as needed ---> 1. How was this tested: Tested in commands.workflow_test.go and via CLI with local dev environment. --------- Co-authored-by: Chad Retz <[email protected]>
Add ARM targets for CI
## What was changed * New command: `temporal workflow fix-history-json` ## Why? This command reads an event history JSON object using the `client.HistoryFromJSON` API, then serializes it back out using the `protojson` API. `HistoryFromJSON` is backward compatible with both the standard protobuf JSON format and with GoGoProto's format, which differ in their handling of enum values. ## Checklist 1. Closes internal JIRA tickets SDK-1570 and OSS-1658, which do not seem to have equivalent issues in the public GitHub. 2. How was this tested: I downloaded a sample event history JSON from my dev server, then ran it through a few conversions. 3. Any docs updates needed? If there's a manual step in publishing changes to `commands.md`, then it will need to be run.
## What was changed Implement schedule commands for new CLI. ## Why? Feature parity. ## Checklist 1. Closes: 2. How was this tested: new tests 3. Any docs updates needed? - The format of `temporal schedule describe -o json` changed to the `--raw` format of the previous cli.
Closes #343. See the issue for the full discussion and rationale behind the specific changes made. --------- Co-authored-by: Chad Retz <[email protected]>
This forward-ports #408 to the cli-rewrite branch.
Add update-id option
This test occasionally fails because the batch job completes before the test has a chance to check its status. Allow for this case in the test.
We want a non-zero exit when the user invokes `temporal` with an unknown command/subcommand, or when invoked with no arguments. But if the user explicitly asks for help or version information, we should print it and return success. Closes #495.
## What was changed Updated server and ui-server to latest stable for CLI rewrite
Sebastian Neira seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Sushisource
approved these changes
Apr 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was changed
There is a long history of changes to the
cli-rewrite
branch. Look at the past several months. The very first commit is to remove everything. Unlike other PRs, this PR merge will not be squashed so we can keep proper commit history. The branch protections will be fixed too.Once merged, we will create a 0.12.0 release (non-RC)