JobQueueGroup::singleton allows one to get the JobQueue group of any wiki. Most commonly, this is used to enqueue jobs for other wikis with JobQueueGroup::singleton( $another_wiki )->push( $job ). However, when selecting the queue onto which to push the job, JobQueueGroup's code [accesses $wgJobTypeConf directly](https://github.com/wikimedia/mediawiki/blob/dd3125c3b1adbf80845d195f772d7506f14e9470/includes/jobqueue/JobQueueGroup.php#L104-L119), which means that it is using the setting of the current wiki, instead of the wiki selected with JobQueueGroup::singleton( $wiki ). This creates problems in cases where a job type is using one queue for one wiki and a different one for another. This is a common pattern during the JobQueue transport migration to EventBus where we switch jobs selectively wiki-by-wiki or group-by-group, such as T193254: Global renames get stuck at metawiki.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Select proper wgJobTypeConf for the JobQueue target wikis. | mediawiki/core | master | +12 -9 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • Pchelolo | T157088 [EPIC] Develop a JobQueue backend based on EventBus | |||
Resolved | • Pchelolo | T190327 FY17/18 Q4 Program 8 Services Goal: Complete the JobQueue transition to EventBus | |||
Invalid | None | T193471 JobQueueGroup's singletons using the wrong wgJobTypeConf |
Event Timeline
Comment Actions
Change 430097 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Select proper wgJobTypeConf for the JobQueue target wikis.
Comment Actions
Change 430097 abandoned by Ppchelko:
Select proper wgJobTypeConf for the JobQueue target wikis.
Reason:
Heh, ok, seems like we have to reinvent or job transferring strategy..
Comment Actions
Per @aaron
Yes, wgJobTypeConf is intended to be set the same on all wikis to avoid having to shell/API out.
So seems like it's not a bug in MW, but us mistreating the configuration parameter for gradual jobs rollouts.
Comment Actions
Couldn't we just include wgJobTypeConf in the list of settings that can be retrieved for any wiki from SiteConfig?