Provide data for usage metrics
Closed, ResolvedPublic5 Story Points

Description

Please measure with at least a one-day granularity

Access step:

Preview step:

  • how often the import fails because of any exception, seperated by the reasons, e.g. - https://gerrit.wikimedia.org/r/#/c/414677/
    • a suppressed file (do we coun't each file once, of if there are multiple attempts, we count it multiple times?)
    • missing info (e.g. first version of file could not be retrieved anymore)
    • any of our max revisions limit is hit

Import Step:

  • how many files were successfully moved
  • how long it takes between users clicking the "import button" and redirecting to the commons page of a successful transfer
  • the number of file revisions, number of text revisions, and total MB moved for files that were attempted to be moved

Misc:

  • add all new metrics variable to a metrics.md file in the docs folder of the respective extension - Done in all patches
Lea_WMDE triaged this task as Normal priority.
Tobi_WMDE_SW set the point value for this task to 5.Feb 20 2018, 4:33 PM
Addshore claimed this task.
Restricted Application added a project: User-Addshore. · View Herald TranscriptFeb 21 2018, 3:03 PM
Addshore moved this task from Backlog to In Progress on the User-Addshore board.Feb 21 2018, 3:04 PM
 how often the import fails because of any exception, seperated by the reasons, e.g.
a suppressed file (do we coun't each file once, of if there are multiple attempts, we count it multiple times?)
missing info (e.g. first version of file could not be retrieved anymore)
any of our max revisions limit is hit
a failure of the abuse filter

So all of these things are actually checked before the preview page is shown, rather than at time of import.
I guess we want to track that?
However it should be noted the number of failed imports and the number of times these things occur do not relate at all.

Addshore updated the task description. (Show Details)Feb 21 2018, 4:28 PM
Addshore updated the task description. (Show Details)Feb 21 2018, 4:33 PM

Change 413195 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Provide import step data for usage metrics

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

Change 413199 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileExporter@master] Add another URL parameter to ease detection of imports from exporter

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

Change 413203 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Provide special page load data for usage metrics

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

Patches above cover the access and import step.
TODO still is the preview step.

Change 413195 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Provide import step data for usage metrics

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

WMDE-Fisch added a subscriber: WMDE-Fisch.EditedFeb 22 2018, 2:39 PM

Some questions that bumped into my head while reviewing patches here:

The SpecialPage on the Importer only shows if the user accessing it has rights to upload a file. ( I think on commons this means he as to have an account and needs to be logged in ). If a user gets to the Importer special page by clicking a link on the Exporter and - for whatever reason - he is not logged in, he will get a message, that he should login to continue.

Q1: Do we want to log theses special events? ( if the user needs to be logged in on the source wiki like en.wp SUL should normally take care of him being logged in on commons as well I guess, but still )
Q2: Sister projects like mediawiki.org / wikivoyage.org do not share the SUL login state with commons so...

  • a) Do we want to allow moving files from there too?
  • b) Would that work?

@Addshore @Lea_WMDE

Change 413203 merged by WMDE-Fisch:
[mediawiki/extensions/FileImporter@master] Provide special page load data for usage metrics

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

Q1)Can this really happen? We only show the "move to commons" link to autoconfirmed users, right?
Q2) Let me take this into my next UX meeting (FYI @Charlie_WMDE @Hanna_Petruschat_WMDE) and we will get back about that probably during storytime.
Thanks for the info @WMDE-Fisch!

Q1)Can this really happen? We only show the "move to commons" link to autoconfirmed users, right?

Yes, the link is only visible for autoconfirmed users. No I think normally this should not happen. But when clicking the link, the user will be redirected to the commons wiki on another domain. There he should be automatically and instantly logged in due to SUL cookie magic and therefore he should be able to see the special page and upload images.

But: We don't really know in how many cases this process of getting automatically logged in to a foreign wiki with SUL breaks. So I thought we might want to try to track that somehow. - Could be disturbing for the users and if it happens often me might want to react to that in some graceful way. ;-)

Q1)Can this really happen? We only show the "move to commons" link to autoconfirmed users, right?

Permissions on commons and permissions on client projects are different things.
An auto confirmed user on enwiki may not be autoconfirmed on commons.

Yes we do check that the link is only shown to auto confirmed users.

WMDE-Fisch added a comment.EditedFeb 23 2018, 12:43 PM

An auto confirmed user on enwiki may not be autoconfirmed on commons.

But you don't have to be autoconfirmed on commons to use our special page there, right?b

But: We don't really know in how many cases this process of getting automatically logged in to a foreign wiki with SUL breaks. So I thought we might want to try to track that somehow. - Could be disturbing for the users and if it happens often me might want to react to that in some graceful way. ;-)

Then let's track this and see :)

An auto confirmed user on enwiki may not be autoconfirmed on commons.

But you don't have to be autoconfirmed on commons to use our special page there, right?b

No, but you need to be able to upload / be registered :)

Addshore updated the task description. (Show Details)Feb 23 2018, 2:24 PM

Change 413747 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Track number of users not allowed to access special page

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

Addshore updated the task description. (Show Details)Feb 23 2018, 4:28 PM

Change 414677 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/FileImporter@master] Track how often ImportPlan creation fails

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

Addshore updated the task description. (Show Details)Feb 26 2018, 2:39 PM
Addshore moved this task from Doing to Review on the WMDE-QWERTY-Sprint-2018-02-20 board.
Addshore moved this task from In Progress to Needs Review on the User-Addshore board.

Change 413747 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Track number of users not allowed to access special page

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

Change 414677 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Track how often ImportPlan creation fails

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

Change 413199 merged by jenkins-bot:
[mediawiki/extensions/FileExporter@master] Add another URL parameter to ease detection of imports from exporter

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

Lea_WMDE updated the task description. (Show Details)Feb 28 2018, 3:57 PM

While working with WP and Commons I just realized, that the following seems to be wrong :-/ :

when clicking the link, the user will be redirected to the commons wiki on another domain. There he should be automatically and instantly logged in due to SUL cookie magic and therefore he should be able to see the special page and upload images.

  • when I am logged in on Wikipedia
  • and I am not yet logged in on Commons
  • and I go to https://commons.wikimedia.org/wiki/Special:UploadWizard ( a page that can only be used by logged-in users like our import special page )
  • then I get the message Please log in to upload files.

Usually some JS logic will take care so that I will be logged in an instant but that happens after the PHP is delivered. So users in our use case will probably always run into the "cannot upload" page when not already logged in on commons as well.

Just tested this on https://en.wikipedia.beta.wmflabs.org with https://commons.wikimedia.beta.wmflabs.org
You must be logged in to upload files. :-/

Created a task, see T188625

Addshore updated the task description. (Show Details)Mar 1 2018, 3:49 PM
Addshore moved this task from Review to Done on the WMDE-QWERTY-Sprint-2018-02-20 board.
Lea_WMDE closed this task as Resolved.Mar 12 2018, 9:02 AM