Skip to content

USHIFT-7223: Automate Polarion tests OCP-66820 and OCP-66882#6905

Open
agullon wants to merge 3 commits into
openshift:mainfrom
agullon:USHIFT-7223
Open

USHIFT-7223: Automate Polarion tests OCP-66820 and OCP-66882#6905
agullon wants to merge 3 commits into
openshift:mainfrom
agullon:USHIFT-7223

Conversation

@agullon

@agullon agullon commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Robot Framework tests for two prerun data management scenarios in test/suites/backup/prerun-data-management.robot
  • OCP-66820: Verifies that modifying the version file to be 3 minors back causes MicroShift to fail and log the failure reason to prerun_failed.log, reported by greenboot healthcheck
  • OCP-66882: Verifies that removing /var/lib/microshift while health.json shows healthy causes MicroShift to start fresh, ignoring stale health info
  • Both tests added to existing CI scenarios (el98-src@backup-and-restore-on-reboot.sh and el98-lrel@backups.sh)

Test plan

  • Run el98-src@backup-and-restore-on-reboot presubmit scenario — verify both existing and new tests pass
  • Run el98-lrel@backups release scenario — verify both existing and new tests pass
  • Verify OCP-66820 test correctly detects version mismatch failure in prerun_failed.log
  • Verify OCP-66882 test correctly detects fresh start journal messages after data removal

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Expanded automated coverage for backup/restore reboot and release backup flows by running an additional prerun data management test suite alongside the existing backup-restore scenarios.
    • Added end-to-end assertions for version-file compatibility handling, including prerun failure reporting via healthcheck completion state and journal logs.
    • Validates “fresh start” behavior when MicroShift data directories are removed while persisted health remains healthy, ensuring expected journal messaging.

Add Robot Framework tests for prerun data management scenarios:

- OCP-66820: Verify that when the version file indicates a version
  3 minors behind the executable (exceeding MAX_VERSION_SKEW=2),
  MicroShift fails to start and logs the failure reason to
  prerun_failed.log, which is then reported by greenboot healthcheck.

- OCP-66882: Verify that when the MicroShift data directory is removed
  but health.json shows healthy status, MicroShift starts fresh as if
  it were the first run, ignoring the stale health info.

Both tests are added to existing CI scenarios:
- Presubmit: el98-src@backup-and-restore-on-reboot.sh
- Release: el98-lrel@backups.sh

Ref: USHIFT-7223

Co-Authored-By: Claude Opus 4.6 (1M context) <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 Jun 18, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 18, 2026

Copy link
Copy Markdown

@agullon: This pull request references USHIFT-7223 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 tests for two prerun data management scenarios in test/suites/backup/prerun-data-management.robot
  • OCP-66820: Verifies that modifying the version file to be 3 minors back causes MicroShift to fail and log the failure reason to prerun_failed.log, reported by greenboot healthcheck
  • OCP-66882: Verifies that removing /var/lib/microshift while health.json shows healthy causes MicroShift to start fresh, ignoring stale health info
  • Both tests added to existing CI scenarios (el98-src@backup-and-restore-on-reboot.sh and el98-lrel@backups.sh)

Test plan

  • Run el98-src@backup-and-restore-on-reboot presubmit scenario — verify both existing and new tests pass
  • Run el98-lrel@backups release scenario — verify both existing and new tests pass
  • Verify OCP-66820 test correctly detects version mismatch failure in prerun_failed.log
  • Verify OCP-66882 test correctly detects fresh start journal messages after data removal

🤖 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 Jun 18, 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: cb1b147b-9472-4a4a-9ebc-641dead61946

📥 Commits

Reviewing files that changed from the base of the PR and between 8d392c0 and 143d82c.

📒 Files selected for processing (1)
  • test/suites/backup/prerun-data-management.robot
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/suites/backup/prerun-data-management.robot

Walkthrough

A new Robot Framework test suite prerun-data-management.robot validates two MicroShift prerun recovery scenarios: version-file-too-old (expecting greenboot failure and prerun_failed.log) and missing data directory (expecting fresh-start journal messages). Two CI scenario scripts are updated to include the suite in their test runs.

Changes

Prerun Data Management Tests

