Page MenuHomePhabricator

Migrate GrowthExperiments to virtual domains
Closed, ResolvedPublic5 Estimated Story Points

Description

This will simplify and remove a lot of code from GE extension. See https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ReadingLists/+/985162 as an example.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Ladsgroup Will there be a depreciation timeline for extensions that store their data outside the main database to use a virtual database domain?

@Ladsgroup Will there a depreciation timeline for extensions that store their data outside the main database to use a virtual database domain?

We are marking the interfaces you're coupling to as internal and unstable. That means it might break at any moment. There is no timeline yet but we'd do it right away if the need arises.

DMburugu lowered the priority of this task from High to Medium.Jun 13 2024, 3:27 PM

It would be good to have this in the next week or two for T352113. Otherwise there will be some kind of awkward workaround.

Urbanecm_WMF raised the priority of this task from Medium to High.Nov 11 2024, 8:25 AM

It would be good to have this in the next week or two for T352113. Otherwise there will be some kind of awkward workaround.

Duly noted, thanks. Moving to Up Next, so we can consider this for our next sprint. High per @tstarling's comment.

KStoller-WMF set the point value for this task to 5.Nov 12 2024, 5:13 PM

I'm sorry for being still very clueless about databases in mediawiki (and in wmf prod in particular). But from the parent task I gather that the LBFactory class (or service?) is the problem?

In GrowthExperiments, we are using that service in exactly one class MenteeOverviewDataUpdater, and are calling two methods:

$this->lbFactory->waitForReplication();
$this->lbFactory->autoReconfigure();

I'm not sure how that usage maps to "use virtual domains". (That being said, I'm also not sure what a "database domain" is in the first place, virtual or not.)

Replacing GEDatabaseCluster (similar to the linked ReadingList patch) would be the primary goal, so mostly changes in GrowthExperimentsServices and SchemaHooks.

UpdateMenteeData should call $this->waitForReplication() instead of MenteeOverviewDataUpdater doing the calls.

But from the parent task I gather that the LBFactory class (or service?) is the problem?

Generally speaking, LB should be phased out and you should use ICP instead. I linked an example in the description.

Thank you both, this is helpful!

/me goes back to looking into the code to figure out better what is involved.

Change #1091197 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[operations/mediawiki-config@master] [GrowthExperiments] Add virtual domain config

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

Change #1091198 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Migrate to virtual domains

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

Change #1091197 merged by jenkins-bot:

[operations/mediawiki-config@master] [GrowthExperiments] Add virtual domain config

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

Mentioned in SAL (#wikimedia-operations) [2024-11-19T08:04:34Z] <urbanecm@deploy2002> Started scap sync-world: Backport for [[gerrit:1082726|Translate Event Logging: Enable using $wgTranslateEnableEventLogging (T364460)]], [[gerrit:1092258|CirrusSearch: enable offloading weighted tags via EventBus (T378983 T377150)]], [[gerrit:1091197|[GrowthExperiments] Add virtual domain config (T354939)]]

Mentioned in SAL (#wikimedia-operations) [2024-11-19T08:12:12Z] <urbanecm@deploy2002> urbanecm, wangombe, pfischer: Backport for [[gerrit:1082726|Translate Event Logging: Enable using $wgTranslateEnableEventLogging (T364460)]], [[gerrit:1092258|CirrusSearch: enable offloading weighted tags via EventBus (T378983 T377150)]], [[gerrit:1091197|[GrowthExperiments] Add virtual domain config (T354939)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-11-19T08:29:16Z] <urbanecm@deploy2002> Finished scap sync-world: Backport for [[gerrit:1082726|Translate Event Logging: Enable using $wgTranslateEnableEventLogging (T364460)]], [[gerrit:1092258|CirrusSearch: enable offloading weighted tags via EventBus (T378983 T377150)]], [[gerrit:1091197|[GrowthExperiments] Add virtual domain config (T354939)]] (duration: 24m 42s)

Change #1091198 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Migrate to virtual domains

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

Change #1097298 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/WikimediaMaintenance@master] createExtensionTables: Use virtual domains for GrowthExperiments

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

Change #1097309 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[operations/mediawiki-config@master] [GrowthExperiments] Undefine wgGEDatabaseCluster

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

Change #1097310 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@wmf/1.44.0-wmf.4] Migrate to virtual domains

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

Change #1097298 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMaintenance@master] createExtensionTables: Use virtual domains for GrowthExperiments

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

Change #1097369 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/WikimediaMaintenance@wmf/1.44.0-wmf.4] createExtensionTables: Use virtual domains for GrowthExperiments

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

Change #1097369 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMaintenance@wmf/1.44.0-wmf.4] createExtensionTables: Use virtual domains for GrowthExperiments

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

Change #1097310 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.44.0-wmf.4] Migrate to virtual domains

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

Mentioned in SAL (#wikimedia-operations) [2024-11-25T17:54:57Z] <urbanecm@deploy2002> Started scap sync-world: Backport for [[gerrit:1097310|Migrate to virtual domains (T354939)]], [[gerrit:1097369|createExtensionTables: Use virtual domains for GrowthExperiments (T354939)]]

Mentioned in SAL (#wikimedia-operations) [2024-11-25T17:59:10Z] <urbanecm@deploy2002> urbanecm: Backport for [[gerrit:1097310|Migrate to virtual domains (T354939)]], [[gerrit:1097369|createExtensionTables: Use virtual domains for GrowthExperiments (T354939)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-11-25T18:08:15Z] <urbanecm@deploy2002> Finished scap sync-world: Backport for [[gerrit:1097310|Migrate to virtual domains (T354939)]], [[gerrit:1097369|createExtensionTables: Use virtual domains for GrowthExperiments (T354939)]] (duration: 13m 18s)

Change #1097309 merged by jenkins-bot:

[operations/mediawiki-config@master] [GrowthExperiments] Undefine wgGEDatabaseCluster

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

Mentioned in SAL (#wikimedia-operations) [2024-11-27T14:20:59Z] <urbanecm@deploy2002> Started scap sync-world: Backport for [[gerrit:1097309|[GrowthExperiments] Undefine wgGEDatabaseCluster (T354939)]]

Mentioned in SAL (#wikimedia-operations) [2024-11-27T14:26:27Z] <urbanecm@deploy2002> urbanecm: Backport for [[gerrit:1097309|[GrowthExperiments] Undefine wgGEDatabaseCluster (T354939)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-11-27T14:33:21Z] <urbanecm@deploy2002> Finished scap sync-world: Backport for [[gerrit:1097309|[GrowthExperiments] Undefine wgGEDatabaseCluster (T354939)]] (duration: 12m 21s)