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

Migrate away from deprecated heroku/buildpacks:20 CNB builder image #2964

Open
edmorley opened this issue Oct 30, 2023 · 11 comments
Open

Migrate away from deprecated heroku/buildpacks:20 CNB builder image #2964

edmorley opened this issue Oct 30, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@edmorley
Copy link

Hi 👋

This project uses Heroku's heroku/buildpacks:20 CNB builder image:
https://github.com/search?q=repo%3Asuperfly%2Fflyctl%20(heroku%2Fbuilder-classic%20OR%20heroku%2Fbuildpacks)&type=code

We have deprecated this builder image as of heroku/cnb-builder-images#429.

Please migrate to heroku/builder:22 or heroku/builder:20, to continue to receive security updates, and to avoid disruption when the build time deprecation warning is upgraded to an error in the future.

More information on the difference between the various builder images can be seen here:
https://github.com/heroku/cnb-builder-images#heroku-cnb-builder-images

@edmorley
Copy link
Author

Gentle nudge that builds using these images will start erroring in the future, plus the underlying images themselves will stop receiving security updates.

@edmorley
Copy link
Author

@dangra @alichay ^

@dangra
Copy link
Member

dangra commented Dec 21, 2023

@edmorley what is the idea? We just switch to heroku/builder:22 and things works the same way or is there some gotcha?

@edmorley
Copy link
Author

edmorley commented Dec 21, 2023

@dangra The differences between the builder images can be seen in the comparison table linked from the OP. Most notable are the lifecycle version changes (which impact supported Buildpack API versions), and the switch from shimmed classic buildpacks to native CNB buildpacks. Happy to answer any specific questions you have after reading that (if you're not familiar with CNB builder image concepts, I'd check out https://buildpacks.io/docs/concepts/#what-is-a-builder first).

Taking a quick glance at the Heroku builder usages in this repo (using the GitHub code search link in the OP), in general a straight search and replace of heroku/buildpacks:20 for heroku/builder:22 will mostly be fine, with one exception - the scanner/elixir.go usage - since that uses CNB shim which is currently not compatible with newer lifecycle versions (xref heroku/cnb-shim#69). Whilst in the future a new shimming solution might be created (depending on the long tail of classic buildpacks), for now we're prioritising native CNBs (CNBs are still experimental on Heroku, and not in production, so rough edges are to be expected).

Unfortunately no one in the community has yet published a native CNB for Elixir (https://registry.buildpacks.io/searches/elixir), so for now if you want to continue to support that language you'd need to continue to use a builder using an older lifecycle version. I'd still recommend switching the other non-Elixir examples over to heroku/builder:22 now though, to reduce the impact on your users when we stop updating heroku/buildpacks:20.

@edmorley
Copy link
Author

edmorley commented Mar 7, 2024

Gentle nudge that builds using these images will start erroring in the future, plus the underlying images themselves will stop receiving security updates.

This will be happening within the next couple of weeks in heroku/cnb-builder-images#474. We'll be adding an env var override for the errors, but I strongly recommend you switch from heroku/buildpacks:20 to heroku/builder:* as soon as possible.

@edmorley
Copy link
Author

Please migrate to heroku/builder:22 or heroku/builder:20, to continue to receive security updates, and to avoid disruption when the build time deprecation warning is upgraded to an error in the future.

The deprecation warnings were upgraded to errors this morning:
heroku/cnb-builder-images#478

@edmorley
Copy link
Author

edmorley commented May 4, 2024

As of yesterday, the legacy heroku/buildpacks:20 and heroku/builder-classic:22 builder images are no longer updated, and so won't receive security updates, fixes or support for new language runtime version releases. Please switch to using the heroku/builder:* images instead:
https://github.com/heroku/cnb-builder-images#available-images

@uythoang
Copy link

Using heroku/builder:20 now displays warning below, so I I'm trying out heroku/builder:24. So far, so good.

Warning:

This builder image ('heroku/bulder:20') is deprecated, since it is
based on the deprecated 'heroku/heroku:20' base image.

Starting April 30th, 2025, this image will no longer receive security
updates. Shortly after, this builder will be disabled and made
unavailable.

To continue receiving security updates and avoid interruption, upgrade
to one of our newer builders, such as 'heroku/builder:22' or
'heroku/builder:24':
https://github.com/heroku/cnb-builder-images#available-images

If you are using the Pack CLI, you will need to adjust your '--builder'
CLI argument or change the default builder configuration:
https://buildpacks.io/docs/tools/pack/cli/pack_config_default-builder/

If you are using a third-party platform to deploy your app, check the
platform documentation for instructions on changing the builder.

@dangra
Copy link
Member

dangra commented Jul 23, 2024

@uythoang if you submit a PR with the required changes and a way to try it myself, I will be more than happy to review and merge the change.

@uythoang
Copy link

@dangra There was no code change. This was a configuration change I made to my fly.toml file.

@matisnape
Copy link

matisnape commented Oct 6, 2024

Hey folks, just wanted to add that for me using "heroku/builder:22" or "heroku/builder:24" didn't solve the issue, I get error for the buildpack:
[detector] ERROR: failed to set API for Buildpack 'elixir-buildpack/[email protected]': buildpack API version '0.4' is incompatible with the lifecycle

I guess this is not exactly the same thing, but googling led me here so I'm leaving a note for people who might stumble at this, too.

I'm new to Fly.io, I've followed the documentation and went with just fly deploy which added the default buildpacks that don't work. I gave up and switched to Dockerfile instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants