Skip to content

bugfix(workflows): Addressing "no such instance exists" errors#1812

Merged
WhitWaldo merged 4 commits into
masterfrom
workflow-errors
May 9, 2026
Merged

bugfix(workflows): Addressing "no such instance exists" errors#1812
WhitWaldo merged 4 commits into
masterfrom
workflow-errors

Conversation

@WhitWaldo

Copy link
Copy Markdown
Contributor

Description

The ProcessActivityAsync method had a single try/catch method that wrapped both the handler execution and gRPC delivery calls. When an activity completed successfully, but CompleteActivityTaskAsync threw (transiently), the trigger here being no such instance exists from the sidecar, the RpcException was caught by the outer handler which treated it as an activity failure and made a second CompleteActivityTaskAsync call with the error message from that exception. The sidecar accepted this second call and recorded a TaskFailed history event, so on the next replay, HandleFailedActivityFromHistory found this event and threw a WorkflowTaskFailedException with the unknown status code and this detail propagating a transient transport error as a permanent business-logic failure.

This simply splits the single try/catch block into two separate blocks:

  • The first addresses the handler execution
  • The second covers only the deliver call

This means no second Complete*Async call is ever made when delivery fails and no spurious TaskFailed events are written to history.

Added unit tests to validate.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

… "no such instance exists" messages

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
@WhitWaldo WhitWaldo added this to the v1.18 milestone May 9, 2026
@WhitWaldo WhitWaldo self-assigned this May 9, 2026
@WhitWaldo WhitWaldo requested a review from a team as a code owner May 9, 2026 07:13
@WhitWaldo WhitWaldo added the kind/bug Something isn't working label May 9, 2026
@WhitWaldo WhitWaldo requested a review from a team as a code owner May 9, 2026 07:13
@codecov

codecov Bot commented May 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.42%. Comparing base (3516729) to head (9b9c1bd).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1812   +/-   ##
=======================================
  Coverage   65.42%   65.42%           
=======================================
  Files         296      296           
  Lines        8694     8694           
  Branches     1009     1009           
=======================================
  Hits         5688     5688           
  Misses       2761     2761           
  Partials      245      245           
Flag Coverage Δ
net10.0 65.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/workflow kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant