Skip to content

USHIFT-6979: Reorganize optional RF tests#6667

Draft
pacevedom wants to merge 3 commits into
openshift:mainfrom
pacevedom:USHIFT-6979
Draft

USHIFT-6979: Reorganize optional RF tests#6667
pacevedom wants to merge 3 commits into
openshift:mainfrom
pacevedom:USHIFT-6979

Conversation

@pacevedom
Copy link
Copy Markdown
Contributor

@pacevedom pacevedom commented May 13, 2026

Summary by CodeRabbit

  • Tests

    • Enhanced test infrastructure for optional MicroShift components including cert-manager, gateway API, device plugins, and networking features
    • Improved test configuration and lifecycle management for optional feature testing
  • Chores

    • Updated CI build process for image layer handling

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@pacevedom
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-periodic

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pacevedom

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 May 13, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR introduces a Robot Framework optional configuration system for MicroShift test suites, enabling per-suite optional component enablement via configurable manifests directories, and updates a CI build script to force rebuild image layers.

Changes

MicroShift Optional Configuration Framework

Layer / File(s) Summary
Optional config resource implementation
test/resources/optional-config.resource
New optional-config.resource provides three keywords: Setup MicroShift With Optionals saves the default config, generates a kustomize-paths YAML with base manifests plus per-argument optional directories, stops/uploads/restarts MicroShift, and waits for readiness; Teardown MicroShift With Optionals restores or clears config; Build Optionals Config constructs the YAML string.
Suites with Setup/Teardown wrapper pattern
test/suites/optional/cert-manager.robot, test/suites/optional/gateway-api.robot, test/suites/optional/healthchecks-disabled-service.robot, test/suites/optional/sriov.robot, test/suites/optional/tls-scanner.robot
Each suite imports optional-config.resource, defines local Setup and Teardown keywords that wrap the base suite setup/teardown with Setup MicroShift With Optionals (specifying one optional like 060-microshift-cert-manager or 070-microshift-sriov) and Teardown MicroShift With Optionals, and updates Suite Setup/Suite Teardown to use the local wrappers.
Suites with complex or inline integration
test/suites/optional/generic-device-plugin.robot, test/suites/optional/multus.robot, test/suites/optional/observability.robot, test/suites/optional/olm.robot
These suites integrate optionals setup/teardown either inline into existing suite setup/teardown keywords (multus, observability, olm) or with custom teardown logic (generic-device-plugin extends GDP teardown with optional teardown). All import optional-config.resource and call Setup/Teardown MicroShift With Optionals to enable their respective optional components.

CI Image Build Optimization

Layer / File(s) Summary
CI per-layer force rebuild flag
test/bin/ci_phase_iso_build.sh
In run_image_build()'s CI-only per-layer build path, ./bin/build_images.sh is now invoked with the -f flag (force rebuild) in addition to -l for layer1-base and layer2-presubmit images.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • openshift/microshift#6658: Modifies test/bin/ci_phase_iso_build.sh to add the -f build flag for the layer1-base image in the CI per-layer build path.

Suggested reviewers

  • pmtk
  • ggiguash
  • jerpeter1
🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: reorganizing optional Robot Framework tests with new setup/teardown infrastructure.
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 custom check applies to Ginkgo test names in Go files. This PR modifies only bash scripts, Robot Framework resources, and Robot Framework test suites - no Go files. The check is not applicable.
Test Structure And Quality ✅ Passed Check not applicable. The PR contains no Ginkgo test code—only Robot Framework tests and bash scripts. The custom check requires Go/Ginkgo patterns that don't exist here.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests are added or modified in this PR. All changes are Robot Framework tests and supporting infrastructure, which are outside the scope of this check.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies Robot Framework tests (.robot files) in MicroShift, not Ginkgo e2e tests. The SNO check applies only to new Ginkgo tests (Go code), which are absent here.
Topology-Aware Scheduling Compatibility ✅ Passed Changes are test infrastructure only: Robot Framework test resources, test suites, and CI build scripts. No deployment manifests, operator code, or controllers are modified. Check is inapplicable.
Ote Binary Stdout Contract ✅ Passed PR contains only Bash scripts and Robot Framework files. OTE Binary Stdout Contract check targets Go/Ginkgo test binaries. No Go code or binary entry points present—check is not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR contains no Ginkgo e2e tests, only Robot Framework tests and shell scripts. The custom check applies only to Ginkgo tests, making it not applicable.

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

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pacevedom pacevedom changed the title Ushift 6979 USHIFT-6979: Reorganize optional RF tests May 13, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 13, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 13, 2026

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

Details

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@test/bin/scenario.sh`:
- Around line 317-344: collect_pcp_reports_for_vm_offline is missing the
fault-tolerance in collect_pcp_reports_for_vm: make the remote stop and archive
steps tolerant of absent service or missing dirs by updating the
invoke_qemu_script "bash" call that runs "sudo systemctl stop pmlogger" to
append "|| true" and change the tar invocation to first check the directory
(e.g., test -d /var/log/pcp/pmlogger && tar ...) or append "|| true" to the tar
command; ensure the same target paths used in collect_pcp_reports_for_vm are
validated before downloading so the function gracefully continues if pmlogger or
/var/log/pcp/pmlogger are absent.

In `@test/resources/optional-config.resource`:
- Around line 29-31: The teardown step "Teardown MicroShift With Optionals"
currently only restores the config file ("Restore Default MicroShift Config")
but does not apply it to the running MicroShift process; update the teardown to
reload or restart MicroShift after restoring the file (e.g., call the same
restart/reload mechanism your suite uses elsewhere—systemctl restart microshift,
microshift --reload, or sending the appropriate signal) so the restored config
takes effect before finishing the suite.
🪄 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: 69a2be94-ae06-4486-93bb-fd729cfca720

📥 Commits

Reviewing files that changed from the base of the PR and between 7e80ce3 and a723336.

📒 Files selected for processing (28)
  • test/bin/ci_phase_iso_build.sh
  • test/bin/scenario.sh
  • test/image-blueprints-bootc/el10/layer1-base/group1/rhel102-test-agent.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group1/rhel96-test-agent.containerfile
  • test/image-blueprints-bootc/el9/layer1-base/group1/rhel98-test-agent.containerfile
  • test/image-blueprints-bootc/upstream/group1/cos10-test-agent.containerfile
  • test/image-blueprints-bootc/upstream/group1/cos9-test-agent.containerfile
  • test/image-blueprints/layer1-base/group1/rhel96.toml
  • test/image-blueprints/layer1-base/group1/rhel98.toml
  • test/image-blueprints/layer2-presubmit/group1/rhel98-source-base.toml
  • test/image-blueprints/layer2-presubmit/group1/rhel98-source-fake-next-minor.toml
  • test/image-blueprints/layer2-presubmit/group1/rhel98-source-with-optionals.toml
  • test/image-blueprints/layer2-presubmit/group1/rhel98-source.toml
  • test/image-blueprints/layer3-periodic/group1/rhel98-source-isolated.toml
  • test/image-blueprints/layer4-release/group1/rhel96-brew-y2-with-optionals.toml
  • test/image-blueprints/layer4-release/group2/rhel96-brew-y1-with-optionals.toml
  • test/image-blueprints/layer4-release/group3/rhel98-brew-lrel-optional.toml
  • test/image-blueprints/layer4-release/group3/rhel98-brew-nightly-with-optionals.toml
  • test/resources/optional-config.resource
  • test/suites/optional/cert-manager.robot
  • test/suites/optional/gateway-api.robot
  • test/suites/optional/generic-device-plugin.robot
  • test/suites/optional/healthchecks-disabled-service.robot
  • test/suites/optional/multus.robot
  • test/suites/optional/observability.robot
  • test/suites/optional/olm.robot
  • test/suites/optional/sriov.robot
  • test/suites/optional/tls-scanner.robot

Comment thread test/bin/scenario.sh
Comment thread test/resources/optional-config.resource Outdated
Comment on lines +29 to +31
Teardown MicroShift With Optionals
[Documentation] Restore the original MicroShift config after a suite.
Restore Default MicroShift Config
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Restore is not applied to the running service.

Teardown MicroShift With Optionals only restores the config file; MicroShift keeps running with the previously loaded optionals until it is restarted.

Proposed fix
 Teardown MicroShift With Optionals
     [Documentation]    Restore the original MicroShift config after a suite.
     Restore Default MicroShift Config
+    Stop MicroShift
+    Start MicroShift
+    Setup Kubeconfig
+    Wait For MicroShift
🤖 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/resources/optional-config.resource` around lines 29 - 31, The teardown
step "Teardown MicroShift With Optionals" currently only restores the config
file ("Restore Default MicroShift Config") but does not apply it to the running
MicroShift process; update the teardown to reload or restart MicroShift after
restoring the file (e.g., call the same restart/reload mechanism your suite uses
elsewhere—systemctl restart microshift, microshift --reload, or sending the
appropriate signal) so the restored config takes effect before finishing the
suite.

@pacevedom
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-periodic

@pacevedom
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-periodic

@pacevedom
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-periodic

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 14, 2026
@pacevedom
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-periodic

@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 14, 2026
Add optional-config.resource with keywords to reconfigure MicroShift's
kustomizePaths so each test suite loads only its required manifests.d
directories. This avoids running all optional controllers simultaneously,
reducing API server contention from concurrent controller wake-ups.
@pacevedom
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-periodic

pacevedom added 2 commits May 14, 2026 19:15
Each optional test suite now reconfigures MicroShift at setup to load
only its own manifests.d directory, cleans etcd data, and restarts
fresh. Suites that don't need optional components run with base
manifests only.

Suite-to-manifests.d mapping:
- olm.robot: 001-microshift-olm
- cert-manager.robot: 060-microshift-cert-manager
- gateway-api.robot: 000-microshift-gateway-api
- sriov.robot: 070-microshift-sriov
- multus, observability, healthchecks, tls-scanner, GDP: base only
@pacevedom
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-periodic

1 similar comment
@pacevedom
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-periodic

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 14, 2026

@pacevedom: The following test 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-periodic 8ee6791 link true /test e2e-aws-tests-periodic

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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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