uber-go / cadence-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.
https://cadenceworkflow.io
MIT License
339 stars 128 forks source link

Partial fix for Continue as new case #1347

Closed agautam478 closed 2 weeks ago

agautam478 commented 2 weeks ago

What changed? Removed the additional checks for the cases where the workflows continued as new. The check sometimes clashes with the completed status and there is no point in matching the inputs to this granularity if a wf continues as new and a workflows completed are almost similar. If there was a timeout failure in the workflow it would be before it continued as new and it makes no sense to match it.

In another scenario, the identification of the last event is not reliable. last := events[len(events)-1] So in case of an early return or when the events have something else going on you don't actually get the real last event. if this is not reliable then we would be doing the checks unnecessarily.

Why? In an attempt to fix the false negtaives thrown by the replayer in continue as new cases.

How did you test it? unit tests

Potential risks more false negatives.

codecov[bot] commented 2 weeks ago

Codecov Report

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

Project coverage is 73.47%. Comparing base (afa1a4c) to head (6f8c229).

Additional details and impacted files | [Files](https://app.codecov.io/gh/uber-go/cadence-client/pull/1347?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go) | Coverage Δ | | |---|---|---| | [internal/workflow\_replayer.go](https://app.codecov.io/gh/uber-go/cadence-client/pull/1347?src=pr&el=tree&filepath=internal%2Fworkflow_replayer.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go#diff-aW50ZXJuYWwvd29ya2Zsb3dfcmVwbGF5ZXIuZ28=) | `78.61% <100.00%> (+1.68%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/uber-go/cadence-client/pull/1347?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go). > **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-go) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/uber-go/cadence-client/pull/1347?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go). Last update [afa1a4c...6f8c229](https://app.codecov.io/gh/uber-go/cadence-client/pull/1347?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go). 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-go).