Skip to content

Address Flake in test_workflow_history_info#1545

Merged
VegetarianOrc merged 2 commits into
mainfrom
amazzeo/workflow-history-info-flakes
May 19, 2026
Merged

Address Flake in test_workflow_history_info#1545
VegetarianOrc merged 2 commits into
mainfrom
amazzeo/workflow-history-info-flakes

Conversation

@VegetarianOrc
Copy link
Copy Markdown
Contributor

@VegetarianOrc VegetarianOrc commented May 19, 2026

Add polling for expected history before sending final signal in test_workflow_history_info

What was changed

Wait for the first signal's timers to be committed so the next signal creates a post-timer workflow task with updated workflow.info().

Why?

This avoids a race where both signals are accepted before the worker processes the first one and both make it into the same activation. If that occurs, the query will have the stale history that the final signal is intended to avoid.

Checklist

  1. How was this tested?

I created a repro locally that:

  1. started the workflow
  2. shut down the worker so nothing was polling
  3. Sent both signals ensuring they'd be batched together
  4. started a new worker and performed the query

After reproducing that way, I was able to confirm the fix that waiting for the signals to appear in history before sending the second signal addressed the issue.

@VegetarianOrc VegetarianOrc requested a review from a team as a code owner May 19, 2026 16:53
@VegetarianOrc VegetarianOrc merged commit b8688d5 into main May 19, 2026
39 of 45 checks passed
@VegetarianOrc VegetarianOrc deleted the amazzeo/workflow-history-info-flakes branch May 19, 2026 18:31
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