Spring Boot's Buildpacks integration inspects the stack IDs contained
in labels on the builder image and run image. Prior to this change, it
was a failure condition when the stack IDs did not match. Stack IDs
have been deprecated in the CNB spec, and it is no longer required
that the builder and run images match. The validation of stack IDs
was changed from an error to a warning to match the `pack` reference
implementation.
See gh-51390
Signed-off-by: Scott Frederick <scottyfred@gmail.com>
ExportedImageTar creates a temporary file in its constructor and then
copies the exported image into it and builds the layer factory. If
either step throws, the constructor fails before the instance is
assigned, so the try-with-resources statement that uses it never calls
close() and the docker-layers- temporary file is left behind.
Delete the temporary file when the constructor fails so its cleanup
matches close().
See gh-51117
Signed-off-by: wantaek <wantaekchoi@gmail.com>
ExportedLayers left the intermediate create-builder-scratch-source
temp file behind after rebased layer files were written, and opened
layer InputStreams without closing them when StreamUtils.copy does
not close either stream. Delete the source temp in a finally block
and use try-with-resources for the apply path so layer files can be
deleted reliably.
See gh-50919
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>