Skip to content

fix flakey WorkflowUpdateTest.duplicateRejectedUpdate logic where ADMITTED was reported for updates that were actually COMPLETED.#2940

Open
cconstable wants to merge 2 commits into
mainfrom
workflow-update-test-flake
Open

fix flakey WorkflowUpdateTest.duplicateRejectedUpdate logic where ADMITTED was reported for updates that were actually COMPLETED.#2940
cconstable wants to merge 2 commits into
mainfrom
workflow-update-test-flake

Conversation

@cconstable

@cconstable cconstable commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What was changed

getStage() in the test server now checks the terminal outcome future before accepted, so an update's reported lifecycle stage no longer depends on the order those two futures complete. This fixes the flaky duplicateRejectedUpdate test, which could observe ADMITTED instead of COMPLETED for a rejected update.

essentially, if it's done just say it's done and perform that logic check first.

Why?

WorkflowUpdateTest.duplicateRejectedUpdate intermittently failed, expecting stage
COMPLETED but observing ADMITTED.

…ITTED was reported for updates that were actually COMPLETED.
@cconstable cconstable requested a review from a team as a code owner July 3, 2026 18:18
if (!accepted.isDone()) {
return UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED;
} else if (!outcome.isDone()) {
// A resolved outcome is terminal (a success result or a rejection/failure), so it always

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: comment formatting is weird

@mjameswh mjameswh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please fix formatting issue before merging.

@cconstable cconstable enabled auto-merge (squash) July 3, 2026 19:11
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