-
Notifications
You must be signed in to change notification settings - Fork 144
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
Replace deprecated XML-RPC Pypi APIs #1897
Comments
No, that endpoint is still supported and the documentation is up to date. The intention is to support the three methods In this instance the JSON simple API is a great candidate for adoption to replace Our metrics for that endpoint show that has been generally stable, with responses ranging from 20-30 seconds from the backends, and generally well below the 60 second internal timeout. Is there a timeout being set by bandersnatch's client libraries? |
Looking into this, I did find a bit of a glaring performance issue in the Once deployed, that endpoint should get a bit faster. Turns out internally we were executing the DB query and dictionary build for response... twice 🙃 |
O how I'd love to remove all XMLRPC from bandersnatch. I've tied. Long long ago. PR's welcome using other "approved" and preferable PEP'd APIs to get the same data if its:
Thanks @ewdurbin for finding some inefficiencies in the server tho! I feel mirrors don't really need "realtime" responses and that we could probably cache these responses for 1 minute on to the CDN if we wanted, but don't know how friendly the service is to that. And also there probably isn't enough mirrors to really save a huge amount of load ... |
The XMLRPC is now obsolete and deprecated and even the parts that may not be deprecated no longer work. Insteas, let's use the simple Index API using JSON to collect all packages and their changes. Reference: pypa#1897 Signed-off-by: Philippe Ombredanne <[email protected]>
The XMLRPC is now obsolete and deprecated and even the parts that may not be deprecated no longer work. Insteas, let's use the simple Index API using JSON to collect all packages and their changes. Reference: pypa#1897 Signed-off-by: Philippe Ombredanne <[email protected]>
The XMLRPC is now obsolete and deprecated and even the parts that may not be deprecated no longer work. Instead, let's use the simple Index API with JSON to collect all packages and their changes. Reference: pypa#1897 Signed-off-by: Philippe Ombredanne <[email protected]>
The XMLRPC is now obsolete and deprecated and even the parts that may not be deprecated no longer work. Instead, let's use the simple Index API with JSON to collect all packages and their changes. Reference: pypa#1897 Philippe Ombredanne <[email protected]>
Add typing where missing. Remove extra underscore from method. Reference: pypa#1897 Philippe Ombredanne <[email protected]> Co-authored-by: Cooper Lees <[email protected]>
I pushed a PR dropping support for XMLRPC but the API works again with @ewdurbin patches.
We could:
The only concern is that the once-a-day update of the JSON simple index may be an issue for some use cases. One day of wait feels like a long time for new releases. |
@ewdurbin the default conf is |
For my reference, the warehouse XMLRPC patches are: |
I would suggest overriding that timeout for the |
Here is my suggestion:
|
Honestly, supporting the deprecation of XMLRPC by optimizing /simple/ JSON variant is quite appealing. I'm going to discuss with PyPI admins to see if we can support lowering the amount of caching necessary for /simple/ a bit. What maximum cached duration would feel acceptable? An hour? 30 minutes? 15 minutes? |
@ewdurbin an hour should be plenty enough for all the uses cases I can fathom.
All of these are fast enough and plenty good enough. We do not get all the details that the rpc Just looking at the changes since serial and computing if needed if these demand special treatment (add, yank, etc.) is plenty good enough IMHO |
Awesome. I feel this would be awesome to optimize the (even if JSON only) for the simple API for the mirroring use case. I agree with 1h being reasonable and 15 mins being awesome / more than enough for most use cases. We can just document this. I can just see people "releasing to pypi" and wanting it in their internal mirrors within the hour .... I also love the appeal that mirrors will be able to mirror from mirrors with this setup too ... That's a big scale win potentially and we've had issues requesting it. Again, not that I think there is much we can do here, happy to make our client cooperate with any decision PyPI makes as best as we can. |
See https://mail.python.org/archives/list/[email protected]/thread/5VOX33ARFQUYKIMKM5NS7PM7Z6ZNCSJY/ and:
Technically https://warehouse.pypa.io/api-reference/xml-rpc.html#mirroring-support did not deprecated the
list_packages_with_serial
RPC, but in practice it times out and should likely be replaced with the new simple JSON API that provides a list of packages with serialsSee also https://docs.pypi.org/api/index-api/
@ewdurbin I assume that
list_packages_with_serial
is effectively deprecated even if not documented yet, correct?The text was updated successfully, but these errors were encountered: