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 created this task.Feb 5 2020, 4:05 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 5 2020, 4:05 PM
Nuria reassigned this task from MusikAnimal to fdans.Feb 5 2020, 5:06 PM
Nuria added a project: Analytics-Kanban.
Nuria updated the task description. (Show Details)
Nuria updated the task description. (Show Details)Feb 5 2020, 5:11 PM

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.
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptFeb 6 2020, 6:08 PM
Harej removed a subscriber: Harej.Feb 11 2020, 1:16 AM

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

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

fdans added a comment.Feb 19 2020, 6:30 PM

@MusikAnimal FYI this change will be deployed tomorrow

Milimetric added a comment.EditedFeb 27 2020, 10:10 PM

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.

fdans moved this task from In Code Review to Done on the Analytics-Kanban board.Mar 3 2020, 1:45 PM
Nuria added a comment.Mar 18 2020, 2:17 PM

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

Nuria added a subscriber: elukey.Apr 28 2020, 2:18 AM

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

Nuria closed this task as Resolved.Apr 30 2020, 4:18 PM