paketo-buildpacks / libpak

An opinionated extension to the libcnb Cloud Native Buildpack Library
Apache License 2.0
15 stars 18 forks source link

Handles deprecationDate in time.Time format in actual layer metadata #304

Closed jpastoor closed 9 months ago

jpastoor commented 9 months ago

Summary

Prevents panic as described in issue https://github.com/paketo-buildpacks/libpak/issues/269. After the change https://github.com/paketo-buildpacks/libpak/pull/261/files the Equals method became prone to panics due to the unchecked type assertions. This change makes the Equals method more robust, by not panicking when the deprecationDate is present in the layer metadata in an unexpected format.

Use Cases

Handling various LayerMetadata from without breaking whenever it does not exactly conform to expections.

Checklist

linux-foundation-easycla[bot] commented 9 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.