Skip to content

Conversation

@vyasgun
Copy link
Contributor

@vyasgun vyasgun commented Oct 23, 2025

  • The qemu-img step fails on all workflows on macos-13.
  • To prevent this, it would be better to fix a version that works on macos-13 so we can run all the tests

Summary by CodeRabbit

  • Chores
    • Optimized build pipeline execution for different platform configurations to skip unnecessary steps
    • Enhanced test environment handling to improve reliability across different OS versions

@openshift-ci openshift-ci bot requested review from anjannath and cfergeau October 23, 2025 10:11
@openshift-ci
Copy link

openshift-ci bot commented Oct 23, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lstocchi for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

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

@cfergeau
Copy link
Collaborator

The approach/PR looks good to me, but it’s CI which will tell us whether it’s good to go in or not :)

@vyasgun
Copy link
Contributor Author

vyasgun commented Oct 23, 2025

The CI seems to be taking forever with this change 😞

@cfergeau
Copy link
Collaborator

It still tried to build some brew formulas from source instead of using pre-built binaries/libraries

@coderabbitai
Copy link

coderabbitai bot commented Oct 24, 2025

Walkthrough

Adds conditional execution to CI workflow and tests to skip qemu-img operations on macos-13 due to unavailability. The workflow conditionally installs and verifies qemu-img, while a test skips execution when the environment indicates macos-13.

Changes

Cohort / File(s) Change Summary
CI workflow conditional execution
.github/workflows/compile.yml
Adds conditional skips for qemu-img installation and verification steps on macos-13 runner; propagates RUNNER_OS_VERSION environment variable to Unit tests step
Test runtime skip logic
pkg/config/config_test.go
Adds runtime skip in TestVirtualMachine_ValidateBlockDevices when RUNNER_OS_VERSION equals "macos-13"

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • cfergeau
  • nirs

Poem

🐰 On macos-13, qemu takes a break,
No img for the taking, for CI's sake,
With skips and conditions, we dance around,
Tests hop away—not a failure found! 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Skip qemu installation on macos-13 runners" directly and accurately reflects the main changes in the changeset. The workflow file explicitly adds conditional if: matrix.runner != 'macos-13' statements to skip the qemu-img installation and verification steps on macos-13, and the test file adds a runtime skip for a specific test on macos-13. The title is specific, clear, and concise, providing sufficient context for a developer reviewing the history to understand the primary change without being overly broad or vague.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

@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: 0

🧹 Nitpick comments (1)
pkg/config/config_test.go (1)

52-54: Consider checking qemu-img availability directly instead of hardcoded OS check.

While this skip aligns with the workflow changes, using a hardcoded string comparison with "macos-13" is brittle. If the matrix value format changes (e.g., to "macOS-13" or "macos_13"), the check will silently fail.

Consider checking for qemu-img availability directly:

-	if os.Getenv("RUNNER_OS_VERSION") == "macos-13" {
-		t.Skip("Skipping test on macos-13 due to qemu-img not being available")
-	}
+	if _, err := exec.LookPath("qemu-img"); err != nil {
+		t.Skip("Skipping test: qemu-img not available")
+	}

This approach:

  • Works regardless of OS or runner version
  • Self-documents the actual dependency
  • Fails gracefully in any environment without qemu-img
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3530298 and b4d3b4c.

📒 Files selected for processing (2)
  • .github/workflows/compile.yml (1 hunks)
  • pkg/config/config_test.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-15)
  • GitHub Check: lint
🔇 Additional comments (2)
.github/workflows/compile.yml (2)

61-62: Good: Environment variable propagation enables OS-aware test skipping.

This correctly passes the runner OS version to unit tests, enabling the test skip logic in pkg/config/config_test.go.


52-59: Remove review comment—implementation is correct and internally consistent.

The code doesn't attempt to install qemu-img on macos-13; instead, it intentionally skips installation and the dependent tests properly handle this. The test in pkg/config/config_test.go (lines 52-54) explicitly skips on macos-13 using the RUNNER_OS_VERSION environment variable that your workflow propagates. Integration tests will run on macos-13 but skip the qemu-img-dependent tests—they won't fail.

However, if the PR title/description states qemu will be installed on macos-13, update them to clarify the actual behavior: qemu-img is not installed on macos-13 and dependent tests are skipped.

@vyasgun vyasgun changed the title Install qemu 10.1.0 on macos-13 runners Skip qemu installation on macos-13 runners Oct 25, 2025
@vyasgun
Copy link
Contributor Author

vyasgun commented Oct 27, 2025

There's only one test that uses qemu-img. The latest commit skips the test so the CI can pass.

@cfergeau
Copy link
Collaborator

cfergeau commented Nov 6, 2025

This should no longer be needed with #376

@cfergeau cfergeau closed this Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants