Page MenuHomePhabricator

Change http to https in Community Tech bot API usages (and other places)
Closed, ResolvedPublic0.5 Estimated Story Points

Description

Per https://lists.wikimedia.org/pipermail/wikitech-l/2016-May/085618.html we should update our API usages. Creating this ticket to keep a track of this.

We need to test, make sure nothing's broken.

Event Timeline

I checked all the repos on my machine and couldn't find any still using the http URL.

The bot was flagged by a script which monitors incoming bot traffic for http requests, so there's got to be something. I'm going to check if there's something in database-reports using http. Or something our bot relies on which uses that.

My best guess is it's mwclient doing it. Mwclient was updated to use https in February while our bot is using it since last year (which is inconsequential).
@bd808 does mwclient on labs need to be updated?

My best guess is it's mwclient doing it. Mwclient was updated to use https in February while our bot is using it since last year (which is inconsequential).
@bd808 does mwclient on labs need to be updated?

Looks like it:

tools-bastion-02.tools:~
bd808$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mwclient
>>> mwclient.__ver__
'0.8.0.dev1'

See also T105794#2314347 for a note about setting scheme='https' in config to deal with protocol relative URLs.

I filed T136106: Upgrade globally installed python-mwclient to 0.8.1 to get the global package upgraded. The quick fix for any given tool would be to switch to using a virtualenv that installs the newer package locally.

DannyH triaged this task as Medium priority.May 24 2016, 5:32 PM
DannyH updated the task description. (Show Details)
DannyH set the point value for this task to 0.5.

Now that the package is updated, is there a process we can go through to get individual bots to use the new software (as in, do we need restarts of long-running daemons)? Also, the scheme='http' issue in mwclient seems like a bug. Shouldn't it be taking the scheme from the configured base URI if it encounters proto-rel links while parsing things?

Now that the package is updated, is there a process we can go through to get individual bots to use the new software (as in, do we need restarts of long-running daemons)?

I sent a quick announcement to labs-l about restarting long running jobs using mwclient.

Also, the scheme='http' issue in mwclient seems like a bug. Shouldn't it be taking the scheme from the configured base URI if it encounters proto-rel links while parsing things?

That does seem like something that could be fixed upstream. @Steinsplitter could you file a bug/feature request with mwclient? I'd file one but I'm not sure how to describe triggering this issue.

I sent a quick announcement to labs-l about restarting long running jobs using mwclient.

Thanks!