Skip to content

USHIFT-7221: Automate Polarion test: Verify sosreport can be consumed by omg & omc support tools#6991

Open
agullon wants to merge 2 commits into
openshift:mainfrom
agullon:USHIFT-7221
Open

USHIFT-7221: Automate Polarion test: Verify sosreport can be consumed by omg & omc support tools#6991
agullon wants to merge 2 commits into
openshift:mainfrom
agullon:USHIFT-7221

Conversation

@agullon

@agullon agullon commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Robot Framework test (OCP-61971) verifying MicroShift sosreport output can be consumed by omc and omg support tools
  • Extract shared SOS report keywords into test/resources/sos-report.resource to eliminate duplication between test suites
  • Add the new test to all three otp-workloads scenarios (el98 ostree, el98 bootc, el102 bootc)

Test Details

The test generates a sosreport, installs both tools on the remote host, and validates:

  • omc: use, get pods -A, get nodes, logs -c <container>, project
  • omg: use, project, get pods -A, get node --show-labels, get node -o wide, get pods -A -o json, logs -c <container>, projects

Tools are installed per-test (omc as a GitHub release binary, omg via pip in a venv) and cleaned up in teardown.

Test plan

  • Verified both test cases pass against a live MicroShift cluster (cluster-bot)
  • robotidy formatting validated
  • shellcheck passed on modified scenario scripts
  • CI validation via otp-workloads scenarios

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added shared reusable Robot Framework keywords for creating, extracting, and cleaning up MicroShift SOS report artifacts, including optional profile support.
  • Tests
    • Added a new suite that verifies SOS reports produced by MicroShift can be consumed by external support tooling (omc and omg).
    • Expanded existing release test runs to include the new SOS report support-tools suite across relevant release scenario scripts.

Add Robot Framework test (OCP-61971) that verifies MicroShift sosreport
output can be consumed by the omc and omg support tools. The test
generates a sosreport, installs both tools, and validates that each can
list pods, nodes, retrieve logs, and switch projects from the collected
data.

Extract shared SOS report keywords (Create Sos Report, Extract Sos
Report, Cleanup Sos Report Directory) into a new sos-report.resource
to eliminate duplication between test suites.

USHIFT-7221

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@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 6, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 6, 2026

Copy link
Copy Markdown

@agullon: This pull request references USHIFT-7221 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 task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add Robot Framework test (OCP-61971) verifying MicroShift sosreport output can be consumed by omc and omg support tools
  • Extract shared SOS report keywords into test/resources/sos-report.resource to eliminate duplication between test suites
  • Add the new test to all three otp-workloads scenarios (el98 ostree, el98 bootc, el102 bootc)

Test Details

The test generates a sosreport, installs both tools on the remote host, and validates:

  • omc: use, get pods -A, get nodes, logs -c <container>, project
  • omg: use, project, get pods -A, get node --show-labels, get node -o wide, get pods -A -o json, logs -c <container>, projects

Tools are installed per-test (omc as a GitHub release binary, omg via pip in a venv) and cleaned up in teardown.

Test plan

  • Verified both test cases pass against a live MicroShift cluster (cluster-bot)
  • robotidy formatting validated
  • shellcheck passed on modified scenario scripts
  • CI validation via otp-workloads scenarios

🤖 Generated with Claude Code

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 6, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Adds shared SOS report keywords, refactors the existing plugins suite to reuse them, introduces a new support-tools suite that validates omc and omg against extracted SOS output, and registers that suite in three scenario scripts.

Changes

SOS report test workflows

Layer / File(s) Summary
Shared resource and reuse
test/resources/sos-report.resource, test/suites/otp-workloads/sos-report-plugins.robot
Defines reusable SOS report create/extract/cleanup keywords and switches the existing plugins suite to the shared resource.
Support tools suite
test/suites/otp-workloads/sos-report-support-tools.robot
Adds setup/teardown, omc/omg install helpers, pod/container lookup helpers, and two test cases for consuming SOS reports.
Scenario suite registration
test/scenarios-bootc/el10/releases/el102-lrel@otp-workloads.sh, test/scenarios-bootc/el9/releases/el98-lrel@otp-workloads.sh, test/scenarios/releases/el98-lrel@otp-workloads.sh
Adds the new Robot suite to the host1 test list in three scenario scripts.

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

Suggested labels: ready-for-human-review


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error The new suite logs get node --show-labels and get node -o wide via a wrapper that logs stdout/stderr, exposing internal node hostnames/IPs. Avoid logging full node output: use a non-logging wrapper or redact hostnames/IPs, and keep assertions on only the fields you need.
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning FAIL: The new suite installs omc via curl from github.com and omg via pip install o-must-gather, so it needs public internet. Use mirrored/internal artifacts or a cluster-internal registry, or mark the test [Skipped:Disconnected] if internet access is required.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an automated test for sosreport consumption by omg and omc.
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 Test case names are static/descriptive; no dynamic identifiers, dates, pod/node/namespace names, or other run-to-run values appear in titles.
Test Structure And Quality ✅ Passed PR changes only Robot Framework suites/scripts, not Ginkgo tests; the added suites use suite setup/teardown and cleanup, so this Ginkgo-specific check is not applicable.
Microshift Test Compatibility ✅ Passed PR adds Robot Framework suites only; no Ginkgo It/Describe/Context/When tests or MicroShift-blocked API usage were found.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No multi-node/HA assumptions found; the new Robot suites only use OpenShift APIs/tools and run on one node as well, so the SNO check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Changes are only Robot test/resource files and scenario lists; no manifests, controllers, or scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed Only a Robot Framework variable-assignment formatting change was made; no main/init/suite setup code or stdout writes were introduced.
No-Weak-Crypto ✅ Passed Changed files contain no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, no custom crypto, and no secret/token comparisons.
Container-Privileges ✅ Passed No changed file adds privileged/root/hostPID/hostNetwork/hostIPC/SYS_ADMIN/allowPrivilegeEscalation settings in K8s/container manifests.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from jogeo and pmtk July 6, 2026 13:35
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon

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 Jul 6, 2026

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

🧹 Nitpick comments (2)
test/suites/otp-workloads/sos-report-support-tools.robot (2)

86-99: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin the omc release version and verify checksum.

Downloading latest from GitHub means the suite can silently start testing against a new/breaking omc release, and there's no integrity check on the binary before chmod +x/execution.

🔒 Pin version and verify checksum
+${OMC_VERSION}    v0.x.y  # pin to a known-good release
...
-        Command Should Work
-        ...    curl -sSfL --connect-timeout 30 --max-time 120 -o /tmp/omc.tar.gz https://github.com/gmeghnag/omc/releases/latest/download/omc_Linux_aarch64.tar.gz
+        Command Should Work
+        ...    curl -sSfL --connect-timeout 30 --max-time 120 -o /tmp/omc.tar.gz https://github.com/gmeghnag/omc/releases/download/${OMC_VERSION}/omc_Linux_aarch64.tar.gz
🤖 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/suites/otp-workloads/sos-report-support-tools.robot` around lines 86 -
99, Update the Install Omc keyword to stop fetching the mutable GitHub latest
asset and instead download a pinned omc release version for each supported
architecture; use the existing Install Omc flow and OMC_BINARY path to keep the
change localized. Add a checksum verification step after downloading the
archive/binary and before chmod +x or execution, so the suite validates the
artifact integrity for both the aarch64 tarball path and the x86_64 binary path.
Ensure the version and checksum values are explicit and easy to update in one
place.

106-110: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pin o-must-gather version for reproducibility.

Installing the latest pip release risks unexpected breakage/flakiness if a new upstream release changes CLI behavior.

♻️ Pin package version
-    Command Should Work    ${OMG_VENV}/bin/pip install o-must-gather
+    Command Should Work    ${OMG_VENV}/bin/pip install o-must-gather==<pinned-version>
🤖 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/suites/otp-workloads/sos-report-support-tools.robot` around lines 106 -
110, The Install Omg keyword currently installs the unpinned latest
o-must-gather release, which can make the sos-report support tools test flaky.
Update the Command Should Work call in Install Omg to install a specific
o-must-gather version instead of the floating package name, so the behavior
stays reproducible across runs. Keep the change localized to the Install Omg
keyword and preserve the existing venv setup and OMG_BINARY help check.
🤖 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/suites/otp-workloads/sos-report-support-tools.robot`:
- Around line 86-99: Update the Install Omc keyword to stop fetching the mutable
GitHub latest asset and instead download a pinned omc release version for each
supported architecture; use the existing Install Omc flow and OMC_BINARY path to
keep the change localized. Add a checksum verification step after downloading
the archive/binary and before chmod +x or execution, so the suite validates the
artifact integrity for both the aarch64 tarball path and the x86_64 binary path.
Ensure the version and checksum values are explicit and easy to update in one
place.
- Around line 106-110: The Install Omg keyword currently installs the unpinned
latest o-must-gather release, which can make the sos-report support tools test
flaky. Update the Command Should Work call in Install Omg to install a specific
o-must-gather version instead of the floating package name, so the behavior
stays reproducible across runs. Keep the change localized to the Install Omg
keyword and preserve the existing venv setup and OMG_BINARY help check.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: d7bfe747-df73-4617-ac1e-b8e8420f2d45

📥 Commits

Reviewing files that changed from the base of the PR and between 45630c7 and 1b99a3d.

📒 Files selected for processing (6)
  • test/resources/sos-report.resource
  • test/scenarios-bootc/el10/releases/el102-lrel@otp-workloads.sh
  • test/scenarios-bootc/el9/releases/el98-lrel@otp-workloads.sh
  • test/scenarios/releases/el98-lrel@otp-workloads.sh
  • test/suites/otp-workloads/sos-report-plugins.robot
  • test/suites/otp-workloads/sos-report-support-tools.robot

@agullon agullon changed the title USHIFT-7221: Automate sosreport compatibility test with omc and omg tools USHIFT-7221: Automate Polarion test: Verify sosreport can be consumed by omg & omc support tools Jul 6, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@agullon

agullon commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jul 6, 2026
@coderabbitai coderabbitai Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jul 6, 2026
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@agullon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-tests-arm d5c0c9d link true /test e2e-aws-tests-arm
ci/prow/e2e-aws-tests-bootc-release-el10 d5c0c9d link true /test e2e-aws-tests-bootc-release-el10

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.

@agullon

agullon commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

/retest

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. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants