Page MenuHomePhabricator

WikibaseLexeme test broken by refactor of MediaWiki's Language class
Closed, ResolvedPublic0 Estimated Story Points

Description

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/507856 refactored some code, including a private property that was being accessed in the tests via Reflection(!). This has broken the WikibaseLexeme repo's tests, and all other Wikibase-related repos which are tested in concert with it, and slowed down CI merges by many hours.

Event Timeline

Change 531954 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikibaseLexeme@master] Follow-up I245ae94bf: Point to LanguageNameUtils, not Language

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

Jdforrester-WMF triaged this task as Unbreak Now! priority.

Change 531954 abandoned by Jforrester:
Follow-up I245ae94bf: Point to LanguageNameUtils, not Language

Reason:
I think this is no longer needed after the entire clean-up was removed in I3c4423de22 instead, but if it's still wanted this can be restored.

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

Provisionally should be fixed by I3c4423de22.

Tarrow lowered the priority of this task from Unbreak Now! to Medium.Aug 24 2019, 10:42 AM
Tarrow subscribed.

Looks to me like this is no longer UBN.

Leaving the task open for investigation as to how we ended up with a broken build. I'm still a little confused by the timeline.

Thanks for looking at this @Jdforrester-WMF while WMDE was out of the office.

WikibaseLexeme tests were accessing a private property of Language via ReflectionClass in order to clear Language caches, instead of using the public method Language::clearCaches(). When Language got refactored, the private member was removed, which broke the tests. Tests that are not run by CI cannot rely on private things not changing if they want to not break -- they need to use only public interfaces.

Tests that are not run by CI

Ah, that's the bit I was missing; I thought that Lexeme was in the gate.

From the patch:

@Jdforrester-WMF

Lexeme's tests are too slow to add to the gate currently, yes.