MON-4634: Update collection profiles e2e tests - #31477
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: simonpasquier 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: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughCollection profile tests now discover supported profiles from managed ServiceMonitor labels, preserve existing operator ConfigMap settings, use typed selectors and shared assertions, and verify cleanup when configuration did not previously exist. ChangesPrometheus collection profile tests
Estimated code review effort: 3 (Moderate) | ~30 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/uncc @rexagod |
|
/test e2e-gcp-ovn |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/extended/prometheus/collection_profiles.go (1)
59-62: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMove
collectionProfilesSupportedListintorunner.
collectionProfilesSupportedListis mutable state populated inBeforeAlland read by bothItblocks. Store it asrunner.supportedCollectionProfilesto keep discovered test state with the existing lifecycle state and avoid package-level mutable state.🤖 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 `@test/extended/prometheus/collection_profiles.go` around lines 59 - 62, Move collectionProfilesSupportedList from package scope into the runner state as runner.supportedCollectionProfiles. Update its runtime initialization in BeforeAll and both It blocks to access the runner field, preserving the existing discovery and test behavior while removing the package-level mutable variable.
🤖 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 `@test/extended/prometheus/collection_profiles.go`:
- Around line 59-62: Move collectionProfilesSupportedList from package scope
into the runner state as runner.supportedCollectionProfiles. Update its runtime
initialization in BeforeAll and both It blocks to access the runner field,
preserving the existing discovery and test behavior while removing the
package-level mutable variable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 70a77c8f-a3de-4f78-800a-e8daed9fc1fa
📒 Files selected for processing (1)
test/extended/prometheus/collection_profiles.go
|
/test e2e-aws-ovn-serial-1of2 |
|
/label tide/merge-method-squash |
|
@simonpasquier: This pull request references MON-4634 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/test e2e-aws-ovn-serial-1of2 |
1 similar comment
|
/test e2e-aws-ovn-serial-1of2 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@test/extended/prometheus/collection_profiles.go`:
- Around line 379-386: Update runner.getServiceMonitors to use its namespace
parameter when constructing the ServiceMonitors client instead of always using
operatorNamespaceName, so callers query the requested namespace while preserving
the existing label selector behavior.
🪄 Autofix
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: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 1abf29ac-0255-4f96-9bb0-819b836be693
📒 Files selected for processing (1)
test/extended/prometheus/collection_profiles.go
|
Risk analysis has seen new tests most likely introduced by this PR. New Test Risks for sha: 5a338e5
New tests seen in this PR at sha: 5a338e5
|
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
5a338e5 to
32cff6d
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
/test e2e-aws-ovn-serial-1of2 |
|
@simonpasquier: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Risk analysis has seen new tests most likely introduced by this PR. New Test Risks for sha: 32cff6d
New tests seen in this PR at sha: 32cff6d
|
Summary by CodeRabbit