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

Update to libcnb 0.21, Buildpack API 0.10 and switch from stacks to targets #197

Merged
merged 1 commit into from
May 2, 2024

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented May 1, 2024

A libcnb.rs release supports a single Buildpack API version, so whenever we update to a libcnb release that now implements a newer Buildpack API version, we must switch to that version in the buildpack at the same time.

This change updates the buildpack to libcnb 0.21.0, which requires both a switch to Buildpack API 0.10, a switch from stacks to targets, and also some adjustments for layer API changes.

As part of the switch from stacks to targets, the buildpack now consumes the Python runtime from the new S3 location/filenames (that use distro name/version in the URL instead of stack ID), which were added in:
heroku/heroku-buildpack-python#1567

The new archives also now use Zstandard (aka zstd) for compression instead of gzip, which results in a faster download due to the smaller archive size (for example, the Ubuntu 22.04 Python 3.12.3 AMD64 archive was 26% smaller) as well as faster decompression. This required switching from the flate2 crate to the zstd crate.

A side-effect of switching to the new S3 files is that the archives for Python 3.7 are no longer available, since I intentionally did not build them given that Python 3.7 is EOL. As such, this change also drops support for Python 3.7 (something that the classic buildpack has already done, and would have been done here already if it were not for being blocked on #8).

The switch to targets unblocks Heroku-24/multi-architecture support, which will be handled in a later PR.

Closes #192.
Closes #194.
GUS-W-15261168.

@edmorley edmorley self-assigned this May 1, 2024
@edmorley edmorley marked this pull request as ready for review May 1, 2024 13:31
@edmorley edmorley requested a review from a team as a code owner May 1, 2024 13:31
…argets

A `libcnb.rs` release supports a single Buildpack API version, so
whenever we update to a libcnb release that now implements a newer
Buildpack API version, we must switch to that version in the buildpack
at the same time.

This change updates the buildpack to the latest libcnb release, which
requires both a switch to Buildpack API 0.10, a switch from stacks to
targets, and also some adjustments for layer API changes.

As part of the switch from stacks to targets, the buildpack now consumes
the Python runtime from the new S3 location/filenames (that use distro
name/version in the URL instead of stack ID), which were added in:
heroku/heroku-buildpack-python#1567

The new archives also now use Zstandard (aka zstd) for compression
instead of gzip, which results in a faster download due to the smaller
archive size (for example, the Ubuntu 22.04 Python 3.12.3 AMD64 archive
was 26% smaller) as well as faster decompression. This required
switching from the `flate2` crate to the `zstd` crate.

A side-effect of switching to the new S3 files is that the archives for
Python 3.7 are no longer available, since I intentionally did not build
them given that Python 3.7 is EOL. As such, this change also drops
support for Python 3.7 (something that the classic buildpack has already
done, and would have been done here already if it were not for being
blocked on #8).

The switch to targets unblocks Heroku-24/multi-architecture support,
which will be handled in a later PR.

See:
https://github.com/heroku/libcnb.rs/blob/main/CHANGELOG.md#0210---2024-04-30
https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.10
https://github.com/buildpacks/spec/blob/buildpack/0.10/buildpack.md#targets-1
https://docs.rs/zstd/latest/zstd/

Closes #192.
Closes #194.
GUS-W-15261168.
@edmorley edmorley force-pushed the buildpack-api-0.10 branch from 2376874 to 2ac2109 Compare May 2, 2024 14:16
@edmorley edmorley merged commit fd95924 into main May 2, 2024
5 checks passed
@edmorley edmorley deleted the buildpack-api-0.10 branch May 2, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deny unknown fields
2 participants