uber / cadence

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
https://cadenceworkflow.io
MIT License
7.96k stars 772 forks source link

Treat WorkflowExecutionAlreadyStartedError as a success for async requests #6128

Closed natemort closed 2 weeks ago

natemort commented 2 weeks ago

With client retries we could end up with multiple messages for the same workflow id, particularly for the Java client which doesn't correctly reuse the same request ID across retries. We should treat a WorkflowExecutionAlreadyStartedError as a success indicator to support at-most once execution of a workflow.

What changed?

Why?

How did you test it?

Potential risks

Release notes

Documentation Changes

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.17%. Comparing base (50dce23) to head (c1d7953).

Additional details and impacted files | [Files](https://app.codecov.io/gh/uber/cadence/pull/6128?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) | Coverage Ξ” | | |---|---|---| | [...n/asyncworkflow/queue/consumer/default\_consumer.go](https://app.codecov.io/gh/uber/cadence/pull/6128?src=pr&el=tree&filepath=common%2Fasyncworkflow%2Fqueue%2Fconsumer%2Fdefault_consumer.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber#diff-Y29tbW9uL2FzeW5jd29ya2Zsb3cvcXVldWUvY29uc3VtZXIvZGVmYXVsdF9jb25zdW1lci5nbw==) | `92.90% <100.00%> (+0.38%)` | :arrow_up: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/uber/cadence/pull/6128/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/uber/cadence/pull/6128?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) > `Ξ” = absolute (impact)`, `ΓΈ = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/uber/cadence/pull/6128?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Last update [50dce23...c1d7953](https://app.codecov.io/gh/uber/cadence/pull/6128?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber).
coveralls commented 2 weeks ago

Pull Request Test Coverage Report for Build 0190080f-d3c3-4689-87c9-992b58b13264

Details


Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
common/task/fifo_task_scheduler.go 2 83.51%
service/frontend/api/handler.go 2 75.6%
common/util.go 2 91.84%
common/persistence/historyManager.go 2 66.67%
common/persistence/statsComputer.go 3 98.21%
common/archiver/filestore/historyArchiver.go 4 80.95%
service/matching/tasklist/task_list_manager.go 4 76.65%
service/history/task/task_util.go 20 70.57%
<!-- Total: 41 -->
Totals Coverage Status
Change from base Build 01900690-d484-497f-aa13-7290075d24d1: 0.0%
Covered Lines: 106486
Relevant Lines: 149101

πŸ’› - Coveralls
coveralls commented 2 weeks ago

Pull Request Test Coverage Report for Build 01900871-7db1-4976-ba8d-064262f8abf5

Details


Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 2 88.06%
common/peerprovider/ringpopprovider/config.go 2 81.58%
service/matching/tasklist/task_list_manager.go 2 77.05%
service/history/task/transfer_active_task_executor.go 2 72.77%
service/history/task/fetcher.go 2 85.05%
common/persistence/historyManager.go 2 66.67%
service/history/handler/handler.go 3 96.2%
common/persistence/statsComputer.go 3 98.21%
service/history/task/cross_cluster_task_processor.go 8 80.79%
service/history/task/task_util.go 20 70.57%
<!-- Total: 46 -->
Totals Coverage Status
Change from base Build 01900690-d484-497f-aa13-7290075d24d1: -0.02%
Covered Lines: 106463
Relevant Lines: 149103

πŸ’› - Coveralls