feat(keploy-ci-java): bundle jattach v2.2 (multi-arch)#17
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fa99df126
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Bundles jattach v2.2 into the keploy-ci-java base image to eliminate per-release pipeline downloads and provide a consistent, checksummed source for multi-arch keploy/enterprise builds.
Changes:
- Adds build-time download + SHA256 verification of
jattachv2.2 tarballs forlinux-x64andlinux-arm64. - Installs extracted binaries under
/opt/jattach/{amd64,arm64}/jattach. - Creates
/usr/local/bin/jattachsymlink to the build target architecture binary.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AkashKumar7902
added a commit
that referenced
this pull request
May 7, 2026
Address review feedback from Copilot + Codex on #17: - TARGETARCH may be unset on legacy non-BuildKit builds, causing the jattach symlink to resolve to /opt/jattach//jattach. Fall back to `dpkg --print-architecture` (matches the keploy-ci/Dockerfile pattern) and validate ARCH ∈ {amd64, arm64}. - `jattach | head -1 || true` masks a missing/broken symlink. Add explicit `test -x` checks on both staged binaries and the symlink so the build fails loud if anything is wrong.
AkashKumar7902
added a commit
that referenced
this pull request
May 7, 2026
Address #17 review nit — include the supported values and a hint about BuildKit/--build-arg so users can self-correct without reading the Dockerfile.
Pre-stage both arches under /opt/jattach/<arch>/jattach so keploy/enterprise release pipelines can `cp /opt/jattach/<arch>/jattach ./jattach-<arch>` into a multi-arch buildx context without re-downloading from GitHub on every build (and without needing per-pipeline curl + sha verification). SHA256s are pinned against the upstream-published v2.2 archives so an upstream replacement fails the image build instead of silently shipping a different binary. /usr/local/bin/jattach is symlinked to the host-arch binary for native use of the image as well. Context: keploy/enterprise release pipelines are currently growing their own per-pipeline jattach download (see keploy/enterprise#1995); baking it into the CI base image lets that PR's follow-up drop the curl entirely. Signed-off-by: Akash Kumar <meakash7902@gmail.com>
Address review feedback from Copilot + Codex on #17: - TARGETARCH may be unset on legacy non-BuildKit builds, causing the jattach symlink to resolve to /opt/jattach//jattach. Fall back to `dpkg --print-architecture` (matches the keploy-ci/Dockerfile pattern) and validate ARCH ∈ {amd64, arm64}. - `jattach | head -1 || true` masks a missing/broken symlink. Add explicit `test -x` checks on both staged binaries and the symlink so the build fails loud if anything is wrong. Signed-off-by: Akash Kumar <meakash7902@gmail.com>
Address #17 review nit — include the supported values and a hint about BuildKit/--build-arg so users can self-correct without reading the Dockerfile. Signed-off-by: Akash Kumar <meakash7902@gmail.com>
6bf2231 to
bb09315
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jattachv2.2 (bothlinux-x64andlinux-arm64) intokeploy-ci-javaso the keploy/enterprise release pipelines stop re-downloading it from GitHub on every release build./opt/jattach/<arch>/jattach./usr/local/bin/jattachis symlinked to the host-arch binary so the image is also natively usable.acd9e17f…amd64,288ae5ed…arm64) — an upstream tarball replacement fails the image build rather than silently shipping a different binary.Background
keploy/enterprise's release pipelines build a multi-arch
keploy/enterpriseimage but, until #1995, didn't stagejattachat all — the v3.5.0 release tag failed at the buildx step ("/jattach": not found). #1995 fixes that by adding a per-pipeline curl + sha-verify of jattach v2.2.This PR moves that responsibility one level up: by bundling jattach into the
keploy-ci-javabase image (which the release pipelines already use for thebuild-jvm-attach-assetsstep), the per-pipeline curl can be replaced with a simplecp /opt/jattach/<arch>/jattach ./jattach-<arch>. That:Follow-up
Once a tagged
keploy-ci-java:java-1.2.27(or whichever version cuts this) is published, a tiny follow-up on keploy/enterprise will drop.ci/scripts/fetch-jattach.shin favor of acpfrom the bundled location.Test plan
docker buildx build --platform linux/amd64,linux/arm64 -t keploy-ci-java:test ./keploy-ci-javasucceeds.docker run --rm --platform linux/amd64 keploy-ci-java:test sh -c 'ls -la /opt/jattach/amd64 /opt/jattach/arm64 && file /opt/jattach/amd64/jattach /opt/jattach/arm64/jattach'shows x86-64 + ARM aarch64 ELFs.docker run --rm --platform linux/amd64 keploy-ci-java:test jattach 2>&1 | head -1prints jattach usage (proves the symlink is wired up correctly).