-
Notifications
You must be signed in to change notification settings - Fork 12
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 deprecation warnings to errors #478
Merged
+92
−60
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've opened this early as a draft to make it easier for anyone following #474 to see what's upcoming, however, I won't be merging this PR until slightly later this month. |
edmorley
force-pushed
the
edmorley/upgrade-deprecations-to-errors
branch
from
March 13, 2024 08:29
21a9ab6
to
63f6462
Compare
I plan to merge this at the start of next week. |
Malax
approved these changes
Mar 13, 2024
edmorley
force-pushed
the
edmorley/upgrade-deprecations-to-errors
branch
from
March 13, 2024 10:00
63f6462
to
0f5b38d
Compare
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
force-pushed
the
edmorley/upgrade-deprecations-to-errors
branch
from
March 15, 2024 14:08
0f5b38d
to
72c91cc
Compare
This was referenced Mar 18, 2024
Migrate away from deprecated
heroku/buildpacks:20
CNB builder image
architect-team/architect-cli#931
Open
edmorley
added a commit
to heroku/cnb-shim
that referenced
this pull request
Mar 25, 2024
Heroku's legacy shimmed builder images (`heroku/buildpacks:20` and `heroku/builder-classic:22`) are EOL and will soon stop receiving security updates. We added deprecation warnings to the builder images back in October: heroku/cnb-builder-images#429 And these warnings were just upgraded to errors: heroku/cnb-builder-images#478 However, the way these warnings/errors are shown is via the builders default buildpack detection group configuration, which means that if a project provides a custom buildpack list (either via `project.toml`, `--buildpack` args to Pack CLI, or via a third party build tool that overrides the buildpack list), these warnings aren't shown. As such, I'm adding them directly to cnb-shim, to raise awareness of the Heroku builder image sunset, as well as the deprecated nature of cnb-shim. The implementation is based on that here: https://github.com/heroku/cnb-builder-images/blob/88cb8159fff129ab498c2e9a5df9bbaff8ea204a/buildpacks-20/end-of-life-buildpack/bin/build I've re-used the same `ALLOW_EOL_SHIMMED_BUILDER` env var name, since otherwise it will cause another round of breaking changes for people who've already seen the error message from the builder itself, and have already set that env var. Since cnb-shim may be being used by non-Heroku builder images too (for which the sunset nature of the builder doesn't apply; only the cnb-shim deprecation), we check the stack ID and vary the message/behaviour accordingly. GUS-W-15325154.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This upgrades the deprecation warnings added in #429 to errors, for the reasons mentioned in #474. It uses an approach similar to that used for the Heroku-18 EOL in #336.
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
andheroku/builder-classic:22
images to the newheroku/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.)Example error message:
See also:
https://github.com/heroku/cnb-builder-images/actions/runs/8204908398/job/22440626428?pr=478#step:6:30
Closes #474.
GUS-W-15212520.