Conversation
…n conflicts Agent-Logs-Url: https://github.com/spidernet-io/spiderpool/sessions/74b0c4ef-2513-439a-8a40-9a264f809ffd Co-authored-by: cyclinder <59680092+cyclinder@users.noreply.github.com>
Agent-Logs-Url: https://github.com/spidernet-io/spiderpool/sessions/74b0c4ef-2513-439a-8a40-9a264f809ffd Co-authored-by: cyclinder <59680092+cyclinder@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix nightly K8s Matrix CI failure
fix: re-fetch StatefulSet inside RetryOnConflict to resolve stale resourceVersion conflicts
Apr 29, 2026
cyclinder
approved these changes
Apr 29, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5578 +/- ##
=======================================
Coverage 67.70% 67.70%
=======================================
Files 61 61
Lines 6360 6360
=======================================
Hits 4306 4306
Misses 1770 1770
Partials 284 284
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
The nightly K8s matrix CI was failing with
timed out waiting for the conditionin theA00018annotation e2e test, where a StatefulSet's IPPool annotation is updated after a pod restart cycle.Root Cause
stsObjwas fetched once outside the retry closure. AfterRestartAndValidateStatefulSetPodIP, the StatefulSet controller is still updating status fields (readyReplicas, etc.), incrementingresourceVersion. Every retry attempt re-submitted the same staleresourceVersion, guaranteeing a 409 conflict untilDefaultBackoff's 4 steps were exhausted.Fix
Move the
GetStatefulSetcall and annotation mutation inside the retry closure so each attempt works with the latestresourceVersion: