Skip to content

fix(decision-worker): avoid missing decision task handling - #161

Merged
shijiesheng merged 3 commits into
cadence-workflow:mainfrom
shijiesheng:bug-gather
Aug 4, 2026
Merged

fix(decision-worker): avoid missing decision task handling#161
shijiesheng merged 3 commits into
cadence-workflow:mainfrom
shijiesheng:bug-gather

Conversation

@shijiesheng

Copy link
Copy Markdown
Member

What changed?

  • When decision worker respond decision completed, set return_new_decision_task flag to False
  • fix integration test when --keep-cadence-live flag is set locally for easier testing

Why?

return_new_decision_task flag controls whether responddecisioncompletetask would return a new decision. It could happen when

  1. server enable the feature
  2. during decision task processing there is a buffered activity completed event. It's very common when there are concurrency activity executions
  3. return_new_decision_task is set to true.

How did you test it?

Added async gather integration test to avoid regression.

Potential risks

Release notes

Documentation Changes

Signed-off-by: Shijie Sheng <liouvetren@gmail.com>
Comment thread cadence/worker/_decision_task_handler.py Outdated
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
cadence/worker/_decision_task_handler.py 88.63% <100.00%> (+0.08%) ⬆️

... and 1 file with indirect coverage changes

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

Signed-off-by: Shijie Sheng <liouvetren@gmail.com>
@shijiesheng
shijiesheng enabled auto-merge (squash) August 4, 2026 20:37

@timl3136 timl3136 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Shijie Sheng <liouvetren@gmail.com>
@gitar-bot

gitar-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Sets return_new_decision_task to false in the decision worker and improves local integration testing, addressing the hardcoded log field finding.

✅ 1 resolved
Quality: Log field hardcodes return_new_decision_task=True after fix

📄 cadence/worker/_decision_task_handler.py:366 📄 cadence/worker/_decision_task_handler.py:387
The debug log at _decision_task_handler.py:387 still reports "return_new_decision_task": True, but the request now sets it to False. This makes the log misleading for anyone debugging decision-task behavior. Update the logged value to False (or reference the actual request field) so the log matches the sent request.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@shijiesheng
shijiesheng merged commit 6b317d9 into cadence-workflow:main Aug 4, 2026
7 checks passed
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.

3 participants