Breaking Change Notice: Lifecycle 0.6.0


jromero@...
 

Hello!

The Cloud Native Buildpacks team is scheduled to release a new version of the lifecycle. The release contains some changes we want to make the community aware of in advance.

Summary

The next 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.

  1. `cacher` is now part of `exporter`. (#205)

    • Impact: Major

    • The `cacher` binary is no longer present. Refer to RFC#14 for details.

  2. `analyzer` and `restorer` order of operations swap. (#207)

    • Impact: Major

    • The order in which `analyzer` and `restorer` are executed must be inverted. Refer to RFC#14 for details.

  3. 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 to 0.5.0

  • pack 0.5.0 cannot rebase app images from lifecycle 0.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.

Join cncf-buildpacks@lists.cncf.io to automatically receive all group messages.