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

Upgrade legacy builder image deprecation warnings to an error #474

Closed
edmorley opened this issue Mar 7, 2024 · 3 comments · Fixed by #478
Closed

Upgrade legacy builder image deprecation warnings to an error #474

edmorley opened this issue Mar 7, 2024 · 3 comments · Fixed by #478
Assignees

Comments

@edmorley
Copy link
Member

edmorley commented Mar 7, 2024

In June 2022, as part of the Heroku-22 release, we switched to a new Docker Hub repo for our builder images (from heroku/buildpacks:* to heroku/builder:*).

In addition to the change in repository name, the new heroku/builder:* namespaced builder images contain only Heroku's next-gen (fully native) Cloud Native Buildpacks, whereas the old heroku/buildpacks:* builder images contain a mixture of shimmed and native CNBs (since back when that builder image was created, we didn't yet have native CNBs for every supported language, so some had to be substituted using shimmed classic Heroku buildpacks).

For more details on the differences between the images, see:
https://github.com/heroku/cnb-builder-images/blob/main/README.md#available-images

To raise awareness of the deprecated nature of the old images, in October 2023:

IMO it's now time to upgrade this deprecation warnings to errors, since:

  • We're about to add many more image variants (due to multi-architecture + Ubuntu 24.04 support), so it would be helpful to reduce the number of supported builder images prior to that.
  • We're having to jump through additional hoops for these older images, like pinning the lifecycle version due to cnb-shim not being compatible with newer Buildpack API versions (see here).
  • It has been 21 months since we introduced the new heroku/builder:* repo and coming up to six months of us outputting loud deprecation warnings.
  • All of our builder images are still experimental/pre-GA/not used in production at Heroku (and marked as such in the README), so the amount of notice we've given is IMO already more than reasonable (once GA there will be more stability and longer deprecation periods).
  • We're preparing for a more official beta phase for our CNBs, so would like to reduce the chance of users trying out a deprecated image by mistake / to clean things up in general prior to then.

At least initially, we can make these errors skippable by setting an env var, similar to what we did for Heroku-18's EOL in #336.

I think we should do this within the next couple of weeks.

cc @heroku/languages

@edmorley
Copy link
Member Author

edmorley commented Mar 8, 2024

I've opened #478 early as a draft to make it easier for anyone following along to see what's upcoming, however, I won't be merging that PR until slightly later this month.

@edmorley
Copy link
Member Author

I plan to merge #478 at the start of next week.

edmorley added a commit that referenced this issue Mar 18, 2024
This upgrades the deprecation warnings added in #429 to errors,
for the reasons mentioned in #474.

These errors can be skipped by setting the env var:
`ALLOW_EOL_SHIMMED_BUILDER=1`

For example:

`pack build --env ALLOW_EOL_SHIMMED_BUILDER=1 ...`

However, users are strongly encouraged to migrate from the legacy
shimmed `heroku/buildpacks:20` and `heroku/builder-classic:22`
images to the new `heroku/builder:*` builder images.

For the differences between the available images, see:
https://github.com/heroku/cnb-builder-images#available-images

The buildpack has also been moved to the start of each `[[order]]`
group (rather than the end), so that the build fails early, rather than
wasting the user/build system's time with a build that's only going
to fail. (We had the buildpack at the end of the group before, to
make the EOL warning more visible, since often users won't scroll
back through the logs, and only see what's printed at the end of the
build log in their console.)

Closes #474.
GUS-W-15212520.
@edmorley
Copy link
Member Author

I just added a similar deprecation notice to cnb-shim too:
heroku/cnb-shim#90

edmorley added a commit that referenced this issue May 3, 2024
…lassic:22` (#514)

Since these images were:
- superseded by the `heroku/builder:*` images in June 2022
- officially deprecated in Oct 2023 (#429)
- made to error by default in March 2024 (#474)

Builds can still continue using the last version of these builders
published to Docker Hub, and the resultant app images can
still be rebased onto newer run images if needed.

I've also cleaned up the available images table in the README,
to make it display a little better. (There was too much content
before, causing the table to wrap awkwardly when viewed in
the narrow GitHub repo-root view.)

Closes #512.
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 a pull request may close this issue.

1 participant