heroku / buildpacks-python

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

Pull the run image in CI before running integration tests #223

Closed edmorley closed 1 month ago

edmorley commented 1 month ago

When libcnb-test integration tests run, they invoke pack build using --pull-policy if-not-present to avoid unnecessary pulls from Docker Hub. However, since the tests run in parallel, if images don't already exist, then the first batch of tests will attempt the pull in parallel, unnecessarily using up the Docker Hub rate limit (and presumably slowing down the test end to end time).

As such, we pull the builder image up front before running the tests.

However, during a pack build the run image is also needed, and whilst that image overlaps significantly with the builder image, it still means pulling the manifest at a minimum (and in the case of Heroku-20/22 a few extra layers due to the -cnb variants used in pre-Heroku-24 images).

Therefore, it makes sense for us to pull the run image prior to running the integration tests too.

GUS-W-16223034.