Add new flags for encoding and file input in activity complete and fail.#1072
Draft
ks-temporal wants to merge 2 commits into
Draft
Add new flags for encoding and file input in activity complete and fail.#1072ks-temporal wants to merge 2 commits into
ks-temporal wants to merge 2 commits into
Conversation
In activity complete, add new result-meta, result-file, result-base64 to set encoding and/or supply result from a file. In activity fail, add new detail-meta, detail-file, detail-base64 to set encoding and/or supply failure detail from a file. Similar to input and input-file flags for other commands, only one of result or result-file can be used, and atmost one of detail or detail-file can be used.
Nul character in command line will work from go test files, but not from Unix command line. Also added additional check of result after activity complete.
This file contains hidden or 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
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.
Related issues
Addresses #954
What changed?
In activity complete, add new result-meta, result-file, result-base64
options to set encoding and/or supply result from a file.
In activity fail, add new detail-meta, detail-file, detail-base64 options
to set encoding and/or supply failure detail from a file.
Similar to input and input-file flags for other commands, only one of
result or result-file can be used, and at most one of detail or detail-file
can be used.
Checklist
Stability
-o json/-o jsonl) are treated as breaking changesDesign
temporal <noun> <verb>structure (e.g.temporal workflow start)--search-attribute, bad:--index-field)(Experimental)incommands.yamlHelp text (see style guide at the top of
commands.yaml)--namespace, not-n), one flag per lineYourXxxform (YourWorkflowId,YourNamespace)Behavior
Tests
SharedServerSuite)func TestXxx) where applicableManual tests
The manual test below uses standalone activity, and tests the new flags in
activity completeandactivity failcommands.Setup
Start the server, assume worker for task queue
YourTaskQueueis running,start a standalone activity.
Happy path
Note the
RunIdvalue,<your-run-id>, in the output above, as it is used ineach of the test path below.
TODO: To use result-base64 without result-meta, we need to fix in
CreatePayloads.or
TODO: The other values for result-meta and detail-meta, e.g., binary/protobuf and
json/protobuf, are also supported, but require compiled protobuf files, or a new
option of
--output rawinactivity resultto verify via CLI.Error case
Composition