Layer / File(s) Summary
Scenario script integration
test/scenarios/presubmits/el98-src@backup-and-restore-on-reboot.sh, test/scenarios/releases/el98-lrel@backups.sh
Both scenario_run_tests functions expand their run_tests host1 calls to include suites/backup/prerun-data-management.robot alongside existing suites.
Suite structure and foundation
test/suites/backup/prerun-data-management.robot (lines 1–89)
Suite-level imports, documentation, tags, filesystem path variables, and host login/logout setup/teardown keywords are defined.
End-to-end test scenarios
test/suites/backup/prerun-data-management.robot (lines 30–79)
Two test cases stop MicroShift, apply version manipulation or data-directory removal, reboot, wait for greenboot completion, assert journal and log outcomes, and restore state.
Test support keywords
test/suites/backup/prerun-data-management.robot (lines 90–163)
Keywords for version-file backup/edit via jq, greenboot state polling, journald content assertions, prerun_failed.log validation, backup-directory presence, persisted health checks, data-directory deletion with fresh-start verification, and conditional MicroShift startup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 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 directly references the Jira issue (USHIFT-7223) and accurately summarizes the main change: automating two Polarion tests for MicroShift's prerun data management functionality.
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 PR contains only Robot Framework tests, not Ginkgo tests. Custom check is specifically for Ginkgo test stability, so it's not applicable here.
Test Structure And Quality ✅ Passed Custom check is not applicable to this PR—it specifies Ginkgo test code review requirements, but the PR contains only Robot Framework tests (.robot files) and shell scripts, with no Ginkgo tests.
Microshift Test Compatibility ✅ Passed PR adds Robot Framework tests, not Ginkgo e2e tests. Custom check is specific to Ginkgo (It(), Describe(), Context()) and does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds Robot Framework tests only, no Ginkgo e2e tests. Custom check specifically targets Ginkgo tests, so it is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR contains only test files and scenarios, not deployment manifests, operator code, or controllers. Custom check is not applicable.
Ote Binary Stdout Contract ✅ Passed PR contains only shell scripts and Robot Framework tests, not OTE binaries or Go code with stdout-writing entry points (main, init, suite setup). Check not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR adds Robot Framework tests, not Ginkgo e2e tests. The custom check specifically applies to Ginkgo tests. The Robot Framework suite contains no IPv4 hardcoding, external connectivity, or IPv...
No-Weak-Crypto ✅ Passed PR contains only test and scenario files with no weak crypto, custom crypto implementations, or secret comparisons—all string comparisons are non-sensitive diagnostic values.
Container-Privileges ✅ Passed No container/K8s manifests present in PR. Changes are test scripts (.sh) and Robot Framework test suite (.robot) files, which fall outside the scope of the container-privileges check.
No-Sensitive-Data-In-Logs ✅ Passed PR adds test suite that reads version files, system logs, and error logs only—no passwords, tokens, API keys, PII, session IDs, or customer data exposed in logging.

✏️ 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 requested review from ggiguash and jogeo June 18, 2026 14:40
@openshift-ci

openshift-ci Bot commented Jun 18, 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 Jun 18, 2026
@agullon

agullon commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/retest

agullon added 2 commits June 19, 2026 11:00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@openshift-ci

openshift-ci Bot commented Jun 19, 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-bootc-release-el10 5eab0b7 link true /test e2e-aws-tests-bootc-release-el10
ci/prow/e2e-aws-tests-bootc-release-arm-el10 5eab0b7 link true /test e2e-aws-tests-bootc-release-arm-el10
ci/prow/e2e-aws-tests-bootc-release-el9 5eab0b7 link true /test e2e-aws-tests-bootc-release-el9
ci/prow/e2e-aws-tests-bootc-arm-el10 5eab0b7 link true /test e2e-aws-tests-bootc-arm-el10
ci/prow/e2e-aws-tests-bootc-el9 5eab0b7 link true /test e2e-aws-tests-bootc-el9
ci/prow/e2e-aws-tests-release 5eab0b7 link true /test e2e-aws-tests-release
ci/prow/e2e-aws-tests 5eab0b7 link true /test e2e-aws-tests
ci/prow/e2e-aws-tests-release-arm 5eab0b7 link true /test e2e-aws-tests-release-arm
ci/prow/e2e-aws-tests-bootc-el10 5eab0b7 link true /test e2e-aws-tests-bootc-el10
ci/prow/e2e-aws-tests-bootc-release-arm-el9 5eab0b7 link true /test e2e-aws-tests-bootc-release-arm-el9
ci/prow/e2e-aws-tests-arm 5eab0b7 link true /test e2e-aws-tests-arm

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/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants