Skip to content

fix(core): avoid panic when workflow channels close#1165

Open
sachinsharma3191 wants to merge 6 commits intotemporalio:masterfrom
sachinsharma3191:issue-692-no-panic-on-unauthorized
Open

fix(core): avoid panic when workflow channels close#1165
sachinsharma3191 wants to merge 6 commits intotemporalio:masterfrom
sachinsharma3191:issue-692-no-panic-on-unauthorized

Conversation

@sachinsharma3191
Copy link
Copy Markdown
Contributor

@sachinsharma3191 sachinsharma3191 commented Mar 18, 2026

Summary

  • avoid panics in workflow processing when fetch/activation channels are already dropped
  • stop workflow processing loop gracefully in that case and log instead of panicking
  • add focused regression tests for channel-forwarding behavior

Test plan

  • cargo test -p temporalio-sdk-core forwarding_output_stops_when_activation_channel_dropped -- --nocapture
  • cargo test -p temporalio-sdk-core forwarding_output_succeeds_with_live_channels -- --nocapture
  • cargo test -p temporalio-sdk-core core_tests::workers::worker_can_shutdown_after_never_polling_ok -- --nocapture
  • cargo test -p temporalio-sdk-core core_tests::workers::shutdown -- --nocapture
  • cargo fmt --all --check

@sachinsharma3191 sachinsharma3191 requested a review from a team as a code owner March 18, 2026 04:29
Copy link
Copy Markdown
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not want to ignore cases where receivers get dropped unexpectedly. This is unexpected behavior and should result in a panic.

Were you encountering these panics in your own code? If so, please open an issue.

Ah, I see the branch references #692. I think we can solve this more gracefully than just ignoring unexpected receiver drops.Ah, I see the branch references #692. I think we can solve this more gracefully than just ignoring unexpected receiver drops.

@chris-olszewski chris-olszewski self-requested a review March 18, 2026 15:47
@sachinsharma3191 sachinsharma3191 force-pushed the issue-692-no-panic-on-unauthorized branch from 6405b52 to 86941ab Compare March 24, 2026 23:46
Handle dropped activation/fetch channels in workflow processing without panicking, and add regression tests for channel-drop forwarding behavior.
@sachinsharma3191 sachinsharma3191 force-pushed the issue-692-no-panic-on-unauthorized branch from 86941ab to 9c4e57a Compare March 24, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants