USHIFT-7221: Automate Polarion test: Verify sosreport can be consumed by omg & omc support tools#6991
USHIFT-7221: Automate Polarion test: Verify sosreport can be consumed by omg & omc support tools#6991agullon wants to merge 2 commits into
Conversation
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
|
@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. 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. |
WalkthroughAdds 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. ChangesSOS report test workflows
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested labels: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
test/suites/otp-workloads/sos-report-support-tools.robot (2)
86-99: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winPin the
omcrelease version and verify checksum.Downloading
latestfrom GitHub means the suite can silently start testing against a new/breakingomcrelease, and there's no integrity check on the binary beforechmod +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 winPin
o-must-gatherversion 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
📒 Files selected for processing (6)
test/resources/sos-report.resourcetest/scenarios-bootc/el10/releases/el102-lrel@otp-workloads.shtest/scenarios-bootc/el9/releases/el98-lrel@otp-workloads.shtest/scenarios/releases/el98-lrel@otp-workloads.shtest/suites/otp-workloads/sos-report-plugins.robottest/suites/otp-workloads/sos-report-support-tools.robot
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> pre-commit.check-secrets: ENABLED
|
/label tide/merge-method-squash |
|
@agullon: 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. |
|
/retest |
Summary
omcandomgsupport toolstest/resources/sos-report.resourceto eliminate duplication between test suitesTest Details
The test generates a sosreport, installs both tools on the remote host, and validates:
use,get pods -A,get nodes,logs -c <container>,projectuse,project,get pods -A,get node --show-labels,get node -o wide,get pods -A -o json,logs -c <container>,projectsTools are installed per-test (omc as a GitHub release binary, omg via pip in a venv) and cleaned up in teardown.
Test plan
robotidyformatting validatedshellcheckpassed on modified scenario scripts🤖 Generated with Claude Code
Summary by CodeRabbit