paketo-buildpacks / libpak

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

Automatically add `deprecation_date` field to buildpack dependencies if requested #345

Closed pbusko closed 1 month ago

pbusko commented 2 months ago

Summary

Automatically populate deprecation_date for dependencies

Use Cases

This change adds the --eol-id flag to the update-buildpack-dependencies cmd. When the flag is set, the product the EOL date is looked up for a product (the --eol-id flag), formatted and added to the deprecation_date field.

Checklist

dmikusa commented 2 months ago

I don't feel like we should pull in a dependency on github.com/kobayashi/eol. It's a 0.1.0 release and hasn't been updated in over a year (last commit). It doesn't show strong signs of life. If I'm missing something there please let me know.

It may be a little more work, but there are only three API calls for the API itself, https://endoflife.date/docs/api. Do you have any objections to just making HTTP calls directly to the API? You could add a client under the internal package, so we don't need to worry about exporting that as public, it'll be just for the library.

Aside from that, 👍 I like the idea. Automating metadata information is great.

pbusko commented 2 months ago

It's a 0.1.0 release and hasn't been updated in over a year (last commit)

good point, I've moved the implementation to the internal package

c0d1ngm0nk3y commented 2 months ago

@dmikusa We call the API directly instead of using the additional dependency like you proposed in this comment. Maybe you can have another look.

pbusko commented 1 month ago

@dmikusa is there anything else blocking the PR from being merged?