Page MenuHomePhabricator

Fix double encoding of urls on mediarequests api
Closed, ResolvedPublic

Description

Fix double encoding of urls on mediarequests api

See examples in parent task with https://commons.wikimedia.org/wiki/File:Pr%C3%A4sidentschaftswahl_in_den_Vereinigten_Staaten.ogv file

Event Timeline

Nuria added a project: Analytics-Kanban.
Nuria updated the task description. (Show Details)

Change 570608 had a related patch set uploaded (by Fdans; owner: Fdans):
[analytics/aqs@master] Url encode file name before querying the data store

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

fdans triaged this task as Unbreak Now! priority.Feb 6 2020, 6:08 PM
fdans moved this task from Incoming to Analytics Query Service on the Analytics board.
fdans moved this task from Analytics Query Service to Radar on the Analytics board.
fdans moved this task from Radar to Analytics Query Service on the Analytics board.

Change 570608 merged by jenkins-bot:
[analytics/aqs@master] Url encode file name before querying the data store

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

@MusikAnimal FYI this change will be deployed tomorrow

Ok, I deployed this, seems to fix the original problem as reported in T234590#5850051, as now it allows the single-encoded form:

https://wikimedia.org/api/rest_v1/metrics/mediarequests/per-file/all-referers/user/%2Fwikipedia%2Fcommons%2F5%2F53%2FPr%C3%A4sidentschaftswahl_in_den_Vereinigten_Staaten.ogv/daily/2019020100/2020013100

However, it no longer allows the double encoded form, so I'm guessing this broke @MusikAnimal's interface until he turns off the hack.

There are a few outstanding issues with the mediarequests data that we need to solve for next quarter but this very one can be closed, thanks.

Change 588396 had a related patch set uploaded (by Fdans; owner: Fdans):
[analytics/aqs@master] Handle punctuation chars in paths for mediarequests per file

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

Change 588396 merged by jenkins-bot:
[analytics/aqs@master] Handle punctuation chars in paths for mediarequests per file

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

Nice docs, thanks for taking the time @fdans Ping to @elukey to keep in mind whether the ATS will encode urls on the same manner