Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

MWException: Error contacting the Parsoid/RESTBase server (HTTP 403): (no message) from DiscussionTools (on private wikis) – permalinks unavailable
Closed, ResolvedPublic

Description

Continuing from T315383, where we fixed a much more common error similar to this one.

https://logstash.wikimedia.org/goto/70928236a46a29b25aaf344e9b8b25a6

image.png (517×2 px, 51 KB)

We didn't notice this before in the flood of 404, but this also seems new in the last deployment, but it is certainly a different issue as well. All of them appear to be on officewiki, which probably means it's a problem with private wikis. It kind of makes sense, they require auth to read, we usually solve this by forwarding the user's cookies, but in this case we're (potentially) in a job where we don't have the request context to access. We should think about fixing this, since right now the feature won't work on private wikis, but in my opinion this also doesn't block the train. I can silence the errors if they are annoying.

Related Objects

Event Timeline

In addition to private wikis, this error also occurs on Commons. for a different reason – we get a 403 for some huge pages with lots of images, such as https://commons.wikimedia.org/wiki/Commons:WikiProject_Aviation/recent_uploads/2014_April_1 (there are hundreds of daily pages like this one). I was able to reproduce that when trying to open them in VE as well, where the RESTBase response sometimes is a 403 and has an error like this:

{"type":"https://mediawiki.org/wiki/HyperSwitch/errors/bad_request#rerenders_disabled","method":"get","detail":"Rerenders for this article are blacklisted in the config.","uri":"/commons.wikimedia.org/v1/page/html/Commons%3AWikiProject_Aviation%2Frecent_uploads%2F2014_February_16"}
Krinkle added subscribers: ppelberg, Krinkle.

@ppelberg With the task on your team's tracking board - has this been passed on or escalated to a different team to investigate further?

In addition to private wikis, this error also occurs on Commons. for a different reason – we get a 403 for some huge pages with lots of images, such as https://commons.wikimedia.org/wiki/Commons:WikiProject_Aviation/recent_uploads/2014_April_1 (there are hundreds of daily pages like this one). I was able to reproduce that when trying to open them in VE as well, where the RESTBase response sometimes is a 403 and has an error like this:

{"type":"https://mediawiki.org/wiki/HyperSwitch/errors/bad_request#rerenders_disabled","method":"get","detail":"Rerenders for this article are blacklisted in the config.","uri":"/commons.wikimedia.org/v1/page/html/Commons%3AWikiProject_Aviation%2Frecent_uploads%2F2014_February_16"}

In rEVEDf2df5dc7b98a: Improve error messages for RESTBase errors I added more details to these errors, and we can distinguish these easily now in the logs, so I filed separate task T316914 about these.

matmarex renamed this task from MWException: Error contacting the Parsoid/RESTBase server (HTTP 403) from DiscussionTools (on private wikis) to MWException: Error contacting the Parsoid/RESTBase server (HTTP 403): (no message) from DiscussionTools (on private wikis).Sep 2 2022, 4:14 AM
matmarex updated the task description. (Show Details)

@ppelberg With the task on your team's tracking board - has this been passed on or escalated to a different team to investigate further?

I raised it at https://wikimedia.slack.com/archives/C038KHX5YN6/p1661444483203539 (after the triage meeting where we moved this to tracking), and received a collective shrug.

I'll try to use ParsoidOutputAccess on those wikis instead. Whatever caching issues it has, our private wikis get so little traffic, it'll probably be fine.

matmarex renamed this task from MWException: Error contacting the Parsoid/RESTBase server (HTTP 403): (no message) from DiscussionTools (on private wikis) to MWException: Error contacting the Parsoid/RESTBase server (HTTP 403): (no message) from DiscussionTools (on private wikis) – permalinks unavailable.Sep 3 2022, 2:21 AM

Change 829254 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Use ParsoidOutputAccess when RESTBase is not set up (WMF private wikis)

https://gerrit.wikimedia.org/r/829254

Change 829254 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Use ParsoidOutputAccess when RESTBase is not set up (WMF private wikis)

https://gerrit.wikimedia.org/r/829254

Change 843549 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@wmf/1.40.0-wmf.5] Use ParsoidOutputAccess when RESTBase is not set up (WMF private wikis)

https://gerrit.wikimedia.org/r/843549

Change 843549 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@wmf/1.40.0-wmf.5] Use ParsoidOutputAccess when RESTBase is not set up (WMF private wikis)

https://gerrit.wikimedia.org/r/843549

Mentioned in SAL (#wikimedia-operations) [2022-10-17T20:18:11Z] <urbanecm@deploy1002> Finished scap: 6762292a4: e320d48c8: 6762292a4: DicsussionTools/WikimediaEvents backports (T315688, T315689, T320938) (duration: 04m 35s)

Change 885310 had a related patch set uploaded (by Paladox; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@REL1_39] Use ParsoidOutputAccess when RESTBase is not set up (WMF private wikis)

https://gerrit.wikimedia.org/r/885310

This is happening on 1.39 as well. I'm not sure which changes need to be backported as https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/829254 doesn't cleanly apply to the REL1_39 branch.

It might not be feasible to backport this. The change above depends on some changes in MediaWiki core and in VisualEditor (and maybe in Parsoid) that were being developed around the same time, but we didn't carefully keep track of what depends on what. It would probably be a fair bit of work to track down all of the changes and then test them. I don't think we have the time to help with that, sorry :(

Change 885310 abandoned by Paladox:

[mediawiki/extensions/DiscussionTools@REL1_39] Use ParsoidOutputAccess when RESTBase is not set up (WMF private wikis)

Reason:

https://gerrit.wikimedia.org/r/885310