-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fix support for Heroku-24 #15
Conversation
11c9973
to
8884d58
Compare
8884d58
to
a7a3fa2
Compare
these no longer exist
3b993c9
to
cf26f51
Compare
To make testing fully representative of the Heroku platform, we have to run the built app against the run image and not the build image. (Whilst Heroku CI will use the build image, some apps will use the buildpack outside of CI, and so against the run image which has fewer system libraries than the build image.)
This prevents unnecessary Docker cache invalidation when editing files that don't affect the image, meaning quicker iteration times when developing on this buildpack locally.
Fixes this error: ``` chrome: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory ``` And also cleans up the packages list, removing some packages that either are no longer needed, or already exist in the base image. This is safe to do now that `bin/test.sh` checks for missing shared libraries.
Thanks @edmorley! |
@jason-salesforce No problem! (I've been doing quite a few similar testing setups for missing dynamic libs etc in other repos, so thought it might save you some hassle if I pushed some changes rather than try and use review suggestion code blocks etc :-) ) |
With the new setup debugging should be a lot easier in the future - you run |
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 tackling this! :-D
GitHub release created: And published to the buildpack registry:
|
- Trims the APT package list for Heroku-20 and Heroku-22 to match the packages list used for Heroku-24. - Uses `--no-install-recommends` to avoid pulling in unnecessary transitive dependencies. - Now outputs the size of the app dir when running tests (plus removes test containers after they exit). The tests added in #15 ensure that there are no missing dynamically linked libraries, and that Chrome + Chromedriver can start. This reduces the uncompressed slug size impact of this buildpack as follows: - Heroku-20: 442 MB -> 350 MB - Heroku-22: 426 MB -> 351 MB - Heroku-24: 381 MB -> 353 MB Fixes #17.
This also changes the test to run inside of a dockerfile using our base builder images. Prior to this, we were getting passing tests on a broken heroku-24 build that was attempting to install packages that no longer exist in ubuntu 24.