-
Notifications
You must be signed in to change notification settings - Fork 20
🐛 fix multi-arch build issues #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughGitHub Actions workflow configuration updated to add pull request triggers for main and release branches, introduce a publish parameter with conditional logic based on event type, and restrict the image analyzer job to push events only. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ 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). (6)
🔇 Additional comments (4)
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. Comment |
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In @.github/workflows/image-build.yaml:
- Line 22: The workflow references an external action
"pranavgaikwad/release-tools/.github/workflows/build-push-images.yaml@feat/makePushOptional"
which may be inaccessible or transient; verify that the fork and branch exist
and are publicly accessible, and if the feature was merged upstream update the
uses entry to "konveyor/release-tools@main" (or the appropriate stable branch)
in the .github/workflows/image-build.yaml replace the current uses string,
otherwise add a comment in the workflow documenting that this is a temporary
fork/branch with a timeline and include a pointer to the audited action code (or
vendor it into the repo) so reviewers can inspect it.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/image-build.yaml
⏰ 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). (2)
- GitHub Check: JDT.LS Integration Tests (Phase 2)
- GitHub Check: Build tackle2-addon-analyzer
🔇 Additional comments (3)
.github/workflows/image-build.yaml (3)
5-8: LGTM! Pull request trigger enables build validation.Adding the pull_request trigger allows multi-arch builds to be tested on PRs before merging, which aligns with the PR objectives. Combined with the conditional publish logic on Line 28, this enables dry-run builds.
37-37: LGTM! Correctly prevents downstream triggers on PRs.The condition ensures that the analyzer rebuild is only triggered on actual pushes, not on pull requests. This is the correct behavior - PRs should only validate the build without triggering downstream actions.
28-28: Verify the publish parameter uses string comparison in the called workflow.The conditional expression evaluates to string
'false'or'true'rather than boolean values. In GitHub Actions, a non-empty string like'false'is truthy, which means the called workflow must use string comparison (inputs.publish == 'true') or convert the value withfromJson()to properly handle the false case.If the external workflow (
build-push-images.yamlin the fork) checks the parameter as a boolean directly (e.g.,if: ${{ inputs.publish }}), images will be published even on pull requests.To fix, either:
- Use
fromJson():publish: ${{ github.event_name == 'pull_request' && false || true }}- Verify the called workflow uses string comparison:
if: ${{ inputs.publish == 'true' }}
Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
c48e64b to
67e76ec
Compare
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In @.github/workflows/image-build.yaml:
- Line 22: The workflow references a personal fork and feature branch via the
`uses:
pranavgaikwad/release-tools/.github/workflows/build-push-images.yaml@feat/makePushOptional`
line; replace this with the official repository and a stable ref (e.g.,
`konveyor/release-tools@main` or a specific tag/commit) so the workflow executes
reviewed, immutable code, and ensure the `feat/makePushOptional` changes are
merged upstream into `konveyor/release-tools` (and referenced by the upstream
tag/commit) before removing any merge holds or deploying to production branches.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/image-build.yaml
⏰ 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). (2)
- GitHub Check: JDT.LS Integration Tests (Phase 2)
- GitHub Check: Build tackle2-addon-analyzer
🔇 Additional comments (3)
.github/workflows/image-build.yaml (3)
5-8: LGTM! Good addition for PR validation.Adding pull_request triggers enables build validation on PRs before merging, which is a good practice. The branch patterns correctly match the existing push triggers.
37-37: LGTM! Correct conditional for downstream triggers.The
if: github.event_name == 'push'condition correctly ensures that the downstream rebuild ofanalyzer-lsponly occurs for actual pushes (merged PRs or direct commits), not for PR builds. This prevents unnecessary downstream builds during PR review.
28-28: Thepublishparameter in the called workflow (build-push-images.yaml@feat/makePushOptional) explicitly definestype: stringwith a default value of"true". The current implementation correctly provides string values'false'and'true', which is the expected type. No changes are needed.
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In @Dockerfile:
- Around line 2-8: The tar extraction in the Dockerfile RUN block is failing on
multi-arch builds due to non-portable tar flags; update the RUN sequence that
downloads /tmp/jdtls.tar.gz and extracts into /tmp/jdtls to use a simplified,
portable tar invocation (remove -v, --no-same-owner and --no-same-permissions)
while preserving the staging step that copies /tmp/jdtls/* to /jdtls and the
subsequent chmod on /jdtls/bin/jdtls so permissions are set explicitly after
extraction.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Dockerfile
🧰 Additional context used
🪛 GitHub Actions: Multiple Architecture Image Build
Dockerfile
[error] 1-1: Image build failed during RUN curl -s -o /tmp/jdtls.tar.gz https://download.eclipse.org/jdtls/milestones/1.51.0/jdt-language-server-1.51.0-202510022025.tar.gz && mkdir -p /tmp/jdtls && tar -xvf /tmp/jdtls.tar.gz -C /tmp/jdtls --no-same-owner --no-same-permissions && mkdir -p /jdtls && cp -r /tmp/jdtls/* /jdtls/ && chmod 755 /jdtls/bin/jdtls && rm -rf /tmp/jdtls.tar.gz /tmp/jdtls: Exiting with failure status due to previous errors. tar: bin/jdtls: Cannot open: Invalid argument (and many similar tar errors). Buildah exited with code 2.
⏰ 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). (2)
- GitHub Check: JDT.LS Integration Tests (Phase 2)
- GitHub Check: Build tackle2-addon-analyzer
f1190be to
3a997c4
Compare
|
This is likely due to an interaction between a new version of tar in the ubi9 image, qemu-user-static. There's something else involved as well since no one has had success reproducing it outside of github runners so far. |
3a997c4 to
67e76ec
Compare
Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
4d6b35d to
058dbed
Compare
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.