Page MenuHomePhabricator

"JobQueueError: Could not enqueue jobs" when trying to request a global vanish on Beta Cluster
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
message
[Z9z7_2GQbzQ0jm6Yx5UH-gAAAJY] /wiki/Spezial:GlobalVanishRequest MediaWiki\JobQueue\Exceptions\JobQueueError: Could not enqueue jobs

Unable to deliver all events: 400: 1 out of 1 events were invalid and not accepted.
trace
Backtrace:
from /srv/mediawiki/php-master/extensions/EventBus/includes/Adapters/JobQueue/JobQueueEventBus.php(134)
#0 /srv/mediawiki/php-master/includes/jobqueue/JobQueue.php(388): MediaWiki\Extension\EventBus\Adapters\JobQueue\JobQueueEventBus->doBatchPush(array, int)
#1 /srv/mediawiki/php-master/includes/jobqueue/JobQueue.php(360): MediaWiki\JobQueue\JobQueue->batchPush(array, int)
#2 /srv/mediawiki/php-master/includes/jobqueue/JobQueueGroup.php(164): MediaWiki\JobQueue\JobQueue->push(array)
#3 /srv/mediawiki/php-master/extensions/CentralAuth/includes/Special/SpecialGlobalVanishRequest.php(153): MediaWiki\JobQueue\JobQueueGroup->push(array)
#4 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(824): MediaWiki\Extension\CentralAuth\Special\SpecialGlobalVanishRequest->onSubmit(array, MediaWiki\HTMLForm\OOUIHTMLForm)
#5 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(705): MediaWiki\HTMLForm\HTMLForm->trySubmit()
#6 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(721): MediaWiki\HTMLForm\HTMLForm->tryAuthorizedSubmit()
#7 /srv/mediawiki/php-master/includes/specialpage/FormSpecialPage.php(240): MediaWiki\HTMLForm\HTMLForm->show()
#8 /srv/mediawiki/php-master/extensions/CentralAuth/includes/Special/SpecialGlobalVanishRequest.php(246): MediaWiki\SpecialPage\FormSpecialPage->execute(null)
#9 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(729): MediaWiki\Extension\CentralAuth\Special\SpecialGlobalVanishRequest->execute(null)
#10 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(1737): MediaWiki\SpecialPage\SpecialPage->run(null)
#11 /srv/mediawiki/php-master/includes/actions/ActionEntryPoint.php(499): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#12 /srv/mediawiki/php-master/includes/actions/ActionEntryPoint.php(143): MediaWiki\Actions\ActionEntryPoint->performRequest()
#13 /srv/mediawiki/php-master/includes/MediaWikiEntryPoint.php(202): MediaWiki\Actions\ActionEntryPoint->execute()
#14 /srv/mediawiki/php-master/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#15 /srv/mediawiki/w/index.php(3): require(string)
#16 {main}
Impact

Reliably/reproducibly prevents me from being able to request a global vanish using a test account on Beta Cluster. Tested on beta-dewiki, beta-metawiki, beta-enwiki

Notes

Experienced when testing the (merged) patch for T380527: AccountVanishRequest locks should always be done on Meta-Wiki.

Acceptance criteria

  • Global vanish requests are processed on the Beta Wikipedia metawiki for accounts with no edits

Event Timeline

Seems to be an issue with queuing jobs specifically in the Beta-Cluster. I see this error where the request ID provided is in the wrong format. Looking further into the code, it seems that the requestId parameter for the job is being defined by GlobalVanishJob to define the vanish request ID in the database but is being taken as the request ID of the current request by the code queuing jobs.

This should be fixable by renaming the job parameter for GlobalVanishJob to use something other than requestId. Updating the docs for Job should also be done to this clearer that using requestId should only be done if the code wants to modify that and not add a new parameter named requestId.

Change #1130126 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CentralAuth@master] Rename 'requestId' parameter in GlobalVanishJob to avoid conflict

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

Change #1130129 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/core@master] Add documentation about 'requestId' param in Job parameters

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

Change #1130126 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Rename 'requestId' parameter in GlobalVanishJob to avoid conflict

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

Suggested QA steps for the beta wikis:

  1. Create a new account on the beta wikis
  2. Open Special:GlobalVanishRequest for that account
  3. Fill out the request and submit it
  4. Ensure that the request is submitted and that the vanish is performed (you should be logged out and the account you created in step 1 should have been renamed to a different username)

Change #1130129 merged by jenkins-bot:

[mediawiki/core@master] Add documentation about 'requestId' param in Job parameters

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

Djackson-ctr subscribed.

QA is completed, (Global vanish requests are processed on the Beta Wikipedia metawiki (for accounts with no edits))

image.png (1,415×124 px, 37 KB)

image.png (1,159×717 px, 71 KB)

image.png (1,504×759 px, 75 KB)