check informers for only version >= 2.0 - #2870
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe integration tests discover the operator CSV version and use semantic-version comparison to conditionally check informer deployment readiness. CSV lookup errors and versions below 2.0 skip the check. ChangesCSV-gated informer readiness
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
Actionable comments posted: 3
🤖 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.
Inline comments:
In `@integration-tests/backend/flowcollector.go`:
- Around line 214-221: Update the CSV-version handling in
WaitForFlowcollectorReady around getCSVVersion so API errors or malformed values
fail closed by running waitUntilDeploymentReady for flowlogs-pipeline-informers.
Validate csvVersion with the existing semver parsing conventions, including
already-prefixed versions, and only skip the informer check when the parsed
version is valid and below v2.0.0.
In `@integration-tests/backend/operator.go`:
- Around line 358-365: Select the active OLM CSV in getCSVVersion instead of
returning the first name-prefix match: use current/installed indicators such as
Subscription association, status.currentCSV, replacement metadata, and
status.phase to identify the active candidate. Return its spec.version, and fail
explicitly when no candidate or multiple candidates remain ambiguous so
WaitForFlowcollectorReady cannot use an outdated version.
- Around line 353-355: Update getCSVVersion so the
dynamicClient.Resource(csvGVR).Namespace(operatorNamespace).List call uses a
short-lived context with a deadline, ensuring the API request cannot block
indefinitely; clean up the context after the call and preserve the existing
error return behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ef814a59-0e09-44d7-84ce-7783f1fa0162
📒 Files selected for processing (2)
integration-tests/backend/flowcollector.gointegration-tests/backend/operator.go
|
/lgtm |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2870 +/- ##
============================
============================
🚀 New features to boost your workflow:
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: memodi 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 |
Description
check informers for only version >= 2.0
Dependencies
n/a
Checklist
Summary by CodeRabbit