Page MenuHomePhabricator

Simplify WikibaseRepo "mw.config.values.wbSiteDetails" module and use content versioning
Closed, ResolvedPublic

Description

This is a bit of minor tech debt to simplify the code and use newer ResourceLoader mechanisms.

Follows-up: T127275: Wikibase RL module mw.config.values.wbSiteDetails repeatedly flapping.

I attempted this previously with https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/496622/, but this led to a regression (T219452). This task is placeholder for:

  • Figuring out what went wrong.
  • Improve the tests.
  • Do it again :)

Event Timeline

With the help of @Addshore I was able to get Wikibase set up locally with the sites table populated from the WMF site matrix.

The issue is with the suggestions that appear when inserting a new site link statement.

Screenshot 2019-03-28 at 19.46.59.png (1×935 px, 111 KB)

With the patch applied, there are no suggestions (but also no errors; not in PHP, JS, nor on the network).

Comparing the module output reveals the issue:

export.png (1×2 px, 448 KB)

The data structure has the correct size, keys and value structure. But, the values (groups, display names, urls) are all the same, for aawiki.

This explains why (except when typing "aa"), there were no suggestions.

Change 499920 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/Wikibase@master] Use enableModuleContentVersion() for Wikibase\lib\SitesModule (take 2)

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

Change 499946 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/Wikibase@master] Use module 'factory' to inject dependencies instead of worker class

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

Change 499920 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use enableModuleContentVersion() for Wikibase\lib\SitesModule (take 2)

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

Change 499946 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use module 'factory' for dependency injection to SitesModule class

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

Lucas_Werkmeister_WMDE assigned this task to Krinkle.

This has been deployed for about two weeks now, I believe, with no reported regressions as far as I’m aware. I think we can close this task :)