Skip to content

OAPE-698: Integrate codecov in the must-gather-operator - #82482

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
praveencodes:OAPE-698
Aug 13, 2026
Merged

OAPE-698: Integrate codecov in the must-gather-operator#82482
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
praveencodes:OAPE-698

Conversation

@praveencodes

@praveencodes praveencodes commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This PR integrates Codecov-based code coverage collection into the must-gather-operator's OpenShift CI pipeline.

Affected Component: openshift/must-gather-operator CI configuration (openshift-must-gather-operator-master.yaml)

Changes Made:

The PR adds comprehensive code coverage instrumentation to the must-gather-operator's CI workflow:

  1. 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.

  2. E2E Test Coverage Collection: Adds an e2e-operator-coverage workflow with coverage collection capabilities:

  • Introduces a setup-coverage step that initializes the coverage environment before tests run
  • Adds a dedicated test step that runs make test-e2e with case-management credentials
  • Adds a post phase that executes hack/e2e-coverage.sh collect to gather coverage data after test completion, with Codecov credentials injected from a mounted secret
  1. Coverage Publishing Workflow: Introduces a new publish-e2e-coverage workflow section that:
  • Performs its own coverage collection via hack/e2e-coverage.sh collect
  • Chains coverage gathering with the standard gather step
  • Includes installation and setup phases to ensure proper environment configuration

Practical 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-operator OpenShift CI pipeline. The pipeline now builds a coverage image and runs AWS amd64 OCP 4.22 e2e coverage jobs. The jobs set up coverage, run make test-e2e with case-management credentials, and best-effort collect coverage with Codecov credentials. A postsubmit job publishes coverage data. The LGTM allowlist now includes must-gather-operator on the master branch.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 27, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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

Details

In response to this:

This PR integrates Codecov-based code coverage collection into the must-gather-operator's OpenShift CI pipeline.

Affected Component: openshift/must-gather-operator CI configuration (openshift-must-gather-operator-master.yaml)

Changes Made:

The PR adds comprehensive code coverage instrumentation to the must-gather-operator's CI workflow:

  1. 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.

  2. E2E Test Coverage Collection: Adds an e2e-operator-coverage workflow with coverage collection capabilities:

  • Introduces a setup-coverage step that initializes the coverage environment before tests run
  • Adds a dedicated test step that runs make test-e2e with case-management credentials
  • Adds a post phase that executes hack/e2e-coverage.sh collect to gather coverage data after test completion, with Codecov credentials injected from a mounted secret
  1. Coverage Publishing Workflow: Introduces a new publish-e2e-coverage workflow section that:
  • Performs its own coverage collection via hack/e2e-coverage.sh collect
  • Chains coverage gathering with the standard gather step
  • Includes installation and setup phases to ensure proper environment configuration

Practical 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.

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.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: f02231ac-e0f3-42a5-84cb-a75eb9327929

📥 Commits

Reviewing files that changed from the base of the PR and between 61c3085 and 65e01bb.

⛔ Files ignored due to path filters (3)
  • ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-periodics.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-postsubmits.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (2)
  • ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml
  • core-services/pipeline-controller/lgtm-config.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • core-services/pipeline-controller/lgtm-config.yaml
  • ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml

Walkthrough

Adds 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.

Changes

Must-gather operator coverage CI

Layer / File(s) Summary
Coverage inputs and e2e workflows
ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml
Adds the operator SDK base image, maps the coverage Dockerfile to an image, and defines non-postsubmit and postsubmit e2e coverage workflows.
Repository branch registration
core-services/pipeline-controller/lgtm-config.yaml
Adds the must-gather-operator repository with master as its configured branch.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Mergeability Score: ⚪ Minimal · up to 65e01

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
Loading

Possibly related PRs

Suggested labels: lgtm

