Skip to content

Wait for history in canceled health check tests - #1610

Merged
matheuscscp merged 1 commit into
fluxcd:mainfrom
ruslan-shaydullin:fix/wait-for-history-in-cancel-tests
Oct 12, 2026
Merged

matheuscscp merged 1 commit into
fluxcd:mainfrom
ruslan-shaydullin:fix/wait-for-history-in-cancel-tests

Conversation

@ruslan-shaydullin

Copy link
Copy Markdown
Contributor

The two rollback tests from #1605 wait for the Ready or Remediated condition and then read status.history from the same object. The patch helper sends the conditions and the rest of the status in two requests a few milliseconds apart, so the history can still be the old one. With the 1s poll this is rare; polling every millisecond instead made the reconcile request test fail 3 times out of 3 (Expected 2 to equal 3), and in an earlier run both tests failed 5 times out of 6. With this change the same 1ms poll passes 6 out of 6. The other cancellation tests already wait for the history this way.

The status conditions and the rest of the status are patched in two
requests, so a test that waits for the Ready or Remediated condition
can read the history from before the second patch. Wait for the
latest history entry the same way the other cancellation tests do.

Signed-off-by: Ruslan Shaydullin <[email protected]>

@matheuscscp matheuscscp 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

Thanks @ruslan-shaydullin!

@matheuscscp
matheuscscp merged commit ca14e31 into fluxcd:main Oct 12, 2026
6 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.

2 participants