test: increase pod creation timeout in migration test to fix flake#1013
Conversation
✅ Deploy Preview for agent-sandbox canceled.
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: janetkuo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesPod polling reliability improvement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR reduces flakiness in the Prow migration/upgrade test by increasing the polling timeout for the initial upgrade-sandbox-running Pod creation in dev/tools/test-migration.py, accommodating slower controller startup/informer sync in CI.
Changes:
- Increase the Pod existence polling loop from 20 seconds to 60 seconds before failing the migration test.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
dev/tools/test-migration.py (1)
308-308: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider renaming unused loop variable to
_i.The loop variable
iis not used within the loop body. By convention, prefix it with an underscore to signal that it's intentionally unused.♻️ Proposed fix
- for i in range(60): + for _i in range(60):🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@dev/tools/test-migration.py` at line 308, The loop variable `i` in the for loop is not used within the loop body. Rename the loop variable from `i` to `_i` to follow Python convention and signal that this variable is intentionally unused. This improves code readability and makes the intent clear to other developers.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@dev/tools/test-migration.py`:
- Line 308: The loop variable `i` in the for loop is not used within the loop
body. Rename the loop variable from `i` to `_i` to follow Python convention and
signal that this variable is intentionally unused. This improves code
readability and makes the intent clear to other developers.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ed4d155c-3605-4068-ab83-b01708766bdb
📒 Files selected for processing (1)
dev/tools/test-migration.py
|
/lgtm |
| print("Waiting for upgrade-sandbox-running Pod to be created...") | ||
| pod_exists = False | ||
| for i in range(20): | ||
| for i in range(60): |
What this PR does / why we need it:
This PR increases the polling timeout for initial Pod creation in
dev/tools/test-migration.pyfrom 20 seconds to 60 seconds to resolve flaky E2E migration test failures in Prow CI.In Prow CI environments, 20 seconds is frequently too aggressive for a freshly started
v0.4.6controller manager to complete informer cache synchronization, observe the newly seededSandboxCR, execute the reconciler, and have the apiserver create the underlying Pod.Which issue(s) this PR is related to:
Fixes #1011
Release Note
Summary by CodeRabbit