-
Notifications
You must be signed in to change notification settings - Fork 964
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
Add cursor to updates RSS feed. #9155
Conversation
Thanks for the PR! I don't see any reason not to increase the page size to 100 releases. I'm not sure there is a historical reason for the current limit of 40. With regards to the Right now, we have a single cache entry for this page, which gets updated every time a new release is made, which happens every few seconds or so. Most requests hit the cache. If we add the This is part of the consideration for #284 with regards to the "changelog" XML-RPC endpoint as it has the same issue, and attempting to reproduce that as a JSON API has the same problem with the cache here. |
@di Thanks, just broke out the page size change to #9177 to keep it separate. That caching problem is indeed tricky. The only fix we can think of so far is:
That'd get us down to a worst case of 21,474,836 cache entries. |
@tiegz One thing that's mentioned in #284 that would work for a JSON API but not for RSS would be including next/previous links in the response. This would let someone consuming the changelog/updates feed start at any point and consume up to the latest change. There would only be N cache entries (where N is the number of changes/releases/etc) and the cache would only ever be invalidated once: when there is a new "head". I think given that, we probably rather put effort into bringing this new API into existence rather than trying to make the RSS feed more useful. |
@di Makes sense, that feature is definitely better suited for that JSON API. I'll close this and subscribe to that thread to follow future discussion. |
Greetings! I have two changes to propose for the
rss/updates.xml
endpoint:after
cursor parameter: e.g.https://pypi.org/rss/updates.xml?after=1542745017
. This would only return releases after the timestamp, in oldest->newest order, which should be safe since there's an index onRelease#created
.This should make the feed more useful to regular followers of it, allow them to hit the endpoint less frequently, and allow a way to catch up using the cursor. The legacy
changelog
XMLRPC call also has asince
parameter for pagination, so it seemed useful to allow similar pagination in the RSS feed.