-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Deprecate beta CNB support #1445
Conversation
CNB support was introduced into this buildpack as an experiment. The experiment is over, anyone wanting to use the official CNB (still in "preview" support) should use https://github.com/heroku/buildpacks-ruby
20fb84f
to
f8027e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could remove bin/build
entirely (and the CNB subsets of buildpack.toml
) now, given that the CNB in this repo implements Buildpack API 0.2, which has not been supported by our builders since last year:
heroku-buildpack-ruby/buildpack.toml
Line 1 in 5ce2c2e
api = "0.2" |
https://github.com/heroku/cnb-builder-images#available-images
https://github.com/buildpacks/lifecycle#supported-apis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Left some optional suggestions about making this sound less like we're abandoning CNB altogether and more like the functionality has moved.
@edmorley I'm up for removing all this code, but the Ruby integrations run deep and I'm trying to get codon unblocked on heroku-24, however I've got no idea how people might be using this TBH, just that they might be. I know waypoint use(d?) heroku CNBs before we implemented ours in rust, but I'm not sure what mechanism they were using. I saw this code while working on adding shellcheck so I can fix ruby bootstrapping on heroku-24 (the vendored version logic is incorrect on that stack, but all the logic lives in bash). In Ruby-land I like to deprecate, release, and then remove where possible. I was thinking of doing that here. |
Co-authored-by: Josh W Lewis <[email protected]>
Every single third party I've found (over several hours of searching, as part of heroku/cnb-builder-images#429 (comment)) uses our buildpacks from the CNB registry or via cnb-shim (which uses the classic buildpack from the classic buildpack registry's S3 bucket). There is also no CNB publishing pipeline in this repo any more, so no one will execute the deprecation warning. However, there is no harm in doing it this way if you prefer - I just wanted to make you aware that in my opinion it was already safe to delete, should you wish to do so :-) |
They use the builder image: xref: |
The buildpack in this repo is primarily a classic Heroku buildpack, however, as part of the initial exploration into CNBs had experimental CNB support added some time ago. However, the maintained Ruby CNB now exists in a separate repo: https://github.com/heroku/buildpacks-ruby The experimental CNB support in this repo doesn't actually work any more since the buildpack API version it implements (v0.2) isn't supported by modern `lifecycle` versions - and attempts at building encounter this error: ``` ERROR: failed to set API for Buildpack 'heroku/[email protected]': buildpack API version '0.2' is incompatible with the lifecycle ``` In addition, it's not even possible to use this repo with a CNB build without having cloned it locally, since: 1. The CNB parts are no longer published 2. The old CNB release assets were deleted a year or so ago: https://github.com/heroku/heroku-buildpack-ruby/releases 3. Pack/lifecycle doesn't support cloning Git URLs. 4. Attempting to use a buildpack URL pointing at the GitHub gzip archive fails due to GitHub's nesting of the repo inside a subdirectory: ``` $ pack build --builder heroku/builder:22 --buildpack https://github.com/heroku/heroku-buildpack-ruby/archive/refs/heads/main.tar.gz ruby-test ... Downloading from https://github.com/heroku/heroku-buildpack-ruby/archive/refs/heads/main.tar.gz 93.2 KB/-1 B ERROR: failed to build: downloading buildpack: extracting from https://github.com/heroku/heroku-buildpack-ruby/archive/refs/heads/main.tar.gz: reading buildpack: reading buildpack.toml: could not find entry path 'buildpack.toml': not exist ``` Given both the Buildpack API error, and the GitHub URL issues no one is using the CNB implementation here, and so its dead code that should be removed to prevent confusion (eg over where the CNB lives). A deprecation warning was previously added in #1445 (though as above it's unlikely anyone even saw that message, since the build was already erroring before it gets that far).
CNB support was introduced into this buildpack as an experiment. The experiment is over, anyone wanting to use the official CNB (still in "preview" support) should use https://github.com/heroku/buildpacks-ruby