Skip to content

Fix ContainerfilesDirect build instead of make targets to catch failures#180

Merged
openshift-merge-bot[bot] merged 3 commits intomigtools:oadp-devfrom
Joeavaikath:containerfile-fix
Apr 16, 2026
Merged

Fix ContainerfilesDirect build instead of make targets to catch failures#180
openshift-merge-bot[bot] merged 3 commits intomigtools:oadp-devfrom
Joeavaikath:containerfile-fix

Conversation

@Joeavaikath
Copy link
Copy Markdown
Contributor

@Joeavaikath Joeavaikath commented Apr 16, 2026

Why the changes were made

konflux.Dockerfile successfully builds but the oadp-cli binaries are absent: make target silently fails

How to test the changes made

konflux.Dockerfile build should succeed without issue

Summary by CodeRabbit

  • Chores
    • Restructured build to explicitly cross-compile platform-specific executables for Linux, macOS, and Windows (amd64/arm64), embedding version and commit metadata into each binary.
    • Produces per-binary checksums, includes license alongside artifacts, and adjusted packaging to collect all produced archives for the final image.
    • Updated the download-server build output handling and build configuration.

@openshift-ci openshift-ci Bot requested review from kaovilai and mpryc April 16, 2026 02:05
@Joeavaikath
Copy link
Copy Markdown
Contributor Author

/cherry-pick oadp-1.6

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

Warning

Rate limit exceeded

@Joeavaikath has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 0 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 33 minutes and 0 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9b7f7b5-297a-425c-b5f3-bffc2625e223

📥 Commits

Reviewing files that changed from the base of the PR and between daf8465 and ec8a9d6.

📒 Files selected for processing (2)
  • Containerfile.download
  • konflux.Dockerfile
📝 Walkthrough

Walkthrough

Replaces single make release-binaries steps with explicit per-platform cross-compilation loops in two Dockerfiles, adds VERSION and GIT_COMMIT build args wired into go build -ldflags, emits per-OS/arch binaries and .sha256 files into /archives, and updates final image to copy /archives and the download-server binary from the builder stage.

Changes

Cohort / File(s) Summary
Containerfile download build
Containerfile.download
Replaced make release-binaries with explicit loop building binaries for linux/darwin/windows (amd64, arm64), adds VERSION/GIT_COMMIT build args, injects buildinfo via -ldflags, writes binaries to /archives, creates .sha256 files, copies LICENSE.
Konflux build and final image
konflux.Dockerfile
Added VERSION/GIT_COMMIT build args; replaced make release-binaries with the cross-compile loop; updated download-server go build invocation to use -trimpath and write to /usr/local/bin/download-server; final stage now copies /archives and download-server from builder.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • kaovilai
  • mpryc
  • shubham-pampattiwar

Poem

🐰 I hopped through builds both near and far,
Cross-compiled bins for Windows, Mac, and Linux star.
Checksums tucked in archives, LICENSE by their side,
Binaries trimmed and named — what a joyous ride! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: replacing make targets with direct build commands in Containerfiles to catch build failures.
Description check ✅ Passed The description adequately covers both required sections with sufficient detail about the problem and testing approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@Joeavaikath: once the present PR merges, I will cherry-pick it on top of oadp-1.6 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick oadp-1.6

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.

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: 2

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

Inline comments:
In `@Containerfile.download`:
- Line 41: The checksum file currently contains absolute paths because the line
invoking sha256sum uses /archives/$output; change the invocation so sha256sum
computes checksums using relative filenames (e.g., run sha256sum from inside the
/archives directory or otherwise pass just $output as the filename) and write
the result to /archives/$output.sha256; update the sha256sum invocation that
references /archives/$output and $output.sha256 to ensure the output uses the
bare filename so downstream sha256sum -c works for users.

In `@konflux.Dockerfile`:
- Line 35: The checksum line currently invokes sha256sum on the absolute path
and writes an absolute-path filename (causing mismatch for users); update the
step that runs sha256sum on the $output artifact so it records the basename
rather than the absolute path and writes to a $output.sha256 file in the same
folder — achieve this by running sha256sum on the relative filename (or changing
into the archives directory first) so the produced checksum file contains the
plain filename and will verify with sha256sum -c; target the existing sha256sum
invocation that references $output and the generated .sha256 file.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0fb0a841-3f5f-4f31-a858-e015c63cb352

📥 Commits

Reviewing files that changed from the base of the PR and between b021c35 and 10bc90d.

📒 Files selected for processing (2)
  • Containerfile.download
  • konflux.Dockerfile

Comment thread Containerfile.download Outdated
Comment thread konflux.Dockerfile Outdated
Signed-off-by: Joseph <jvaikath@redhat.com>
@kaovilai
Copy link
Copy Markdown
Member

add checks for x bit would be good

Signed-off-by: Joseph <jvaikath@redhat.com>
@weshayutin
Copy link
Copy Markdown
Contributor

[2/2] STEP 2/5: COPY --from=builder /archives /archives
--> e97c81e7d536
[2/2] STEP 3/5: COPY --from=builder /usr/local/bin/download-server /usr/local/bin/download-server
--> 7489a1103572
[2/2] STEP 4/5: EXPOSE 8080
--> 4997152f3289
[2/2] STEP 5/5: CMD ["/usr/local/bin/download-server"]
[2/2] COMMIT
--> 78e94a5635ca
78e94a5635caa20e239b19157488af1dea2de1e61453f96928e8db9895443151

built for me :)

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 16, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Joeavaikath, kaovilai, weshayutin

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:
  • OWNERS [Joeavaikath,kaovilai,weshayutin]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit 98ddb0f into migtools:oadp-dev Apr 16, 2026
13 checks passed
@openshift-cherrypick-robot
Copy link
Copy Markdown

@Joeavaikath: new pull request created: #181

Details

In response to this:

/cherry-pick oadp-1.6

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants