-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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): use REST for etag caching of issues #26793
Conversation
Merge #26793 first |
I need to think what the effect is if there's multiple pages. Maybe should cache the entire list. Also time to check page size and count again |
Co-authored-by: Michael Kriese <[email protected]>
# Conflicts: # lib/util/cache/repository/types.ts # lib/util/http/index.ts
Seems like etags for issues/PR lists are very unstable: https://twitter.com/CAFxX/status/1490560328261791746
This is why we ended up with dropping them for cached PR list. |
Now I remember that. Can you use the If-Modified-Since approach instead? |
I've got 304 only 2 times out of 20 when querying test repo with |
So let's go with etag for now but add an issue to investigate modified date? I thought I for a reasonable amount of success with 304s |
|
Maybe it's particularly bad for the lists of issues and PRs? |
I think there could be another approach: thanks to |
Is there any downside to switching from graohql to rest here though? Even if the tag frequently doesn't work, maybe 20-30% it does |
@zharinov It's still TBD whether to switch initRepo to REST too :) can we do the same issue/PR filtering in that unit repo query? |
Well, I didn't remember we already switched to REST for PRs, so maybe yes and probably we could just fetch all from Speaking of cache hit rate, we could count it, though my bet is 5-10% |
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.
otherwise LGTM
🎉 This PR is included in version 37.219.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hey, this morning, Yesterday evening I got:
So it recreated a new issue and now it seems the original one is not closed but abandoned (because it doesn't see it):
I'm not sure what will happen if I rollback and keep both dashboards. |
A colleague of mine mentioned that it might be the issue:
That + a pagination issue might explain why it could not find its own "old" dashboard. |
Changes
Refactor getIssues() to use github REST API and benefit from etag caching
Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: