OAPE-698: Integrate codecov in the must-gather-operator - #82482
Conversation
|
@praveencodes: This pull request references OAPE-698 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 sub-task 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. |
|
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 ignored due to path filters (3)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds operator SDK and coverage image inputs, introduces e2e coverage workflows for OCP 4.22 AWS amd64 clusters, and enables the must-gather-operator master branch in the repository allowlist. ChangesMust-gather operator coverage CI
Estimated code review effort: 3 (Moderate) | ~25 minutes Mergeability Score: ⚪ Minimal · up to The PR adds Codecov coverage collection to the must-gather-operator CI pipeline without supplied evidence of a concrete correctness, security, availability, or deployment risk; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant CIWorkflow
participant AWSCluster
participant OperatorSDK
participant E2ETests
participant Codecov
CIWorkflow->>AWSCluster: Use OCP 4.22 AWS amd64 cluster
CIWorkflow->>OperatorSDK: Install bundle with restricted security context
CIWorkflow->>E2ETests: Set up coverage and run e2e tests
CIWorkflow->>Codecov: Collect coverage on a best-effort basis
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml (1)
202-255: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated step definitions between the two tests.
This
stepsblock is a verbatim copy ofe2e-operator-coverage(Lines 139-192). Consider extracting the install/setup-coverage/test/collect-coverage sequence into a step-registry chain or workflow so the presubmit and postsubmit stay in sync.🤖 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 `@ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml` around lines 202 - 255, Extract the duplicated install, setup-coverage, test, and collect-coverage steps from the current steps block and the e2e-operator-coverage definition into a shared step-registry chain or workflow. Update both presubmit and postsubmit configurations to reference that shared sequence while preserving their existing gather step ordering.
🤖 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
`@ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml`:
- Around line 159-161: Update both namespace-creation blocks around the
operator-sdk bundle installation to make creating must-gather-operator
idempotent, allowing an existing namespace without failing while preserving the
subsequent bundle and deployment-wait steps.
---
Nitpick comments:
In
`@ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml`:
- Around line 202-255: Extract the duplicated install, setup-coverage, test, and
collect-coverage steps from the current steps block and the
e2e-operator-coverage definition into a shared step-registry chain or workflow.
Update both presubmit and postsubmit configurations to reference that shared
sequence while preserving their existing gather step ordering.
🪄 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: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 5ae0be82-6203-4c07-9462-ae6bb5492d33
⛔ Files ignored due to path filters (2)
ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-postsubmits.yamlis excluded by!ci-operator/jobs/**ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (2)
ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yamlcore-services/pipeline-controller/lgtm-config.yaml
8a64701 to
8caedb8
Compare
|
@praveencodes: |
|
/pj-rehearse |
|
@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse |
|
@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse |
|
@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
1 similar comment
|
@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-must-gather-operator-master-e2e-gcp-operator |
|
@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@praveencodes: job(s): ci/rehearse/openshift/must-gather-operator/master/e2e-gcp-operator either don't exist or were not found to be affected, and cannot be rehearsed |
|
/pj-rehearse pull-ci-openshift-must-gather-operator-master-e2e-operator-coverage |
|
@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-must-gather-operator-master-e2e-operator-coverage |
|
@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-must-gather-operator-master-e2e-operator-coverage |
|
@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/lgtm |
|
/approve |
|
/pj-rehearse ack |
|
@shivprakashmuley: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/approve |
|
@danilo-gemoli Could you please check the PR and approve it as it has changes in |
|
/lgtm |
Include images/ci/Dockerfile.coverage in sparse_checkout_files after make jobs. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
|
[REHEARSALNOTIFIER]
Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: praveencodes, pruan-rht, shivprakashmuley 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 |
|
/pj-rehearse ack |
|
@shivprakashmuley: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
fbcf11d
into
openshift:main
This PR integrates Codecov-based code coverage collection into the must-gather-operator's OpenShift CI pipeline.
Affected Component:
openshift/must-gather-operatorCI configuration (openshift-must-gather-operator-master.yaml)Changes Made:
The PR adds comprehensive code coverage instrumentation to the must-gather-operator's CI workflow:
Coverage Image Build: Adds a new container image build that produces a must-gather-operator-coverage image from
images/ci/Dockerfile.coverage, enabling coverage-instrumented builds during CI runs.E2E Test Coverage Collection: Adds an
e2e-operator-coverageworkflow with coverage collection capabilities:setup-coveragestep that initializes the coverage environment before tests runstepthat runsmake test-e2ewith case-management credentialspostphase that executeshack/e2e-coverage.shcollect to gather coverage data after test completion, with Codecov credentials injected from a mounted secretpublish-e2e-coverageworkflow section that:hack/e2e-coverage.shcollectgatherstepPractical Impact: The must-gather-operator CI pipeline now automatically collects, processes, and publishes code coverage metrics to Codecov with each e2e test run, providing improved visibility into test coverage and enabling coverage trend tracking over time without manual intervention.
Summary by CodeRabbit
Adds Codecov-based coverage collection to the
must-gather-operatorOpenShift CI pipeline. The pipeline now builds a coverage image and runs AWS amd64 OCP 4.22 e2e coverage jobs. The jobs set up coverage, runmake test-e2ewith case-management credentials, and best-effort collect coverage with Codecov credentials. A postsubmit job publishes coverage data. The LGTM allowlist now includesmust-gather-operatoron themasterbranch.