Skip to content
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

feat: allow occam to cope with pack limitations #339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mhdawson
Copy link
Member

@mhdawson mhdawson commented Oct 4, 2024

pack seems to be very limited in the options it will accept when building for multi-arch. It does not
seem to accept a path with a tgz as input and only works properly if you build in an exploded directory. Otherwise it appears to have built the cnb file but the structure of the bin directory is incorrect and the executables cannot be found.

Update the jam packager to work around this by exploding the tgz after creating it and then build in that
exploded directory.

It is still a good idea to build the tgz as that
filters the files based on what is specified in the buildpack.toml.

The unit tests pass, but more integration testing might be good. Once I have confirmation that people
are comfortable withe the PR I'll manually test on a few existing buildpacks in addition to the testing I've
already done on the npm-install buildpack modified for multi-arch -> https://github.com/mhdawson/npm-install/tree/test-multi (Note that this needs an updated jam that includes an updated packit with this change - paketo-buildpacks/packit#604)

Summary

Allow the ability to test buildpacks that have been updated to support multi-arch. Occam will still only test on the one architecture as the machine the tests are run on but with the update can run tests for buildpacks that support multi-arch, or buildpacks that don't.

Use Cases

Testing buildpacks that support multi-arch

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

pack seems to be very limited in the options it will
accept when building for multi-arch. It does not
seem to accept a path with a tgz as input and only
works properly if you build in an exploded directory.
Otherwise it appears to have built the cnb file but
the structure of the bin directory is incorrect and
the executables cannot be found.

Update the jam packager to work around this by exploding
the tgz after creating it and then build in that
exploded directory.

It is still a good idea to build the tgz as that
filters the files based on what is specified in the
buildpack.toml.

Signed-off-by: Michael Dawson <[email protected]>
@mhdawson mhdawson requested a review from a team as a code owner October 4, 2024 01:48
@mhdawson
Copy link
Member Author

mhdawson commented Oct 8, 2024

@ForestEckhardt any chance you could take a look, we need this to progress on getting Node.js buildpacks to support multi-arch.

@mhdawson
Copy link
Member Author

@robdimsdale any chance you could take a look?

@mhdawson
Copy link
Member Author

@ForestEckhardt, @robdimsdale any chance one of you two could take a look?

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.

1 participant