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

feat(datasource/crate): fetch crate metadata from crates.io #15214

Merged
merged 3 commits into from
Apr 21, 2022

Conversation

Turbo87
Copy link
Contributor

@Turbo87 Turbo87 commented Apr 21, 2022

Changes

This PR adds changelogs to Rust crate update PRs by downloading crate metadata from crates.io. It is using a fast path on the crates.io server to avoid unnecessary database requests (see code comment) and work around the regular request per second limitation. Since the metadata rarely changes, it will be cached for 24 hours to avoid unnecessary API requests.

Bildschirmfoto 2022-04-21 um 00 23 21

Example PR from this branch: Turbo87/renovate-crates-test#3

Context

Closes #3486

Note that I have seen #14841, but since the discussion there was not concluded yet, I've implemented it only for the crates.io datasource for now.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins rarkins requested a review from viceice April 21, 2022 09:06
@viceice viceice enabled auto-merge (squash) April 21, 2022 09:07
@viceice viceice merged commit 65b6697 into renovatebot:main Apr 21, 2022
@Turbo87 Turbo87 deleted the crates-changelog branch April 21, 2022 09:44
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Turbo87
Copy link
Contributor Author

Turbo87 commented Apr 21, 2022

I assume it'll take a while before this is deployed to the GitHub app?

@rarkins
Copy link
Collaborator

rarkins commented Apr 21, 2022

Yeah, unfortunately a while - maybe next week. There's some stuff which is holding me back on an earlier version

@lfrancke
Copy link
Contributor

Thank you both for the work and super quick turnaround!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add sourceUrl/homepage lookup from crates API for cargo datasource
5 participants