Skip to content

Comments

[release-1.11] 🐛 Add wait-resource-versions-{become,remain}-stable intervals to e2e config#13331

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:release-1.11from
nojnhuh:e2e-resourceversion-wait
Feb 12, 2026
Merged

[release-1.11] 🐛 Add wait-resource-versions-{become,remain}-stable intervals to e2e config#13331
k8s-ci-robot merged 1 commit intokubernetes-sigs:release-1.11from
nojnhuh:e2e-resourceversion-wait

Conversation

@nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Feb 11, 2026

What this PR does / why we need it:

Manual cherry-pick of #13263:

The default wait intervals used during clusterctl upgrade tests to check for the stability of resource versions do not work when there is high latency between the test binary and the management clusters. This PR makes those timeouts configurable via new wait-resource-versions-become-stable and wait-resource-versions-remain-stable interval configurations.

Also includes changes from #12848.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Related to #13262

/area e2e-testing

@k8s-ci-robot k8s-ci-robot added this to the v1.11 milestone Feb 11, 2026
@k8s-ci-robot k8s-ci-robot added area/e2e-testing Issues or PRs related to e2e testing cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 11, 2026
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 11, 2026
@nojnhuh nojnhuh force-pushed the e2e-resourceversion-wait branch from fe51ec4 to 6dc4f41 Compare February 11, 2026 17:44
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Feb 11, 2026

Resolved conflicts with #12848:

diff --cc test/e2e/cluster_upgrade_runtimesdk_test.go
index cfe322ba7,77718c87b..000000000
--- a/test/e2e/cluster_upgrade_runtimesdk_test.go
+++ b/test/e2e/cluster_upgrade_runtimesdk_test.go
diff --cc test/framework/resourceversion_helpers.go
index ee79889a8,262363074..000000000
--- a/test/framework/resourceversion_helpers.go
+++ b/test/framework/resourceversion_helpers.go
@@@ -38,8 -46,12 +46,12 @@@ func ValidateResourceVersionStable(ctx
        byf("Check resourceVersions are stable")
        var previousResourceVersions map[string]string
        var previousObjects map[string]client.Object
+       waitToBecomeStable := input.WaitToBecomeStable
+       if len(waitToBecomeStable) == 0 {
 -              waitToBecomeStable = []any{"2m", "15s"}
++              waitToBecomeStable = []any{"1m", "15s"}
+       }
        Eventually(func(g Gomega) {
-               objectsWithResourceVersion, objects, err := getObjectsWithResourceVersion(ctx, proxy, namespace, ownerGraphFilterFunction)
+               objectsWithResourceVersion, objects, err := getObjectsWithResourceVersion(ctx, input.ClusterProxy, input.Namespace, input.OwnerGraphFilterFunction)
                g.Expect(err).ToNot(HaveOccurred())

                defer func() {
@@@ -49,15 -61,19 +61,19 @@@
                }()
                // This is intentionally failing on the first run.
                g.Expect(objectsWithResourceVersion).To(BeComparableTo(previousResourceVersions))
-       }, 1*time.Minute, 15*time.Second).Should(Succeed(), "resourceVersions never became stable")
 -      }, waitToBecomeStable...).MustPassRepeatedly(4).Should(Succeed(), "resourceVersions never became stable")
++      }, waitToBecomeStable...).Should(Succeed(), "resourceVersions never became stable")

        // Verify resourceVersions are stable for a while.
        byf("Check resourceVersions remain stable")
+       waitToRemainStable := input.WaitToRemainStable
+       if len(waitToRemainStable) == 0 {
 -              waitToRemainStable = []any{"2m", "5s"}
++              waitToRemainStable = []any{"2m", "15s"}
+       }
        Consistently(func(g Gomega) {
-               objectsWithResourceVersion, objects, err := getObjectsWithResourceVersion(ctx, proxy, namespace, ownerGraphFilterFunction)
+               objectsWithResourceVersion, objects, err := getObjectsWithResourceVersion(ctx, input.ClusterProxy, input.Namespace, input.OwnerGraphFilterFunction)
                g.Expect(err).ToNot(HaveOccurred())
                g.Expect(previousResourceVersions).To(BeComparableTo(objectsWithResourceVersion), printObjectDiff(previousObjects, objects))
-       }, 2*time.Minute, 15*time.Second).Should(Succeed(), "resourceVersions didn't stay stable")
+       }, waitToRemainStable...).Should(Succeed(), "resourceVersions didn't stay stable")
  }

  func printObjectDiff(previousObjects, newObjects map[string]client.Object) func() string {
diff --git a/test/e2e/config/docker.yaml b/test/e2e/config/docker.yaml
index 1957704ac..70c48f2e2 100644
--- a/test/e2e/config/docker.yaml
+++ b/test/e2e/config/docker.yaml
@@ -412,8 +412,8 @@ intervals:
   default/wait-nodes-ready: ["10m", "10s"]
   default/wait-machine-remediation: ["5m", "10s"]
   default/wait-autoscaler: ["5m", "10s"]
-  default/wait-resource-versions-become-stable: ["2m", "15s"]
-  default/wait-resource-versions-remain-stable: ["2m", "5s"]
+  default/wait-resource-versions-become-stable: ["1m", "15s"]
+  default/wait-resource-versions-remain-stable: ["2m", "15s"]
   node-drain/wait-deployment-available: ["3m", "10s"]
   node-drain/wait-control-plane: ["15m", "10s"]
   node-drain/wait-machine-deleted: ["2m", "10s"]

/assign @sbueringer

@sbueringer
Copy link
Member

/lgtm
/approve

@sbueringer
Copy link
Member

Thx!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2026
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 780ff9dc55df77bbacbc7011cc555ad93a8d0169

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 12, 2026
@k8s-ci-robot k8s-ci-robot merged commit 620dfbc into kubernetes-sigs:release-1.11 Feb 12, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/e2e-testing Issues or PRs related to e2e testing cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants