[Bug] Configuration on wikidata.beta.wmflabs.org is broken
Closed, ResolvedPublic

Description

The configuration on https://wikidata.beta.wmflabs.org/wiki/Q12 is broken, again. I can not add any statement, because the Mediawiki-extensions-PropertySuggester does not work. What I get is "Exception caught: Property 31 in wgPropertySuggesterClassifyingPropertyIds does not have value type wikibase-entityid". I can not make sense of this error message, because it mentions a property 31, but the configuration is set to an other one: https://phabricator.wikimedia.org/source/mediawiki-config/browse/master/wmf-config/Wikibase-labs.php;c99c5fcc3bf343080e86cd42a94fa6547db69fac$4. Whats going on here? I know this used to work. Since when is this broken, and what broke it?

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMon, Sep 4, 4:30 PM
thiemowmde triaged this task as Normal priority.
thiemowmde moved this task from incoming to consider for next sprint on the Wikidata board.
ladsgroup@deployment-tin:~$ mwscript eval.php --wiki=wikidatawiki
> print_r( $wgPropertySuggesterClassifyingPropertyIds );
Array
(
    [0] => 31
    [1] => 279
    [2] => 694
)

Oh dear. This looks like the defaults we just recently changed in https://gerrit.wikimedia.org/r/#/c/366864/2/extension.json get merged with the configuration from https://phabricator.wikimedia.org/source/mediawiki-config/browse/master/wmf-config/Wikibase-labs.php;c99c5fcc3bf343080e86cd42a94fa6547db69fac$4. But why? Which code does this awkward merge?

And again, when did this changed? The default was always [ 31 ], but never caused trouble. The change done in https://gerrit.wikimedia.org/r/#/c/366864/2/extension.json can not be the reason for the breakage, as far as I can tell.

Maybe it's easier to run changePropertyDataType.php and change https://wikidata.beta.wmflabs.org/wiki/Property:P31 as well as https://wikidata.beta.wmflabs.org/wiki/Property:P279 to be "wikibase-item" instead of "string"?

Yeah, I'm about to do that now but overall we should check why extension registration merges the config variables.

It's not possible to do it:

ladsgroup@deployment-tin:~$ mwscript extensions/Wikibase/repo/maintenance/changePropertyDataType.php --wiki=wikidatawiki --property-id P31 --new-data-type "wikibase-item"
An error occured: New and old data type must have the same data value type.

@thiemowmde @Ladsgroup what is the list of properties that we want set for beta?
We should just totally override the defaults for beta so this doesnt happen.
Also, I dont even think the extension should have defaults in the first place, it should just be an empty array.

Addshore moved this task from Backlog to Watching on the User-Addshore board.

@Addshore But this line is meant to override the default, and did that in the past as far as I'm aware of. Why is configuration merged now?

This has to do with the switch to extension registration, so the way the globals work has changed since the latest version of PS has been deployed.

See https://github.com/wikimedia/mediawiki/blob/master/includes/registration/ExtensionRegistry.php#L282

Change 375999 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/PropertySuggester@master] Remove Wikidata-related config variables

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

The patch here is my suggestion based on @Addshore's comment. These config variables are about Wikidata and shouldn't be there at the first place.

Change 375999 merged by jenkins-bot:
[mediawiki/extensions/PropertySuggester@master] Remove Wikidata-related config variables

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

This landed in the build in https://gerrit.wikimedia.org/r/#/c/376006 and this will be on beta soon!

Addshore closed this task as Resolved.Tue, Sep 5, 1:57 PM
Addshore claimed this task.
Addshore moved this task from Needs Review / Blocked / Waiting to Done on the User-Addshore board.
Addshore reassigned this task from Addshore to Ladsgroup.
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptTue, Sep 5, 1:58 PM

Change 376017 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[operations/mediawiki-config@master] Move config variables from the extension to config repo

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

Change 376017 merged by jenkins-bot:
[operations/mediawiki-config@master] Move config variables from the extension to config repo

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

Mentioned in SAL (#wikimedia-operations) [2017-09-06T13:12:03Z] <reedy@tin> Synchronized wmf-config/Wikibase-labs.php: Move some wikidata config T174962 (duration: 00m 49s)

Mentioned in SAL (#wikimedia-operations) [2017-09-06T13:13:16Z] <reedy@tin> Synchronized wmf-config/Wikibase-production.php: Move some wikidata config T174962 (duration: 00m 48s)

hoo added a comment.Wed, Sep 6, 5:56 PM

This broke the $wgPropertySuggesterDeprecatedIds configuration for production. Will fix.

Change 376317 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[operations/mediawiki-config@master] Fix $wgPropertySuggesterDeprecatedIds for Wikidata

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

Change 376317 merged by jenkins-bot:
[operations/mediawiki-config@master] Fix $wgPropertySuggesterDeprecatedIds for Wikidata

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

This broke the $wgPropertySuggesterDeprecatedIds configuration for production.

This is sad. On https://gerrit.wikimedia.org/r/375999 I asked if this was taken care of, and got a "yes" by @Ladsgroup.

And I did it in https://gerrit.wikimedia.org/r/376017 (but forgot some stuff I think)