Re: [Wikitech-l] Proposal regarding the handling of imported usernames

2017-11-30 Thread Eran Rosenthal
I suggested it on T20209#3535024 back in August, thanks Brad for taking
care for it :)

Just to add a sidenote regarding user=0 and user_text with some non IP
value - I saw it was quite common in Wikidata recentchanges table few
months ago with rc_type=5 (RC_EXTERNAL), though I can't see such anymore.






On Thu, Nov 30, 2017 at 7:31 PM, Brad Jorsch (Anomie)  wrote:

> The proposal was approved by TechCom, the code has been merged, and it's
> live now on the Beta Cluster. I'm running the maintenance script now.
> Please test things there and report any bugs you encounter, either by
> replying to this message or by filing it in Phabricator and adding me as a
> subscriber. Assuming no major errors turn up that can't be quickly fixed,
> I'll probably start running the maintenance script on the production wikis
> the week of December 11 (and perhaps on mediawiki.org and testwiki the
> week
> before).
>
> If you're curious as to what the history of an existing imported page might
> look like after the maintenance script is run, see
> https://commons.wikimedia.beta.wmflabs.org/wiki/
> Template:Documentation?action=history
> for an example.
>
> On Tue, Oct 31, 2017 at 10:52 AM, Brad Jorsch (Anomie) <
> bjor...@wikimedia.org> wrote:
>
> > Handling of usernames in imported edits in MediaWiki has long been weird
> > (T9240[1] was filed in 2006!).
> >
> > If the local user doesn't exist, we get a strange row in the revision
> > table where rev_user_text refers to a valid name while rev_user is 0
> which
> > typically indicates an IP edit. Someone can later create the name, but
> > rev_user remains 0, so depending on which field a tool looks at the
> > revision may or may not be considered to actually belong to the
> > newly-created user.
> >
> > If the local user does exist when the import is done, the edit is
> > attributed to that user regardless of whether it's actually the same
> user.
> > See T179246[2] for an example where imported edits got attributed to the
> > wrong account in pre-SUL times.
> >
> > In Gerrit change 386625[3] I propose to change that.
> >
> >- If revisions are imported using the "Upload XML data" method, it
> >will be required to fill in a new field to indicate the source of the
> >edits, which is intended to be interpreted as an interwiki prefix.
> >- If revisions are imported using the."Import from another wiki"
> >method, the specified source wiki will be used as the source.
> >- During the import, any usernames that don't exist locally (and can't
> >be auto-created via CentralAuth[4]) will be imported as an
> >otherwise-invalid name, e.g. an edit by User:Example from source 'en'
> would
> >be imported as "en>Example".[5]
> >- There will be a checkbox on Special:Import to specify whether the
> >same should be done for usernames that do exist locally (or can be
> created)
> >or whether those edits should be attributed to the
> existing/autocreated
> >local user.
> >- On history pages, log pages, and the like, these usernames will be
> >displayed as interwiki links, much as might be generated by wikitext
> like "
> >[[:en:User:Example|en>Example]]". No parenthesized 'tool' links
> (talk,
> >block, and so on) will be generated for these rows.
> >- On WMF wikis, we'll run a maintenance script to clean up the
> >existing rows with valid usernames and rev_user = 0. The current plan
> there
> >is to attribute these edits to existing SUL users where possible and
> to
> >prefix them with a generic prefix otherwise, but we could as easily
> prefix
> >them all.
> >   - Unfortunately it's impossible to retroactively determine the
> >   actual source of old imports automatically or to automatically do
> anything
> >   about imports that were misattributed to a different local user in
> pre-SUL
> >   times (e.g. T179246[2]).
> >   - The same will be done for CentralAuth's global suppression
> >blocks. In this case, on WMF wikis we can safely point them all at
> Meta.
> >
> > If you have comments on this proposal, please reply here or on
> > https://gerrit.wikimedia.org/r/#/c/386625/.
> >
> >
> > Background: The upcoming actor table changes[6] require some change to
> the
> > handling of these imported names because we can't have separate
> attribution
> > to "Example as a non-registered user" and "Example as a registered user"
> > with the new schema. The options we've identified are:
> >
> >1. This proposal, or something much like it.
> >2. All the existing rows with rev_user = 0 would have to be attributed
> >to the existing local user (if any), and in the future when a new
> user is
> >created any existing edits attributed to that name will be
> automatically
> >attributed to that new account.
> >3. All the existing rows with rev_user = 0 and an existing local user
> >would have to be re-attributed to different *valid* usernames,
> >   

[Wikitech-l] Phabricator monthly statistics - 2017-11

2017-11-30 Thread communitymetrics

Hi Community Metrics team,

This is your automatic monthly Phabricator statistics mail.

Accounts created in (2017-11): 317
Active Maniphest users (any activity) in (2017-11): 876
Task authors in (2017-11): 484
Users who have closed tasks in (2017-11): 272

Projects which had at least one task moved from one column to another on
their workboard in (2017-11): 283

Tasks created in (2017-11): 2314
Tasks closed in (2017-11): 1881
Open and stalled tasks in total: 36740

Median age in days of open tasks by priority:

Unbreak now: 15
Needs Triage: 338
High: 601
Normal: 821
Low: 1073
Lowest: 1018

(How long tasks have been open, not how long they have had that priority)

Active Differential users (any activity) in (2017-11): 29

TODO: Numbers which refer to closed tasks might not be correct, as
described in https://phabricator.wikimedia.org/T1003 .

Yours sincerely,
Fab Rick Aytor

(via community_metrics.sh on phab1001 at Fri Dec  1 00:00:26 UTC 2017)

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Tracking internal uses of Wikidata Query Service

2017-11-30 Thread Stas Malyshev
Hi!

We are seeing more use of the Wikidata Query Service by Wikimedia
projects. Which is excellent news, but somewhat worse news is that the
maintainers of WDQS do not have a good idea what these services are,
what they needs are and so on. So, we have decided we want to start
tracking internal uses of Wikidata Query Service.

To that point, if you run any functionality on Wikimedia sites
(Wikipedias, Wikidata, etc., anything with wikimedia domain) that uses
queries to the Wikidata Query Service, please go to:
https://wikitech.wikimedia.org/wiki/Wikidata_query_service/Usage
and add your project there. That is both if your project runs queries by
itself on the background, or if it uses queries as part of user
interaction scenario.

We do not include labs tools currently unless it is absolutely vital
infrastructure (i.e. if it went down, would it substantially degrade the
main site functionality or make some features unusable?) If you still
feel we should know about certain lab tool, please leave a note on the
talk page.

What's in it for you?

We want to know these in order to better understand the scope of
internal usage and as preparation for T178492 (creating internal WDQS
setup) - with the goal to provide internal users more robust and more
flexible service. Also we want it to ensure we do not break anything
important when we do maintenance, and we know who to talk to if some
queries do not work as expected and we want to fix it.

What we want to know?

- We'd like to have general description of the functionality (i.e., what
the service is for)
- How to recognize queries run by it - user agent? source host? specific
query pattern? some other mark? It is recommended that it would be
possible to recognize
- What kind of queries it runs (no need to list every possible one of
course but if there are typical cases it'd help to see it)?
- How often the queries run - if it's periodic, or what is
expected/statistical usage of the tool if it's user driven tool?
- Where could we see the code at the base of it and who maintains it?
- Feel free to add any other information about anything you think would
be useful for us to know.

What was that page again?

https://wikitech.wikimedia.org/wiki/Wikidata_query_service/Usage

Thanks in advance,
-- 
Stas Malyshev
smalys...@wikimedia.org

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Proposal regarding the handling of imported usernames

2017-11-30 Thread Brad Jorsch (Anomie)
The proposal was approved by TechCom, the code has been merged, and it's
live now on the Beta Cluster. I'm running the maintenance script now.
Please test things there and report any bugs you encounter, either by
replying to this message or by filing it in Phabricator and adding me as a
subscriber. Assuming no major errors turn up that can't be quickly fixed,
I'll probably start running the maintenance script on the production wikis
the week of December 11 (and perhaps on mediawiki.org and testwiki the week
before).

If you're curious as to what the history of an existing imported page might
look like after the maintenance script is run, see
https://commons.wikimedia.beta.wmflabs.org/wiki/Template:Documentation?action=history
for an example.

On Tue, Oct 31, 2017 at 10:52 AM, Brad Jorsch (Anomie) <
bjor...@wikimedia.org> wrote:

> Handling of usernames in imported edits in MediaWiki has long been weird
> (T9240[1] was filed in 2006!).
>
> If the local user doesn't exist, we get a strange row in the revision
> table where rev_user_text refers to a valid name while rev_user is 0 which
> typically indicates an IP edit. Someone can later create the name, but
> rev_user remains 0, so depending on which field a tool looks at the
> revision may or may not be considered to actually belong to the
> newly-created user.
>
> If the local user does exist when the import is done, the edit is
> attributed to that user regardless of whether it's actually the same user.
> See T179246[2] for an example where imported edits got attributed to the
> wrong account in pre-SUL times.
>
> In Gerrit change 386625[3] I propose to change that.
>
>- If revisions are imported using the "Upload XML data" method, it
>will be required to fill in a new field to indicate the source of the
>edits, which is intended to be interpreted as an interwiki prefix.
>- If revisions are imported using the."Import from another wiki"
>method, the specified source wiki will be used as the source.
>- During the import, any usernames that don't exist locally (and can't
>be auto-created via CentralAuth[4]) will be imported as an
>otherwise-invalid name, e.g. an edit by User:Example from source 'en' would
>be imported as "en>Example".[5]
>- There will be a checkbox on Special:Import to specify whether the
>same should be done for usernames that do exist locally (or can be created)
>or whether those edits should be attributed to the existing/autocreated
>local user.
>- On history pages, log pages, and the like, these usernames will be
>displayed as interwiki links, much as might be generated by wikitext like "
>[[:en:User:Example|en>Example]]". No parenthesized 'tool' links (talk,
>block, and so on) will be generated for these rows.
>- On WMF wikis, we'll run a maintenance script to clean up the
>existing rows with valid usernames and rev_user = 0. The current plan there
>is to attribute these edits to existing SUL users where possible and to
>prefix them with a generic prefix otherwise, but we could as easily prefix
>them all.
>   - Unfortunately it's impossible to retroactively determine the
>   actual source of old imports automatically or to automatically do 
> anything
>   about imports that were misattributed to a different local user in 
> pre-SUL
>   times (e.g. T179246[2]).
>   - The same will be done for CentralAuth's global suppression
>blocks. In this case, on WMF wikis we can safely point them all at Meta.
>
> If you have comments on this proposal, please reply here or on
> https://gerrit.wikimedia.org/r/#/c/386625/.
>
>
> Background: The upcoming actor table changes[6] require some change to the
> handling of these imported names because we can't have separate attribution
> to "Example as a non-registered user" and "Example as a registered user"
> with the new schema. The options we've identified are:
>
>1. This proposal, or something much like it.
>2. All the existing rows with rev_user = 0 would have to be attributed
>to the existing local user (if any), and in the future when a new user is
>created any existing edits attributed to that name will be automatically
>attributed to that new account.
>3. All the existing rows with rev_user = 0 and an existing local user
>would have to be re-attributed to different *valid* usernames,
>probably randomly-generated in some manner, and in the future when a new
>user is created any existing edits for that name would have to be similarly
>re-attributed.
>4. Like #2, except the creation (including SUL auto-creation) of the
>same-named account would not be allowed. Thus, an import before the local
>name exists would forever block that name from being used for an actual
>local account.
>5. Some less consistent combination of the "all the existing rows" and
>"when a new user is created" options from #2–4.
>
> Of these options, this 

Re: [Wikitech-l] AdvancedSearch beta feature now on Mediawiki

2017-11-30 Thread יגאל חיטרון
Done.
Igal


2017-11-30 10:54 GMT+02:00 Birgit Müller :

> Hey,
>
> 2017-11-29 16:59 GMT+01:00 יגאל חיטרון :
>
> > I see. I just thought it will be very helpful l to add the local checkbox
> > to the advanced search, from all the keywords that are not still there.
> > Igal
> >
>
> If you find the time, it would be great if you could share how and for what
> you use "local" and why it is helpful for you! Best place for that would be
> https://www.mediawiki.org/wiki/Help_talk:Extension:AdvancedSearch.
>
> Thanks again,
> Birgit
>
>
> >
> > 2017-11-29 17:57 GMT+02:00 Birgit Müller :
> >
> > > Hi Igal,
> > >
> > > thanks for the heads up!
> > >
> > > The current list doesn't contain all existing keywords/options, but all
> > the
> > > keywords/options we've discussed in detail so that we could come up
> with
> > a
> > > decision which keywords we can/can't support or plan to support for
> now.
> > We
> > > plan to investigate more during the beta phase and update the list
> > > accordingly. I will add this explanation to the list, too!
> > >
> > > 2017-11-29 15:37 GMT+01:00 יגאל חיטרון :
> > >
> > > > Hello again, Birgit.
> > > > Thank you for the links.
> > > > Maybe I'm wrong, but looks like that "Functional scope and planned
> > > changes
> > > > of the Advanced Search extension" misses the "local:" keyword.
> > > > Igal (User:IKhitron)
> > > >
> > > >
> > > > 2017-11-29 16:33 GMT+02:00 Birgit Müller <
> birgit.muel...@wikimedia.de
> > >:
> > > >
> > > > > Hey Derk-Jan,
> > > > >
> > > > > 2017-11-22 13:49 GMT+01:00 Derk-Jan Hartman <
> > > > d.j.hartman+wmf...@gmail.com>
> > > > > :
> > > > >
> > > > > > Really impressive !
> > > > > >
> > > > > > I wonder if we can add to the information page, the reasoning
> that
> > > > > > went into selecting which of the advanced options to include, and
> > > > > > which to exclude.
> > > > > >
> > > > >
> > > > > Done! See:
> > > > > https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes/
> > > > > AdvancedSearch/Functional_scope_and_planned_changes_of_
> > > > > the_AdvancedSearch_extension
> > > > > .
> > > > >
> > > > > And there is a link to the list of supported/non supported keywords
> > on
> > > > the
> > > > > central help page:
> > > > > https://www.mediawiki.org/wiki/Help:Extension:
> > > AdvancedSearch#Background
> > > > >
> > > > > Cheers,
> > > > > Birgit
> > > > >
> > > > >
> > > > > >
> > > > > > DJ
> > > > > >
> > > > > > On Wed, Nov 22, 2017 at 1:10 AM, יגאל חיטרון 
> > > > wrote:
> > > > > > > Wow. Thanks a lot! But you really should add a direct link to
> > > editing
> > > > > > menu.
> > > > > > > Igal
> > > > > > >
> > > > > > >
> > > > > > > On Nov 22, 2017 02:02, "bawolff"  wrote:
> > > > > > >
> > > > > > >> Just for reference, you can upload files to phab from mobile
> by
> > > > going
> > > > > > >> to http://phabricator.wikimedia.org/file/upload (Yeah, its
> the
> > > most
> > > > > > >> hidden thing ever)
> > > > > > >>
> > > > > > >> --
> > > > > > >> bawolff
> > > > > > >>
> > > > > > >> On Tue, Nov 21, 2017 at 11:47 PM, יגאל חיטרון <
> > khit...@gmail.com>
> > > > > > wrote:
> > > > > > >> > Hello, Birgit. Unfortunately, I can't open a phab ticket,
> > > because
> > > > > I'm
> > > > > > on
> > > > > > >> > mobile, and there is no way to upload a file to phabricator
> > from
> > > > > > mobile.
> > > > > > >> > So, I'll answer you here. I'm on Lollipop, use internal
> > browser,
> > > > > > timeless
> > > > > > >> > skin. I can't make a screenshot from this device, so I did
> it
> > on
> > > > > > another
> > > > > > >> > one, almost the same, just another OS version. And the
> result
> > > > looks
> > > > > > >> > completely different there, but still broken, see the file
> > > > attached,
> > > > > > all
> > > > > > >> > the section captures are almost hidden. Hope it helps,
> > > > > > >> > Igal.
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > On Nov 22, 2017 01:12, "Birgit Müller" <
> > > > birgit.muel...@wikimedia.de
> > > > > >
> > > > > > >> wrote:
> > > > > > >> >
> > > > > > >> >> Hi Igal,
> > > > > > >> >>
> > > > > > >> >> thanks for letting us know! Could you maybe give a bit more
> > > > details
> > > > > > >> (e.g.
> > > > > > >> >> the skin you use, operating system) and make a screenshot
> so
> > > that
> > > > > we
> > > > > > can
> > > > > > >> >> look into it?
> > > > > > >> >>
> > > > > > >> >> Best place to report that would be directly in Phabricator,
> > > > project
> > > > > > tag
> > > > > > >> is
> > > > > > >> >> https://phabricator.wikimedia.org/tag/advanced-search/.
> > > > > > >> >>
> > > > > > >> >> Thans and cheers,
> > > > > > >> >> Birgit
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >> 2017-11-21 23:51 GMT+01:00 יגאל חיטרון  >:
> > > > > > >> >>
> > > > > > >> >> > Hello. Great idea indeed. But it does not work. 

Re: [Wikitech-l] AdvancedSearch beta feature now on Mediawiki

2017-11-30 Thread Birgit Müller
Hey,

2017-11-29 16:59 GMT+01:00 יגאל חיטרון :

> I see. I just thought it will be very helpful l to add the local checkbox
> to the advanced search, from all the keywords that are not still there.
> Igal
>

If you find the time, it would be great if you could share how and for what
you use "local" and why it is helpful for you! Best place for that would be
https://www.mediawiki.org/wiki/Help_talk:Extension:AdvancedSearch.

Thanks again,
Birgit


>
> 2017-11-29 17:57 GMT+02:00 Birgit Müller :
>
> > Hi Igal,
> >
> > thanks for the heads up!
> >
> > The current list doesn't contain all existing keywords/options, but all
> the
> > keywords/options we've discussed in detail so that we could come up with
> a
> > decision which keywords we can/can't support or plan to support for now.
> We
> > plan to investigate more during the beta phase and update the list
> > accordingly. I will add this explanation to the list, too!
> >
> > 2017-11-29 15:37 GMT+01:00 יגאל חיטרון :
> >
> > > Hello again, Birgit.
> > > Thank you for the links.
> > > Maybe I'm wrong, but looks like that "Functional scope and planned
> > changes
> > > of the Advanced Search extension" misses the "local:" keyword.
> > > Igal (User:IKhitron)
> > >
> > >
> > > 2017-11-29 16:33 GMT+02:00 Birgit Müller  >:
> > >
> > > > Hey Derk-Jan,
> > > >
> > > > 2017-11-22 13:49 GMT+01:00 Derk-Jan Hartman <
> > > d.j.hartman+wmf...@gmail.com>
> > > > :
> > > >
> > > > > Really impressive !
> > > > >
> > > > > I wonder if we can add to the information page, the reasoning that
> > > > > went into selecting which of the advanced options to include, and
> > > > > which to exclude.
> > > > >
> > > >
> > > > Done! See:
> > > > https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes/
> > > > AdvancedSearch/Functional_scope_and_planned_changes_of_
> > > > the_AdvancedSearch_extension
> > > > .
> > > >
> > > > And there is a link to the list of supported/non supported keywords
> on
> > > the
> > > > central help page:
> > > > https://www.mediawiki.org/wiki/Help:Extension:
> > AdvancedSearch#Background
> > > >
> > > > Cheers,
> > > > Birgit
> > > >
> > > >
> > > > >
> > > > > DJ
> > > > >
> > > > > On Wed, Nov 22, 2017 at 1:10 AM, יגאל חיטרון 
> > > wrote:
> > > > > > Wow. Thanks a lot! But you really should add a direct link to
> > editing
> > > > > menu.
> > > > > > Igal
> > > > > >
> > > > > >
> > > > > > On Nov 22, 2017 02:02, "bawolff"  wrote:
> > > > > >
> > > > > >> Just for reference, you can upload files to phab from mobile by
> > > going
> > > > > >> to http://phabricator.wikimedia.org/file/upload (Yeah, its the
> > most
> > > > > >> hidden thing ever)
> > > > > >>
> > > > > >> --
> > > > > >> bawolff
> > > > > >>
> > > > > >> On Tue, Nov 21, 2017 at 11:47 PM, יגאל חיטרון <
> khit...@gmail.com>
> > > > > wrote:
> > > > > >> > Hello, Birgit. Unfortunately, I can't open a phab ticket,
> > because
> > > > I'm
> > > > > on
> > > > > >> > mobile, and there is no way to upload a file to phabricator
> from
> > > > > mobile.
> > > > > >> > So, I'll answer you here. I'm on Lollipop, use internal
> browser,
> > > > > timeless
> > > > > >> > skin. I can't make a screenshot from this device, so I did it
> on
> > > > > another
> > > > > >> > one, almost the same, just another OS version. And the result
> > > looks
> > > > > >> > completely different there, but still broken, see the file
> > > attached,
> > > > > all
> > > > > >> > the section captures are almost hidden. Hope it helps,
> > > > > >> > Igal.
> > > > > >> >
> > > > > >> >
> > > > > >> > On Nov 22, 2017 01:12, "Birgit Müller" <
> > > birgit.muel...@wikimedia.de
> > > > >
> > > > > >> wrote:
> > > > > >> >
> > > > > >> >> Hi Igal,
> > > > > >> >>
> > > > > >> >> thanks for letting us know! Could you maybe give a bit more
> > > details
> > > > > >> (e.g.
> > > > > >> >> the skin you use, operating system) and make a screenshot so
> > that
> > > > we
> > > > > can
> > > > > >> >> look into it?
> > > > > >> >>
> > > > > >> >> Best place to report that would be directly in Phabricator,
> > > project
> > > > > tag
> > > > > >> is
> > > > > >> >> https://phabricator.wikimedia.org/tag/advanced-search/.
> > > > > >> >>
> > > > > >> >> Thans and cheers,
> > > > > >> >> Birgit
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >> 2017-11-21 23:51 GMT+01:00 יגאל חיטרון :
> > > > > >> >>
> > > > > >> >> > Hello. Great idea indeed. But it does not work. I just
> opted
> > > in,
> > > > > and I
> > > > > >> >> can
> > > > > >> >> > only see broken rectangles and partial captures. Looks
> like a
> > > > huge
> > > > > css
> > > > > >> >> > problem.
> > > > > >> >> > User:IKhitron (Igal)
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> >
> > > > > >> >> > On Nov 21, 2017 23:02, "Birgit Müller" <
> > > > > birgit.muel...@wikimedia.de>
> > > > > >> >> >