You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uriFromLifecycleVersion in pkg/client/create_builder.go builds the download URL for the lifecycle binary based on the builder image's OS and architecture. The current implementation has several gaps and inaccuracies compared to what the lifecycle project actually publishes at https://github.com/buildpacks/lifecycle/releases.
This issue tracks making the method accurate and complete for all supported OS/arch combinations.
Current behavior
func (c*Client) uriFromLifecycleVersion(version semver.Version, osstring, architecturestring) string {
arch:="x86-64"ifos=="windows" {
returnfmt.Sprintf("...+windows.%s.tgz", version, version, arch)
}
ifbuilder.SupportedLinuxArchitecture(architecture) { // only arm64, ppc64le, s390xarch=architecture
} else {
c.logger.Warnf("failed to find a lifecycle binary for requested architecture %s, defaulting to %s", ...)
}
returnfmt.Sprintf("...+linux.%s.tgz", version, version, arch)
}
FreeBSD — entirely unhandled. The function always falls through to the linux URL template, producing a wrong URL for FreeBSD builder images.
Windows — deprecated but silently broken. Windows container support was deprecated at lifecycle v0.20.5 (see announcement). No Windows lifecycle binary exists beyond that version, but the function still attempts to build a URL for any version, and the arch variable used in the Windows path is always the default x86-64 (the architecture parameter is ignored entirely for Windows).
Summary
uriFromLifecycleVersioninpkg/client/create_builder.gobuilds the download URL for the lifecycle binary based on the builder image's OS and architecture. The current implementation has several gaps and inaccuracies compared to what the lifecycle project actually publishes at https://github.com/buildpacks/lifecycle/releases.This issue tracks making the method accurate and complete for all supported OS/arch combinations.
Current behavior
Problems:
amd64input emits a spurious warning even thoughamd64andx86-64name the same architecture and the correct binary is downloaded. (Being fixed by fix: treat amd64 as equivalent to x86-64 for lifecycle binary selection #2544, but the root of the problem is that the arch mapping is missing.)linuxURL template, producing a wrong URL for FreeBSD builder images.archvariable used in the Windows path is always the defaultx86-64(thearchitectureparameter is ignored entirely for Windows).Lifecycle release artifacts (as of latest)
+linux.arm64+linux.ppc64le+linux.s390x+linux.x86-64+freebsd.amd64+freebsd.arm64+windows.x86-64(last: v0.20.5)Example URLs:
Expected behavior per OS
Linux
arm64arm64ppc64leppc64les390xs390xx86-64x86-64amd64x86-64amd64is an alias forx86-64x86-64FreeBSD
amd64amd64arm64arm64x86-64amd64x86-64is an alias foramd64on FreeBSDamd64Windows
Windows container support ended at lifecycle v0.20.5. The function should:
v0.20.5if a higher version is requested.amd64→x86-64alias as Linux.Suggested implementation approach
lastWindowsLifecycleVersionconstant ("0.20.5").SupportedLinuxArchitecturewith explicit per-OS arch maps (or a helper per OS).freebsdOS branch alongsidelinuxandwindowsinuriFromLifecycleVersion.pkg/client/create_builder_test.gofollowing the pattern of the existingarm64test at line 616.Related
amd64#2528 — spuriousamd64warning on AMD64 systemsamd64/Linux case