buildpacks / pack

CLI for building apps using Cloud Native Buildpacks
https://buildpacks.io
Apache License 2.0
2.56k stars 286 forks source link

Validation of lifecycle image os/arch should be more flexible #2163

Open natalieparellano opened 4 months ago

natalieparellano commented 4 months ago

Description

Right now, we hard code the supported lifecycle os/arch combinations. https://github.com/buildpacks/pack/pull/2086 will expand the list of supported architectures (search for SupportedLinuxArchitecture) to include ppc64le and s390x as the lifecycle now supports those. However, this is brittle, and it will be annoying to have to modify pack every time the lifecycle supports a new architecture. We should read the lifecycle image (buildpacksio/lifecycle) manifest list to determine the supported architectures.

Additionally, when the requested architecture is not found, we currently just fall back to linux/amd64 which seems sub-optimal. https://github.com/buildpacks/pack/pull/2086 adds a warning but we should probably turn this into an error case.