-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
[REGRESSION] Renderer tests should have a delay between each invocation. #1937
Comments
Phab ticket is here - https://phabricator.wikimedia.org/T350117 |
(I'm missing the context, I'm just here because of https://phabricator.wikimedia.org/T350117) I would suggest migrating your use of the action=visualeditor action API to the new MediaWiki REST API. The visualeditor action API is considered internal, and while we don't make breaking changes for no reason (since others, just like you, have started using it), we do not test how changes affect third-parties. It is slower because it produces metadata needed by the visual editor, but probably not needed by you. The new MediaWiki REST API can be used like this: https://en.wikipedia.org/w/rest.php/v1/page/MediaWiki%3ASidebar/html. It's stable, intended for external use, has simpler output, and is faster. The output is identical to the (It is distinct from the older Wikimedia REST API, which was not available outside of Wikimedia wikis, unless they went to great pains to install RESTBase. I see you used that API too in your code in wikimedia-desktop.renderer.ts, and you can probably easily adapt this code to use the newer API. Their outputs are almost identical.) More about the various APIs: https://www.mediawiki.org/wiki/API:REST_API#API_comparison |
VisualEditor and new Mediawiki REST API are different APIs. We are currently working on supporting the new Mediawiki REST API, see #1601. That said, that does not mean we should get rid now of the old VisualEditor API.
Yes, unfortunately... But the Mediawiki REST API is still really too new to be supported on all Mediawiki instances.
I can not say if we need all the metadata, but we definitely need the enriched/semantic HTML. Actually, this is because the VE has needed that API, that we have been able to launch MWoffliner.
Yes, that said, this is not the ideal solution either. Main problem being that this is not a mobile output. But I would be surprised we won't discover new/other problems once implemented.
The best API was
|
@VadimKovalenkoSNF I guess this bug is not valid anymore as the bug has been fixed upstream at Wikimedia (see #1945) |
yes. |
After #1933 ( Apply test coverage for all endpoins ) has been merged, a regression with exceeded rate limit appeared while checking VisualEditor capability. At the moment of speaking, this endpoint (https://en.wikipedia.org/w/api.php?action=visualeditor&mobileformat=html&format=json&paction=parse&formatversion=2&page=MediaWiki%3ASidebar) has the response for all clients:
There is no Retry-After header in the response and the response status itself is 200. A possible solution for this is to add a delay between tests.
More info about MW Action API rate limits can be found in https://phabricator.wikimedia.org/T172293#6344271 and https://www.mediawiki.org/wiki/API:Etiquette#Request_limit
The text was updated successfully, but these errors were encountered: