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(github): long-term datasource caching #15653
feat(github): long-term datasource caching #15653
Conversation
Still need tests, but comments are welcome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks promising, make sure it works for GitHub enterprise
Thought it should work for GHE too, but how to test?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please heavily document the logic flow (and make sure variables are named for optimal understandability)
…ub-datasource-long-term-cache
…ub-datasource-long-term-cache
Does this solution mean we now fetch more than 1000 tags/releases limit we currently have? If not, will it support it, or does GraphQL have a 1000 limitation? When I run this PR locally it's using less queries than I'd expect, and I want to check that it's a good thing, not a bad sign. Test repo with node and renovate (both of which have a lot of tags): https://github.com/renovate-tests/node5/pulls Cold cache result:
What most surprises is me is only 7 GraphQL queries total. We normally use 2 GraphQL per repo anyway, so that means an extra 5 queries for the node tags lookup plus release notes? BTW I just thought of a potential problem this introduces. If someone tries to configure a custom PAT host rule for some third party repo (i.e. to override the token we have for api.github.com) then it won't work - will need to use the same token as for the main repo. However this use case hasn't been working fully for a while due to the way github has been doing pagination (page 2+ use an unpredictable URL). |
I've simplified my resulting code too much, pushing fix right now... |
Tested again with
Then immediately after:
|
After waiting >30 minutes:
The 2 extra github graphql requests seen here correspond with this PR's described behavior. |
What about ? |
🎉 This PR is included in version 32.73.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
github-releases
andgithub-datasources
:releaseTimestamp
and clear all the items from the cache 7 days laterContext
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: