lifecycle v0.6.0
lifecycle v0.6.0
Welcome to v0.6.0
, the sixth beta release of the Cloud Native Buildpack Lifecycle. This is a big release for us, including performance improvements, better metadata for built images, improvements to the reproducibility of images produced by the lifecycle, and more! Read on below to get the full details. Thanks a ton to everybody that contributed to this release.
Notice:
This release contains breaking changes which are detailed at the bottom of the release notes.
Prerequisites
The lifecycle runs as a normal user in a series of unprivileged Linux containers. To export images and cache image layers, it requires access to a Docker daemon or Docker registry.
Install
Extract the .tgz
file and copy the lifecycle binaries into a build stack base image. The build image can then be orchestrated by a platform implementation such as the pack CLI or knative.
Features
- Breaking: Performance improvements! (#205, #207)
- App Slices! (#210)
- Lifecycle now verifies the platform API for compatibility when
CNB_PLATFORM_API
is set (#233) - Further improvements to the reproducibility of builds (#226)
- Lifecycle rebasing is backwards compatible (#219)
- Lifecycle now includes processes in build metadata (#208)
Bugs
- Fix duplication of app directories in layer (#223)
- Fix the propagation of error when writing tars (#211)
- Lifecycle now takes umask into consideration when untarring (#203)
Breaking changes in this release:
Notice
TL;DR
This release of the lifecycle (0.6.0) contains changes which improve caching performance. These improvements introduce some breaking changes between the lifecycle and previous platform APIs.
Builders containing the 0.5.0 version of the lifecycle will continue to work with newer versions of pack. This is the default version (as of pack 0.6.0) injected during the builder creation process.
Explicit configuration of the lifecycle.version field to 0.5.0 during builder creation will allow you take the time to update to the latest changes. We plan to update the default version of the lifecycle to 0.6.0 at a later release of pack.
In order to maintain platform compatibility, platforms will need to implement the changes noted below.
Changes
There are 3 major changes that impact backwards compatibility.
cacher
is now part ofexporter
. (#205)- Impact: Major
- The
cacher
binary is no longer present. Refer to RFC#14 for details.
analyzer
andrestorer
order of operations swap. (#207)- Impact: Major
- The order in which
analyzer
andrestorer
are executed must be inverted. Refer to RFC#14 for details.
- Implementation of App Slices as detailed in spec. (#210, #220)
- Impact: Minor
- A key on a metadata label used by the lifecycle has changed from a string to an array to align with the fact that there are now multiple application layers due to slices.
Impact
Platforms
Due to these breaking changes the Platform API version is being updated to 0.2
. Platforms that support arbitrary builders should attempt to support both Platform API versions 0.1
and 0.2
for a transitional period. Platform authors can do this by supporting both the old and new build sequences/binaries, and selecting the proper sequence based on the lifecycle's declared API version. A platform can read a given lifecycle's declared platform API version by inspecting the io.buildpacks.builder.metadata label on a builder (lifecycle.api.platform
field).
Pack
pack 0.6.0
was updated (#384, #415, #423) to support both Platform API 0.1
and 0.2
.
There is a minor constraint brought upon by the App Slices changes:
- pack
0.6.0
can rebase app images from lifecycle greater than or equal to0.5.0
- pack
0.5.0
cannot rebase app images from lifecycle0.6.0
Tekton
The tekton task will be updated to support only Platform API 0.2 in the coming weeks. (#176)
Buildpacks
There is no impact on buildpacks.
Builders
Since builders have an embedded lifecycle with a specific supported Platform API version, if the platform in which these builders are used does not support their provided Platform API version errors are expected. Builders can be created with an explicit Lifecycle version, which allows you to pin to a version of the lifecycle if your platform does not yet support the newest lifecycle. This is documented here.
For any questions or concerns please reach out via mailing list or slack.