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

Automatically add deprecation_date field to buildpack dependencies if requested #345

Merged

Conversation

pbusko
Copy link
Contributor

@pbusko pbusko commented Jun 5, 2024

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

  • 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).

@pbusko pbusko requested a review from a team as a code owner June 5, 2024 11:47
@dmikusa
Copy link
Contributor

dmikusa commented Jun 6, 2024

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.

@dmikusa dmikusa added type:enhancement A general enhancement semver:minor A change requiring a minor version bump labels Jun 6, 2024
@pbusko
Copy link
Contributor Author

pbusko commented Jun 7, 2024

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

Copy link
Contributor

@c0d1ngm0nk3y c0d1ngm0nk3y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some smaller comments...

internal/eol.go Outdated Show resolved Hide resolved
]`)))
})

it("returns correct cycle", func() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 3 test cases would be possible in the first context, right?

@pbusko pbusko force-pushed the fill-out-eol-dates branch from 5608cbd to 47d06f6 Compare June 19, 2024 05:20
@c0d1ngm0nk3y
Copy link
Contributor

@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
Copy link
Contributor Author

pbusko commented Jul 3, 2024

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

@dmikusa dmikusa merged commit 125a2c3 into paketo-buildpacks:main Jul 5, 2024
4 checks passed
dmikusa added a commit to paketo-buildpacks/libpak-tools that referenced this pull request Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants