integration-cli: fix flaky TestAPISwarmServicesFailedUpdate - #53272
Open
GordonTheTurtle wants to merge 1 commit into
Open
integration-cli: fix flaky TestAPISwarmServicesFailedUpdate#53272GordonTheTurtle wants to merge 1 commit into
GordonTheTurtle wants to merge 1 commit into
Conversation
GordonTheTurtle
force-pushed
the
fix/flaky-TestAPISwarmServicesFailedUpdate
branch
3 times, most recently
from
August 2, 2026 02:33
d4760db to
5b19632
Compare
After poll.WaitOn confirms the update is in UpdateStatePaused state, the test previously read the running-task count exactly once and asserted immediately with no retry. If any task was still transitioning at that moment, the assertion would fail spuriously. Replace the single-shot check with a poll.WaitOn using the same defaultReconciliationTimeout, so the assertion retries until the Swarm scheduler has stabilised the expected number of running tasks. Signed-off-by: Gordon <GordonTheTurtle@users.noreply.github.com>
GordonTheTurtle
force-pushed
the
fix/flaky-TestAPISwarmServicesFailedUpdate
branch
from
August 2, 2026 03:46
5b19632 to
610ee19
Compare
GordonTheTurtle
marked this pull request as ready for review
August 2, 2026 04:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix intermittent failure of
TestAPISwarmServicesFailedUpdate.After
poll.WaitOnconfirms the update is inUpdateStatePausedstate, the test previously read the running-task count exactly once and asserted immediately with no retry. If any task was still transitioning at that moment, the assertion would fail spuriously.Replace the single-shot check with a
poll.WaitOnusing the samedefaultReconciliationTimeout, so the assertion retries until the Swarm scheduler has stabilised the expected number of running tasks.Release notes (optional)
Note for maintainers
A maintainer's
Signed-off-byco-sign is needed before this PR can be merged, per the DCO policy discussion in #53197. If you are approving this PR, please amend the commit to add your own sign-off, or instruct Gordon to add it on your behalf.A picture of a cute animal (not mandatory but encouraged)
🐢