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

Add a deprecation notice #90

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Add a deprecation notice #90

merged 1 commit into from
Mar 25, 2024

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented 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.

For example, as seen in:
apppackio/apppack-codebuild-image#5 (comment)
heroku/buildpacks-nodejs#800 (comment)

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.

Heroku's legacy shimmed builder images (`heroku/buildpacks:20` and
`heroku/builder-classic:22`) are sunset 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 (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.
@edmorley edmorley self-assigned this Mar 25, 2024
@edmorley edmorley requested a review from a team as a code owner March 25, 2024 15:43
@heroku heroku bot temporarily deployed to cnb-shim-edmorley-depre-mt55fr March 25, 2024 15:45 Inactive
@edmorley
Copy link
Member Author

Example expected failure using the review app + heroku builder:

heroku builder - env var not set

(pack build --builder heroku/buildpacks:20 --buildpack 'https://cnb-shim-edmorley-depre-mt55fr.herokuapp.com/v1/heroku/python?version=0.0.0&name=Heroku+Python+(Shimmed)' shim-test)

And with ALLOW_EOL_SHIMMED_BUILDER=1:

heroku builder - env var set

(pack build --builder heroku/buildpacks:20 --buildpack 'https://cnb-shim-edmorley-depre-mt55fr.herokuapp.com/v1/heroku/python?version=0.0.0&name=Heroku+Python+(Shimmed)' shim-test -e ALLOW_EOL_SHIMMED_BUILDER=1)

And emulating a non-heroku builder:

non-heroku builder

(pack build --builder heroku/buildpacks:20 --buildpack 'https://cnb-shim-edmorley-depre-mt55fr.herokuapp.com/v1/heroku/python?version=0.0.0&name=Heroku+Python+(Shimmed)' shim-test -e CNB_STACK_ID=another-stack)

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 this pull request may close these issues.

2 participants