heroku / buildpacks-ruby

Heroku's Cloud Native Buildpack for Ruby applications.
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Test getting started guide with ARM && AMD #293

Closed schneems closed 3 months ago

schneems commented 4 months ago

Previously, all Heroku runners used AMD (x86) CPU architecture. We added the ability to build and run on an ARM machine (aarch64, like an M3 Mac), but building binaries for ARM required a beta GitHub Action (GHA) runner. The GHA runner beta required extra invocations to setup tools on the machine (such as installing docker).

The GHA ARM runners are now out of beta. This PR adds a test that exercises the ARM codepath on CI in addition to the existing AMD codepath.

GUS-W-15805220

schneems commented 4 months ago

For example, if the Ruby CNB implementation forgot to check context.target during the build, and hardcoded an AMD64 path for some binary - the build could still succeed, but the app image then fail to run at runtime?

The ruby binary is exercised several times in the buildpack on this app via commands. The commands gem install bundler, gem list and bundle exec rake assets:precompile all invoke the Ruby interpreter. They will fail if they're the wrong version or the wrong architecture as bundler ensures the Ruby version matches the Gemfile.lock.

I don't think we need the added complexity of adding an extra dimension to the matrix. Or rather, I'm wary of it.

edmorley commented 4 months ago

Makes sense - happy to land this for now - though longer term I still think there is some benefit of testing a subset of the libcnb-test integration tests on multiple builder image/arch variants :-)