Page MenuHomePhabricator

Consider following redirects in mwbot
Closed, DeclinedPublic

Description

In T393428#11077617, thanks to additional logging introduced in T401653, we discovered that a lot of selenium-daily beta jobs were failing because the config used the wmflabs.org domain instead of the new wmcloud.org T289318. While the specific issue is being fixed, I think in general it would be nice if mwbot followed redirects by default.

I don't fully appreciate the implications of this change, but if this makes sense, then the feature request should be upstreamed. (Else this task can be closed as declined)

Event Timeline

Let me look at our new implementation if this is done automatically in wdio-mediawiki 6.0.0.

We replaced mwbot with our own implementation in core using NodeJS built in fetch. Right now it tries to follow redirects but if I understand the spec correctly a redirect will change the POST to a GET and drop the data we are posting the body. I made a patch to disable redirects so that if you try use the API against something that redirects, it will get an error. I think that will make sense since like it is now, it will not work either, it better to get a failure fast.

Maybe we could build something that catches the redirect and re-POST but I think that is overkill right now. Lets verify that the new implementation works fine and see if there other things that needs to be tuned.