Skip to content

Fix MicroShift build problems caused by OKD version disperancy and downstream changes#217

Merged
ggiguash merged 3 commits intomicroshift-io:mainfrom
ggiguash:fix-build-problems
May 4, 2026
Merged

Fix MicroShift build problems caused by OKD version disperancy and downstream changes#217
ggiguash merged 3 commits intomicroshift-io:mainfrom
ggiguash:fix-build-problems

Conversation

@ggiguash
Copy link
Copy Markdown
Contributor

@ggiguash ggiguash commented May 3, 2026

Resolves #216

See #218 for a follow-up on cleaning up the TODO item introducted in this PR.

Summary by CodeRabbit

  • Chores
    • Updated build system with improved help documentation and target organization.
    • Enhanced cross-platform build support with per-architecture version detection for amd64 and arm64 systems.

@ggiguash ggiguash requested a review from a team as a code owner May 3, 2026 11:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

📝 Walkthrough

Walkthrough

The PR extends the Makefile's help text with additional sub-target descriptions and reorders the copr.mk include. It also adds skopeo to the SRPM container, introduces per-architecture OKD version detection via get_version.sh, and updates prebuild scripts to use architecture-specific version tags instead of a shared global tag.

Changes

Makefile Help & Include Ordering

Layer / File(s) Summary
Help Text Extension
Makefile
all target help output extended with COPR-related and run/cleanup sub-target descriptions.
Include Reordering
Makefile
src/copr/copr.mk include moved after the all target definition to ensure help output generates correctly.

Multi-Architecture OKD Version Detection

Layer / File(s) Summary
Dependencies
packaging/srpm.Containerfile
skopeo added to dnf install list alongside existing build dependencies.
Version Script Setup
packaging/srpm.Containerfile
OKD_GET_VERSION_SCRIPT build arg and ./src/okd/get_version.sh copied into container image.
Per-Architecture Version Detection
packaging/srpm.Containerfile
New RUN block auto-detects OKD version tags for x86_64 and aarch64 architectures, writes them to /tmp/okd_version_x86_64 and /tmp/okd_version_aarch64.
Prebuild Script Updates
packaging/srpm.Containerfile
USHIFT_PREBUILD_SCRIPT calls updated to use per-architecture version files instead of shared OKD_VERSION_TAG for OKD release, kindnet, and multus image replacements.

Sequence Diagram

sequenceDiagram
    participant Build as Container Build
    participant Script as get_version.sh
    participant Files as Version Files
    participant Prebuild as prebuild.sh

    Build->>Script: Execute to detect OKD versions
    Script->>Script: Detect arch-specific versions
    Script->>Files: Write x86_64 version to /tmp/okd_version_x86_64
    Script->>Files: Write aarch64 version to /tmp/okd_version_aarch64
    Files-->>Prebuild: Read per-arch versions
    Prebuild->>Prebuild: Replace OKD/kindnet/multus refs with correct arch-specific tags
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • pmtk
  • agullon
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: fixing MicroShift build problems by addressing OKD version disparity across platforms, which is directly related to the PR's code modifications.
Linked Issues check ✅ Passed The PR addresses issue #216 by fixing OKD version handling in the build system: Makefile help output correction and per-architecture OKD version management in srpm.Containerfile to resolve versioning mismatches.
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving #216: Makefile help text adjustment and per-architecture OKD version management in the container build. No extraneous modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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
Copy Markdown

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packaging/srpm.Containerfile`:
- Around line 32-43: The RUN step calls the OKD_GET_VERSION_SCRIPT (which uses
skopeo list-tags) without retries and can fail transiently; add a shell retry
helper function (e.g., retry()) defined once before the conditional in the same
Dockerfile/RUN context and wrap both invocations of "${OKD_GET_VERSION_SCRIPT}"
(the two uses that produce /tmp/okd_version_x86_64 and /tmp/okd_version_aarch64)
with that retry helper so each cross-arch lookup is retried (matching the
existing curl --retry pattern) before writing the tmp files and continuing the
echo logging.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0af485a5-2a5d-4be0-a1a7-ccf972c64278

📥 Commits

Reviewing files that changed from the base of the PR and between f915e4c and 5ff5c8b.

📒 Files selected for processing (2)
  • Makefile
  • packaging/srpm.Containerfile

Comment thread packaging/srpm.Containerfile
@ggiguash ggiguash merged commit 827a388 into microshift-io:main May 4, 2026
15 checks passed
@ggiguash ggiguash deleted the fix-build-problems branch May 4, 2026 08:08
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.

Upstream builds are broken due to openshift-5.0 versioning switch downstream

2 participants