Skip to content

Commit

Permalink
Support workflow already completed error (#4123)
Browse files Browse the repository at this point in the history
<!-- Describe what has changed in this PR -->
**What changed?**
When a workflow is completed, signals were returning EntityNotExistsError
With this diff we will start returning WorkflowExecutionAlreadyCompletedError
which is more descriptive to the user

See https://t3.uberinternal.com/browse/CDNC-615 for more details

<!-- Tell your future self why have you made these changes -->
**Why?**
This change helps differentiate non existing workflows vs completed workflows.


<!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? -->
**How did you test it?**
*Unit tests:*
`go test -v github.com/uber/cadence/service/history -run TestEngineSuite -testify.m TestSignalWorkflowExecution_Failed`
`go test -v github.com/uber/cadence/service/history -run engine2Suite -testify.m TestRequestCancelWorkflowExecutionFail`


<!-- Assuming the worst case, what can be broken when deploying this change to production? -->
**Potential risks**

<!-- Is it notable for release? e.g. schema updates, configuration or data migration required? If so, please mention it, and also update CHANGELOG.md -->
**Release notes**

<!-- Is there any documentation updates should be made for config, https://cadenceworkflow.io/docs/operation-guide/setup/ ? If so, please open an PR in https://github.com/uber/cadence-docs -->
**Documentation Changes**
  • Loading branch information
demirkayaender authored Apr 22, 2021
1 parent 329357c commit 12579bd
Show file tree
Hide file tree
Showing 32 changed files with 492 additions and 136 deletions.
209 changes: 172 additions & 37 deletions .gen/proto/api/v1/error.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 12579bd

Please sign in to comment.