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

Sunset the cnb-shim service #95

Open
edmorley opened this issue Oct 30, 2024 · 1 comment
Open

Sunset the cnb-shim service #95

edmorley opened this issue Oct 30, 2024 · 1 comment

Comments

@edmorley
Copy link
Member

edmorley commented Oct 30, 2024

A shim based approach unfortunately isn't viable for a sizeable set of classic buildpacks for a few reasons:

  • There are areas of the specifications for the classic API and CNB Buildpack API that just aren't compatible (so it's not possible to convert from one to the other in all cases)
  • Many classic buildpacks hardcode other assumptions about the platform/buildpack API that don't hold for CNBs (for example hardcoding /app paths), and it's not possible to work around all of these (for example, CNBs don't have root access, so it's not possible to make a dynamic /app -> <app workspace dir> symlink at buildpack invocation time).
  • Virtually all classic buildpacks only support amd64 (x86_64) and not other architectures, so won't work on platforms that support (or primarily target) other architectures such as arm64. (And worse, most classic buildpacks don't even check/warn about the architecture, so may fail with confusing to debug errors at app boot rather than during the build.)

In addition, this project also only supports older Buildpack APIs and is stuck using outdated libraries (see #69 and #74), so would need some significant work to bring up to date (and that work still wouldn't help with the issues above).

As such, this project was marked as deprecated in March 2024 (see #90), since it's no longer actively being maintained.

We should at some point:

  1. Sunset the web service running at cnb-shim.herokuapp.com
  2. Archive this repo
@edmorley
Copy link
Member Author

Note: In order to make it easier for people to migrate to CNBs, we are also:

  • Officially supporting an APT style CNB, and committing to ensuring it works with more packages that the current classic APT buildpack (which had/has a number of limitations/bugs and was/is only an unofficial best-effort feature). This CNB has recently been added to the builder image so will work out of the box (unlike the classic APT buildpack, which had to be added explicitly). See: https://github.com/heroku/buildpacks-deb-packages / Add heroku/deb-packages to 22/24 builders cnb-builder-images#591
  • Considering additional officially supported buildpacks to cover some other common use cases (eg an "extract a binary from somewhere and extract it into a layer" type buildpack, which could be used to install arbitrary third party archives/tools).

This should help reduce the number of cases where a third-party CNB is required.

With CNBs inline buildpacks are also now a built-in feature, so it's likely some simple one-off cases could also be replaced by inline scripts:
https://buildpacks.io/docs/for-app-developers/how-to/build-inputs/use-inline-buildpacks/

There will of course still be cases left where a third party CNB needs to be developed to replace its classic buildpack counterpart, however, given the issues with shimming, cnb-shim is not going to be the answer for those regardless.

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

No branches or pull requests

1 participant