Skip to content

OCPBUGS-86473: Further optimize oc must gather tests to improve efficiency#31282

Open
xueqzhan wants to merge 1 commit into
openshift:mainfrom
xueqzhan:mg-further-improvement
Open

OCPBUGS-86473: Further optimize oc must gather tests to improve efficiency#31282
xueqzhan wants to merge 1 commit into
openshift:mainfrom
xueqzhan:mg-further-improvement

Conversation

@xueqzhan

@xueqzhan xueqzhan commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

We are still CPU pressure during oc must-gather test phase. Many of those tests are testing client side behavior (flags) and do not need a full must-gather data collection.

Summary by CodeRabbit

  • Tests
    • Updated test cases for the must-gather command to improve test reliability and consistency of command flag handling.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@xueqzhan: This pull request references Jira Issue OCPBUGS-86473, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

We are still CPU pressure during oc must-gather test phase. Many of those tests are testing client side behavior (flags) and do not need a full must-gather data collection.

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.

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xueqzhan

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 10, 2026
@openshift-ci openshift-ci Bot requested review from deads2k and p0lyn0mial June 10, 2026 21:09
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

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: 1c09b831-230b-4181-ad1a-7fb0875c0a0f

📥 Commits

Reviewing files that changed from the base of the PR and between af43b92 and a2c53d3.

📒 Files selected for processing (1)
  • test/extended/cli/mustgather.go

Walkthrough

The PR updates test/extended/cli/mustgather.go test cases to execute explicit post--- commands (/bin/true) when invoking oc adm must-gather, replacing implicit default behavior. Changes span since/since-time flag validation tests and image-stream test cases, with clarifying comments about gather.logs creation.

Changes

Must-gather test invocations

Layer / File(s) Summary
Explicit command invocations in must-gather tests
test/extended/cli/mustgather.go
Test cases for since format, since-time format, and image-stream validation now include explicit -- /bin/true commands after destination directory arguments, replacing prior default behavior; comments clarify that gather.logs is created by the oc client wrapper.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • openshift/origin#31200: Both PRs modify test/extended/cli/mustgather.go to update oc adm must-gather invocations with explicit post--- commands (e.g., -- /bin/true).

Suggested labels

lgtm, ready-for-human-review

Suggested reviewers

  • p0lyn0mial
  • sjenning
  • sanchezl
🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Tests lack meaningful assertion messages (49+ assertions without messages) and audit logs test violates single responsibility with ~210 lines covering 5 distinct concerns. Add failure messages to all Expect assertions per the custom check guidance, and split the audit logs test into focused, single-concern tests.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: optimizing oc must-gather tests for efficiency, which aligns with the changeset updating test invocations to use /bin/true.
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 All test names are static with no timestamps, UUIDs, pod names, or generated identifiers. Changes modified test bodies only, not test titles.
Microshift Test Compatibility ✅ Passed PR modifies existing tests, not adding new ones. All modified test cases are within tests already protected with [apigroup:config.openshift.io] tags, automatically skipped on MicroShift.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR modifies existing tests only; no new Ginkgo e2e tests (It(), Describe(), Context(), etc.) are added. The SNO compatibility check applies only to new tests being added.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test code (test/extended/cli/mustgather.go). No deployment manifests, operator code, controllers, or scheduling constraints are introduced or modified.
Ote Binary Stdout Contract ✅ Passed No OTE Binary Stdout Contract violations. PR modifies only test invocations within Ginkgo v2 test blocks, with no process-level code (main, init, TestMain, BeforeSuite) or unfiltered stdout writes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR modifies existing Ginkgo tests rather than adding new ones. Custom check applies only to new tests; existing test modifications are not in scope.
No-Weak-Crypto ✅ Passed The modified file (test/extended/cli/mustgather.go) is a test suite with no cryptographic code, weak crypto usage, custom implementations, or secret comparison operations.
Container-Privileges ✅ Passed PR modifies only test code (mustgather.go), no Kubernetes/container manifests with privilege settings are introduced.
No-Sensitive-Data-In-Logs ✅ Passed No passwords, tokens, API keys, PII, or session IDs logged. ClusterID in must-gather.logs is operational diagnostic data, not sensitive credentials.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jun 10, 2026
@xueqzhan

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-ovn-upgrade-fips-rhcos9-techpreview

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xueqzhan: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-ovn-upgrade-fips-rhcos9-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/b8e4ae40-6511-11f1-906a-2d1129b39360-0

@xueqzhan

Copy link
Copy Markdown
Contributor Author

/payload-aggregate periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-ovn-upgrade-fips-rhcos9-techpreview 3

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xueqzhan: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-ovn-upgrade-fips-rhcos9-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/eb9f5320-6512-11f1-93fe-e4fa2ab47fe8-0

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@xueqzhan

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@xueqzhan: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants