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

Restore cached layer metadata for launch: true & cache: true from cache as a fallback #406

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions buildpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,18 @@ The lifecycle MUST treat a layer with unset `types` as a `launch = false`, `buil
The following table illustrates the behavior depending on the value of each flag.
Note that the lifecycle only restores layers from the cache, never from the previous image.

`build` | `cache` | `launch` | Metadata and SBOM** Restored | Layer Restored
----------|----------|----------|------------------------------|---------------------
true | true | true | Yes - from the app image | Yes* - from the cache
true | true | false | Yes - from the cache | Yes - from the cache
true | false | true | No | No
true | false | false | No | No
false | true | true | Yes - from the app image | Yes* - from the cache
false | true | false | Yes - from the cache | Yes - from the cache
false | false | true | Yes - from the app image | No
false | false | false | No | No

\* The metadata and layer are restored only if the layer SHA recorded in the previous image matches the layer SHA recorded in the cache.

\** Only SBOM files associated with a layer are restored. Launch-level and build-level SBOM files must be re-created on each build.
| `build` | `cache` | `launch` | Metadata and SBOM* Restored | Layer Restored |
| ------- | ------- | -------- | --------------------------- | -------------- |
| true | true | true | Yes | Yes |
| true | true | false | Yes | Yes |
| true | false | true | No | No |
| true | false | false | No | No |
| false | true | true | Yes | Yes* |
| false | true | false | Yes | Yes |
| false | false | true | Yes | No |
| false | false | false | No | No |

\* Only SBOM files associated with a layer are restored. Launch-level and build-level SBOM files must be re-created on each build.

Examples:
* `build = true, cache = true, launch = true`:
Expand Down