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

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

Conversation

jpastoor
Copy link
Contributor

Summary

Prevents panic as described in issue #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

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Prevents panic as described in issue paketo-buildpacks#269.
This change makes the Equals method more robust, by not panicking when the deprecationDate
is present in the layer metadata in an unexpected format.
@jpastoor jpastoor requested a review from a team as a code owner January 14, 2024 13:13
Copy link

linux-foundation-easycla bot commented Jan 14, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jpastoor / name: Joost Pastoor (d134fc4, 9e4edd1)
  • ✅ login: dmikusa / name: Daniel Mikusa (7c5ecaf)

@dmikusa dmikusa added type:bug A general bug semver:patch A change requiring a patch version bump labels Jan 15, 2024
@pivotal-david-osullivan pivotal-david-osullivan merged commit f1f6407 into paketo-buildpacks:main Jan 23, 2024
4 checks passed
dmikusa added a commit that referenced this pull request Nov 11, 2024
Signed-off-by: Daniel Mikusa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants