Skip to content

test(e2e): use DefaultPollInterval in remaining wait.For calls#7547

Merged
jbw976 merged 1 commit into
crossplane:mainfrom
amarkdotdev:fix-e2e-poll-intervals-5671
Jul 24, 2026
Merged

test(e2e): use DefaultPollInterval in remaining wait.For calls#7547
jbw976 merged 1 commit into
crossplane:mainfrom
amarkdotdev:fix-e2e-poll-intervals-5671

Conversation

@amarkdotdev

@amarkdotdev amarkdotdev commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description of your changes

Three e2e helpers in test/e2e/funcs/feature.go called wait.For without wait.WithInterval(DefaultPollInterval):

  • ClaimUnderTestMustNotChangeWithin
  • CompositeUnderTestMustNotChangeWithin
  • CompositeResourceMustMatchWithin

Every other wait.For in this file already uses the shared 500ms interval. This aligns the remaining helpers with the rest of the file so composition/claim tests don't rely on the e2e-framework default polling interval.

Refs #5671

I have:

Need help with this checklist? See the cheat sheet.

@amarkdotdev
amarkdotdev requested a review from a team as a code owner June 26, 2026 08:36
@amarkdotdev
amarkdotdev requested a review from bobh66 June 26, 2026 08:36
@amarkdotdev amarkdotdev mentioned this pull request Jun 26, 2026
17 tasks
@amarkdotdev
amarkdotdev force-pushed the fix-e2e-poll-intervals-5671 branch from e8a2427 to 63224e7 Compare June 26, 2026 08:37
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8edff36a-d600-40c4-8ae6-60360690ef27

📥 Commits

Reviewing files that changed from the base of the PR and between cb8f085 and 2ca15a8.

📒 Files selected for processing (1)
  • test/e2e/funcs/feature.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e/funcs/feature.go

📝 Walkthrough

Walkthrough

Three e2e helper waits now pass DefaultPollInterval alongside their existing timeouts when checking unchanged or matching conditions.

Changes

Wait polling updates

Layer / File(s) Summary
Explicit wait interval
test/e2e/funcs/feature.go
Three wait.For(...) calls now include wait.WithInterval(DefaultPollInterval) while preserving their existing timeout and predicate logic.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: bobh66

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, under 72 characters, and accurately describes the polling interval change.
Description check ✅ Passed The description directly explains the three e2e helpers and the wait.For interval update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Breaking Changes ✅ Passed Only test/e2e/funcs/feature.go changed; no files under apis/** or cmd/** were touched, so the breaking-change rule is not triggered.
Feature Gate Requirement ✅ Passed Only test/e2e helper polling intervals changed; no apis/** or experimental product behavior was added, so no feature flag is needed.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@amarkdotdev

Copy link
Copy Markdown
Contributor Author

@bobh66 wires DefaultPollInterval into the remaining wait.For calls in the e2e helpers. mind taking a look?

@jbw976 jbw976 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.

Thanks for the contribution @amarkdotdev, this looks reasonable and I don't see any reason that these checks wouldn't want to use our default poll interval vs. the e2e-framework default, so they must have been oversights.

Could you please update the PR body to use the PR template though? especially the checklist there - the current checklist in this PR looks like an agent generated one.
https://github.com/crossplane/crossplane/blob/main/.github/PULL_REQUEST_TEMPLATE.md

@amarkdotdev

Copy link
Copy Markdown
Contributor Author

Hi @jbw976 sorry, I totally missed that template. Will fix it later when I get home, thanks for taking the time having a look at this

@amarkdotdev

Copy link
Copy Markdown
Contributor Author

@jbw976 Done, also ran ./nix.sh flake check locally just now and it passed.

@amarkdotdev
amarkdotdev force-pushed the fix-e2e-poll-intervals-5671 branch from 63224e7 to cb8f085 Compare July 21, 2026 19:28
@jbw976

jbw976 commented Jul 24, 2026

Copy link
Copy Markdown
Member

closing and re-opening this PR to kick CI 🙏

@jbw976 jbw976 closed this Jul 24, 2026
@jbw976 jbw976 reopened this Jul 24, 2026
Three e2e helper functions were missing wait.WithInterval(DefaultPollInterval),
unlike the rest of feature.go. Aligning them reduces inconsistent polling behavior
that can contribute to flaky tests.

Refs crossplane#5671

Signed-off-by: amarkdotdev <[email protected]>
Signed-off-by: Jared Watts <[email protected]>
Co-authored-by: Moritz Röseler <[email protected]>

@jbw976 jbw976 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.

Thanks for following up @amarkdotdev, this looks good to me! CI is all green now too ✅

I actually just noticed this morning that the same fix was proposed in #7285, which we missed reviewing and the stalebot just closed today (that's how i noticed it).

Since we got traction on this PR, we will still go ahead and merge it instead of the older one. But to be fair to the original contributor @moeritze I am going to amend the commit to include them as a co-author too. Hopefully that's reasonable for you and everyone gets credit for the contribution here.

Thank you both for your efforts (and patience)! 🙇‍♂️

@jbw976
jbw976 force-pushed the fix-e2e-poll-intervals-5671 branch from cb8f085 to 2ca15a8 Compare July 24, 2026 21:37
@jbw976 jbw976 moved this to In Review in Crossplane Roadmap Jul 24, 2026
@jbw976 jbw976 added this to the v2.4 milestone Jul 24, 2026
@jbw976
jbw976 merged commit 074c0ee into crossplane:main Jul 24, 2026
22 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in Crossplane Roadmap Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants