-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make Heroku-18 builds fail with a skippable EOL warning #336
Merged
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
The Heroku-18 stack reached end-of-life on April 30th 2023, and as of May 1st 2023, builds are no longer possible on the (default) non-CNB Heroku build system, and the underlying stack images will no longer receive security updates (beyond whatever updates Canonical choose to release in May). However, anyone using the `heroku/buildpacks:18` CNB builder image may not realise that it's now EOL and soon to be insecure. They may also not realise that the builder image has moved from the `heroku/buildpacks` Docker repo to `heroku/builder`. In order to raise awareness of both of these, an EOL buildpack has been added, which fails the build with an EOL warning, unless the env var `ALLOW_INSECURE_HEROKU_18_BUILDER` is set during the build. This should affect very few users, since Heroku is not yet using CNBs by default, and Salesforce Functions use the `heroku/builder:22` builder image instead. This buildpack was written in bash, since: - the buildpack functionality we need is extremely simple (checking an env var, printing a message and exiting 1 or 0) - the buildpack (and other Heroku-18 related files) are going to be deleted in a few weeks anyway, so its not worth spending time getting a Rust build workflow working with the existing complex GitHub Actions workflow here GUS-W-13143190.
fd93929
to
111aba7
Compare
Example EOL error when building with
(From: https://github.com/heroku/builder/actions/runs/4927514536/jobs/8804652403?pr=336#step:9:22) Example successful build with the EOL warning, when
(From: https://github.com/heroku/builder/actions/runs/4927899473/jobs/8805596776#step:9:22) |
joshwlewis
approved these changes
May 9, 2023
schneems
reviewed
May 9, 2023
Malax
approved these changes
May 10, 2023
edmorley
added a commit
that referenced
this pull request
May 15, 2023
Since: - The Heroku-18 stack is EOL. - Builds performed using the `heroku/buildpacks:18` builder already fail with an error (unless a skip env var is set), as of #336. - Whilst there may be an update or two more over the next 2 weeks to the underlying stack image, these can be picked up using `pack rebase` even without us publishing new versions of the builder image. GUS-W-13204715.
edmorley
added a commit
that referenced
this pull request
Oct 30, 2023
Adds deprecation warnings to the `heroku/builder-classic:22` and `heroku/buildpacks:20` CNB builder images, to raise awareness that they are no longer recommended. The warnings have been added using a warnings buildpack, similar to the approach used for the Heroku-18 EOL in: #336 For now these are just warnings, however, in the future will be changed to an error (skippable via env var, like in the PR linked above). Since these are warnings, the buildpack has been added to the end of each order group, such that the message is at the end of the overall build log, and so hopefully more visible to end users. Once the warning is turned into an error, the buildpack should be moved to the start of the order groups, so the build fails early for improved UX. A separate mostly-copy-pasted buildpack was used for each builder, since there is no other easy way to customise the message shown for each (and I wanted to include the name of the deprecated builder in the warning message, so users know what image name to grep for). These buildpacks were written in bash (rather than in Rust, using `libcnb.rs`), since: - the buildpack functionality we need is extremely simple - the buildpack is temporary (it will be deleted when we stop updating these builders in the future), so we don't need/want long term published images on CNB registry or to have to set up a Rust compilation/packaging step in this repo. The buildpacks give zero lint warnings when checked with shellcheck locally. GUS-W-14194729. GUS-W-14194736.
This was referenced Mar 7, 2024
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.
The Heroku-18 stack reached end-of-life on April 30th 2023, and as of May 1st 2023, builds are no longer possible on the (default) non-CNB Heroku build system, and the underlying stack images will no longer receive security updates (beyond whatever updates Canonical choose to release in May).
However, anyone using the
heroku/buildpacks:18
CNB builder image may not realise that it's now EOL and soon to be insecure. They may also not realise that the builder image has moved from theheroku/buildpacks
Docker repo toheroku/builder
.In order to raise awareness of both of these, an EOL buildpack has been added, which fails the build with an EOL warning, unless the env var
ALLOW_INSECURE_HEROKU_18_BUILDER
is set to1
during the build.This should affect very few users, since Heroku is not yet using CNBs by default, and Salesforce Functions use the newer
heroku/builder:22
builder image instead.This buildpack was written in bash (rather than in Rust, using libcnb.rs), since:
GUS-W-13143190.