Page MenuHomePhabricator

[regression-wmf.31] Cannot disable/enable Structured discussion beta feature
Open, Needs TriagePublic

Description

Note: Before deploying wmf.31 to group 2 (e.g. frwiki wmf.30; check List of wikis with Structured discussion feature- enabling/disabling Structured discussion worked fine.

On any wiki with wmf.31 (or in enwiki betalabs) - try to enable/disable 'Structured Discussions on user talk' beta feature - it will have no effect on a User talk page.

  • if a User talk page did not exist before- it won't be created
  • (enabling the feature) if a user page was in text format, it won't convert to Structured Discussions format
  • (disabling the feature) if a user page was in Structured Discussion format, it won't be converted to the text format.

"Restore all default settings (in all sections)" won't have any effect on an existing Structured discussion User talk page - the db won't have a record of up_property: beta-feature-flow-user-talk-page up_value: 1, but the SD page is still present.

Event Timeline

Etonkovidova renamed this task from [testwiki wmf.24] Cannot disable Structured discussion to [testwiki wmf.31] Cannot disable/enable Structured discussion .May 6 2020, 1:23 AM
Etonkovidova updated the task description. (Show Details)
Etonkovidova renamed this task from [testwiki wmf.31] Cannot disable/enable Structured discussion to [regression-wmf.31] Cannot disable/enable Structured discussion on group1 wikis.May 6 2020, 9:43 PM
Etonkovidova updated the task description. (Show Details)
Etonkovidova renamed this task from [regression-wmf.31] Cannot disable/enable Structured discussion on group1 wikis to [regression-wmf.31] Cannot disable/enable Structured discussion beta feature.May 8 2020, 12:27 AM
Etonkovidova updated the task description. (Show Details)

I suspect it is this type of error that is happening (link to log):

Flow\Import\OptInController::initiateChange failed to enable Flow on 'User talk:...' for user '.... Request to parsoid for "wikitext" to "html" conversion of content connected to title "User_talk:..." failed: 500 #0 /srv/mediawiki/php-1.35.0-wmf.30/extensions/Flow/includes/Conversion/Utils.php(66): Flow\Conversion\Utils::parsoid('wikitext', 'html', '<div style="wid...', Object(Title))
#1 /srv/mediawiki/php-1.35.0-wmf.30/extensions/Flow/includes/Import/TemplateHelper.php(76): Flow\Conversion\Utils::convert('wikitext', 'html', '<div style="wid...', Object(Title))
#2 /srv/mediawiki/php-1.35.0-wmf.30/extensions/Flow/includes/Import/OptInController.php(628): Flow\Import\TemplateHelper::extractTemplates('<div style="wid...', Object(Title))
#3 /srv/mediawiki/php-1.35.0-wmf.30/extensions/Flow/includes/Import/OptInController.php(159): Flow\Import\OptInController->extractTemplatesAboveFirstSection(Object(Title))
#4 /srv/mediawiki/php-1.35.0-wmf.30/extensions/Flow/includes/Import/OptInController.php(118): Flow\Import\OptInController->enable(Object(Title), Object(User))
#5 /srv/mediawiki/php-1.35.0-wmf.30/includes/deferred/MWCallableUpdate.php(38): Flow\Import\OptInController->Flow\Import\{closure}()
#6 /srv/mediawiki/php-1.35.0-wmf.30/includes/deferred/DeferredUpdates.php(417): MWCallableUpdate->doUpdate()
#7 /srv/mediawiki/php-1.35.0-wmf.30/includes/deferred/DeferredUpdates.php(296): DeferredUpdates::attemptUpdate(Object(MWCallableUpdate), Object(Wikimedia\Rdbms\LBFactoryMulti))
#8 /srv/mediawiki/php-1.35.0-wmf.30/includes/deferred/DeferredUpdates.php(233): DeferredUpdates::run(Object(MWCallableUpdate), Object(Wikimedia\Rdbms\LBFactoryMulti), Object(Monolog\Logger), Object(BufferingStatsdDataFactory), 'post')
#9 /srv/mediawiki/php-1.35.0-wmf.30/includes/deferred/DeferredUpdates.php(150): DeferredUpdates::handleUpdateQueue(Array, 'run', 2)
#10 /srv/mediawiki/php-1.35.0-wmf.30/includes/MediaWiki.php(1059): DeferredUpdates::doUpdates('run')
#11 /srv/mediawiki/php-1.35.0-wmf.30/includes/MediaWiki.php(839): MediaWiki->restInPeace()
#12 /srv/mediawiki/php-1.35.0-wmf.30/includes/MediaWiki.php(848): MediaWiki->{closure}()
#13 /srv/mediawiki/php-1.35.0-wmf.30/includes/MediaWiki.php(574): MediaWiki->doPostOutputShutdown()
#14 /srv/mediawiki/php-1.35.0-wmf.30/index.php(47): MediaWiki->run()
#15 /srv/mediawiki/w/index.php(3): require('/srv/mediawiki/...')
#16 {main}

So, the page renders just fine with Parsoid.

ssastry@scandium:/srv/parsoid-testing$ curl -x scandium.eqiad.wmnet:80 http://zh.wikipedia.org/w/rest.php/zh.wikipedia.org/v3/page/html/User_talk:Zorua_Fox/59594079
<!DOCTYPE html>
...
...</html>

ssastry@scandium:/srv/parsoid-testing$ sudo -u www-data php /srv/mediawiki/multiversion/MWScript.php /srv/parsoid-testing/bin/parse.php --wiki=zhwiki --integrated --pageName 'User_talk:Zorua_Fox' < /dev/null
<!DOCTYPE html>
...
...</html>

@kostajh do you have a more specific error message? Or maybe this is a crasher in Flow code if it is trying to process this DOM in some way?

Looking at the code, there should be another log event with the details of the Parsoid error, but I don't see anything like that in Logstash. Maybe some log level needs to be changed?

I suspect it is this type of error that is happening (link to log):

Flow\Import\OptInController::initiateChange failed to enable Flow on 'User talk:...' for user '.... Request to parsoid for "wikitext" to "html" conversion of content connected to title "User_talk:..." failed: 500 #0 /srv/mediawiki/php-1.35.0-wmf.30/extensions/Flow/includes/Conversion/Utils.php(66): Flow\Conversion\Utils::parsoid('wikitext', 'html', '<div style="wid...', Object(Title))

This could be the same as T252648: Publishing a translation fails with Error converting HTML to wikitext: docserver-http: HTTP 500: {"type":"https://mediawiki.org/wiki/HyperSwitch/errors/unknown_error. In any case as @Tgr said in the previous comment, worth fixing logging so the details aren't lost since that is what helped me quickly fix the problem. But, we should also look on the Parsoid end why this didn't get logged under the Parsoid channel.

The Growth team will consider working on this next week.

Since the issue is upstream in T253149: Regression: UserSaveOptions hook no longer exposes old preference values, we will move this straight to QA for @Etonkovidova to check when the upstream issue is fixed.

Change 599377 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/extensions/Flow@master] Use $originalOptions in UserSaveOptions hook

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

Change 599377 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Use $originalOptions in UserSaveOptions hook

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

So far, testing on testwiki and cawiki showed

  • enabling Structured Discussion is fine
  • disabling Structured discussion still not possible

@Etonkovidova -- so you're saying something is still wrong here?

@Catrope -- can you help us understand what's going on?

@Etonkovidova -- so you're saying something is still wrong here?

@Catrope -- can you help us understand what's going on?

I did some additional testing

Initial state User talk pageUser actionAfter User action switches to SDAfter User action switches to wikitext-basedResult
User - default wikitext-basedvisits wikitext-based User talk pageYesNA
User - wikitext-basedposts content on wikitext-based User talk pageYesNA
User - SDposts content on SD User talk pageNAYes

Here is the description of the above use cases:
Case 1 (Correct behavior) - users who never had User talk page - the User talk page is not existent.

  • a user enables SD in Beta features
  • visits the User talk page -sees SD page - not posting anything there, decides to switch back to wikitext User talk page
  • disables SD beta feature - goes to User talk page - User talk page is wikitext-based page (not SD)

Case 2 (Incorrect behavior) - users who decide to disable SD after having some content posted on it.

  • a user with wikitext-based User talk page posts some content
  • decided to switch to SD
  • the enabling SD is successful - a user posts some content
  • decided to switch back to the wkitext-based User talk
  • cannot disable SD

Taking into account that there were no complaints since switching between formats for User talk pages with content should be extremely rare, I'm moving the ticket off the Current sprint board to Revisit.

Krinkle added a subscriber: Krinkle.

No matches for type:mediawiki AND message:"failed to enable Flow on" in the past 90 days (under any channel or mesage level).

Change 676440 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/Flow@master] Import: Avoid unredacted trace in OptInController log warning

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

I was wrong. Logstash got two queried confused. The results only appeared after I submitted the next query without this search.

Stil seen a couple times a day most days.

Change 676440 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Import: Avoid unredacted trace in OptInController log warning

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