Page MenuHomePhabricator

WikibaseLexeme test broken by refactor of MediaWiki's Language class
Closed, ResolvedPublic0 Estimate 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.

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseLexeme : masterFollow-up I245ae94bf: Point to LanguageNameUtils, not Language

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.
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptAug 23 2019, 6:04 PM

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 added a subscriber: Tarrow.

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.

Jdforrester-WMF closed this task as Resolved.Aug 26 2019, 3:10 PM

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.