Page MenuHomePhabricator

[Flow] Flow workflow is for different page
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error

Request URL: https://www.mediawiki.org/wiki/Topic:050e2fb772abdae40bd7842b2b77d26b
Request ID: XOTDbgpAMEkAACVb@SkAAAAU

message
Flow workflow is for different page
trace
/srv/mediawiki/php-1.34.0-wmf.6/extensions/Flow/includes/WorkflowLoaderFactory.php:130

#0 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Flow/includes/WorkflowLoaderFactory.php(103): Flow\WorkflowLoaderFactory->loadWorkflowById(Title, Flow\Model\UUID)
#1 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Flow/includes/Actions/Action.php(105): Flow\WorkflowLoaderFactory->createWorkflowLoader(Title)
#2 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Flow/includes/Actions/ViewAction.php(20): Flow\Actions\FlowAction->showForAction(string, OutputPage)
#3 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Flow/includes/Actions/Action.php(50): Flow\Actions\ViewAction->showForAction(string)
#4 /srv/mediawiki/php-1.34.0-wmf.6/includes/MediaWiki.php(499): Flow\Actions\FlowAction->show()
#5 /srv/mediawiki/php-1.34.0-wmf.6/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#6 /srv/mediawiki/php-1.34.0-wmf.6/includes/MediaWiki.php(865): MediaWiki->performRequest()
#7 /srv/mediawiki/php-1.34.0-wmf.6/includes/MediaWiki.php(515): MediaWiki->main()
#8 /srv/mediawiki/php-1.34.0-wmf.6/index.php(42): MediaWiki->run()
#9 /srv/mediawiki/w/index.php(3): include(string)
#10 {main}

Impact

Notes

Rarely occurs apparently.

Event Timeline

hashar created this task.May 22 2019, 9:28 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 22 2019, 9:28 AM
Restricted Application added a project: Growth-Team. · View Herald TranscriptMay 22 2019, 9:29 AM
hashar updated the task description. (Show Details)May 22 2019, 9:29 AM
Krinkle updated the task description. (Show Details)Jul 1 2019, 4:46 PM
Krinkle added a subscriber: Krinkle.

Error
The Structured Discussions workflow is not associated with this page.

This part is fine, the application is recognising a certain state it does not support, and reports it properly to the user. It appears up to this point, the response could be HTTP 200 or 40x.

But then, after printing this, it blows up:

[XRo48gpAICAAAEaJC1gAAAAY] 2019-07-01 16:46:42: Fatal exception of type "Flow\Exception\InvalidDataException"

Leading to the HTTP 500 internal server error and associated risk, noise and alarms.

kostajh moved this task from Inbox to Q2 2019-20 on the Growth-Team board.Jul 16 2019, 9:02 PM
kostajh added a subscriber: kostajh.

This part is fine, the application is recognising a certain state it does not support, and reports it properly to the user. It appears up to this point, the response could be HTTP 200 or 40x.

So, perhaps in includes/Actions/Action.php in showForAction, we should do something like

try {
	/** @var WorkflowLoaderFactory $factory */
	$factory = $container['factory.loader.workflow'];
	$loader = $factory->createWorkflowLoader( $title );

	if ( $title->getNamespace() === NS_TOPIC && $loader->getWorkflow()->getType() !== 'topic' ) {
		// @todo better error handling
		throw new FlowException( 'Invalid title: uuid is not a topic' );
	}

	$view->show( $loader, $action );
} catch ( FlowException $e ) {
	$e->setOutput( $output );
	if ( $e instanceof InvalidDataException ) {
		// XXX: output the error message, then return
		return;
	}
	throw $e;
}

There are only six instances in the last 30 days so tentatively setting this for Q2. Contributions to fix this are welcome.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:06 PM