Suggested reviewers: charlesgong, pruan-rht, shivprakashmuley

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: integrating Codecov coverage collection into the must-gather-operator pipeline.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Stable And Deterministic Test Names ✅ Passed The diff adds only CI YAML and an LGTM allowlist entry; searches found no added Ginkgo declarations, test titles, or dynamic title interpolation.
Test Structure And Quality ✅ Passed The PR changes only CI YAML files and adds no Ginkgo test code, It blocks, assertions, fixtures, or test waits to assess under this check.
Microshift Test Compatibility ✅ Passed The PR diff adds only CI YAML and workflow wiring. It adds no Ginkgo test declarations or test-source files, so this MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The diff adds only CI YAML and generated job configuration; it adds no Ginkgo tests or test source, so SNO compatibility checks do not apply.
Topology-Aware Scheduling Compatibility ✅ Passed The full PR diff only adds CI pipeline images, workflows, and an allowlist entry; it adds no deployment/operator scheduling constraints such as affinity, selectors, tolerations, replicas, spreads,...
Ote Binary Stdout Contract ✅ Passed The PR changes only CI YAML and generated job orchestration; no main, suite setup, or other process-level code adds stdout writes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR diff adds only CI YAML and generated Prow jobs; it adds no Ginkgo test declarations or test source with IPv4 assumptions or external connectivity.
No-Weak-Crypto ✅ Passed The cumulative diff adds CI YAML, job wiring, secret mounts, and coverage commands only; it introduces no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, crypto implementation, or secret comparison.
Container-Privileges ✅ Passed The PR diff adds no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, or root settings; the bundle install explicitly uses restricted security context.
No-Sensitive-Data-In-Logs ✅ Passed Added workflows mount credentials by path and call the coverage helper; the helper passes CODECOV_TOKEN via environment without printing it, and no added line contains literal sensitive data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@praveencodes

Copy link
Copy Markdown
Contributor Author

/cc @shivprakashmuley @swghosh

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Duplicated step definitions between the two tests.

This steps block is a verbatim copy of e2e-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

📥 Commits

Reviewing files that changed from the base of the PR and between bc29888 and d413f9d.

⛔ Files ignored due to path filters (2)
  • ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-postsubmits.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (2)
  • ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml
  • core-services/pipeline-controller/lgtm-config.yaml

@praveencodes
praveencodes force-pushed the OAPE-698 branch 2 times, most recently from 8a64701 to 8caedb8 Compare July 29, 2026 10:59
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: pj-rehearse could not automatically process this event because the request waited in queue for longer than 5 minutes. Use /pj-rehearse to trigger rehearsals manually.

@praveencodes

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@praveencodes

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@praveencodes

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

1 similar comment
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@praveencodes

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-must-gather-operator-master-e2e-gcp-operator

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@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

@praveencodes

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-must-gather-operator-master-e2e-operator-coverage

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@praveencodes

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-must-gather-operator-master-e2e-operator-coverage

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@praveencodes

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-must-gather-operator-master-e2e-operator-coverage

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@praveencodes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@shivprakashmuley

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2026
@shivprakashmuley

Copy link
Copy Markdown
Contributor

/approve

@shivprakashmuley

Copy link
Copy Markdown
Contributor

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@shivprakashmuley: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 12, 2026
@shivprakashmuley

Copy link
Copy Markdown
Contributor

/approve

@praveencodes

Copy link
Copy Markdown
Contributor Author

@danilo-gemoli Could you please check the PR and approve it as it has changes in core-services/pipeline-controller/lgtm-config.yaml?

@pruan-rht

Copy link
Copy Markdown
Member

/lgtm
/approve

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 13, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 61c3085 and 2 for PR HEAD 8caedb8 in total

praveencodes and others added 2 commits August 13, 2026 11:50
Include images/ci/Dockerfile.coverage in sparse_checkout_files after make jobs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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.

@openshift-merge-bot openshift-merge-bot Bot removed the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 13, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@praveencodes: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-must-gather-operator-master-e2e-operator-coverage openshift/must-gather-operator presubmit Presubmit changed
pull-ci-openshift-must-gather-operator-master-ci-bundle-must-gather-operator-bundle openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-coverage openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-e2e-gcp-operator openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-e2e-gcp-operator-rhcos10 openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-e2e-gcp-operator-rhcos10-fips openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-images openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-lint openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-multi-ci-bundle-must-gather-operator-bundle openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-multi-images openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-test openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-validate-boilerplate openshift/must-gather-operator presubmit Ci-operator config changed
pull-ci-openshift-must-gather-operator-master-verify-deps openshift/must-gather-operator presubmit Ci-operator config changed
periodic-ci-openshift-must-gather-operator-master-multi-e2e-aws-operator-multi-weekly N/A periodic Ci-operator config changed
periodic-ci-openshift-must-gather-operator-master-e2e-hypershift-operator N/A periodic Ci-operator config changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@shivprakashmuley

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 13, 2026
@openshift-ci

openshift-ci Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shivprakashmuley

Copy link
Copy Markdown
Contributor

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@shivprakashmuley: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 13, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit fbcf11d into openshift:main Aug 13, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants