-
Notifications
You must be signed in to change notification settings - Fork 2
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
Arch specific dependencies #272
Conversation
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.
Confirmed, this fixes the release publishing issue with the Front-end Web buildpacks.
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.
Thank you for digging into this!
I'm presuming the reason we haven't run into this before, is that all of our other composite buildpacks have libcnb:
type dependencies rather than docker image dependencies in their package.toml
?
Re Pack deferring platform resolution to Docker, does that mean there is a feature-gap in Pack's multi-arch support (eg it should propagate --platforms
or similar but doesn't), or is it a case of us needing to migrate the automation here (which was written before Pack supported multi-arch properly) to the new Pack feature? If the former it would be good to file a bug/feature request upstream, and if the latter then I think we should create some GUS work items/epics for tracking refactoring multi-arch in FY26 (incl ideally pushing some of the handling down into libcnb-{cargo,package}.
Yeah, indeed.
There might be a gap in packaging cross-platform (not multi-platform) buildpacks with pack. I'm not sure if that's a supported workflow, though. It seems like pack supports building same-platform buildpacks OR multi-platform buildpacks, but we're doing something in between that involves an occasional cross-platform buildpack. |
When running
pack buildpack package
with a buildpack that has adocker
dependency on a multi-arch image index like this:Pack defers the image resolution to docker. This works fine when packaging a buildpack for the host platform, but breaks when packaging for another architecture. The default docker image store (which pack uses) is not able to properly handle cross platform images. The error manifests like this:
This PR does a basic regex substitution to append the appropriate platform suffix, so the package.toml references the docker tag for the appropriate platform like this:
or
An example passing workflow that did not without this change: https://github.com/heroku/buildpacks-frontend-web/actions/runs/12381045454/job/34558845731