Last modified: 2014-11-13 23:36:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69163, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67163 - update.php --schema runs post-db update maintenance scripts
update.php --schema runs post-db update maintenance scripts
Status: NEW
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-26 19:46 UTC by Erik Bernhardson
Modified: 2014-11-13 23:36 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Erik Bernhardson 2014-06-26 19:46:21 UTC
When using the --schema option post-db maintenance scripts should not be run as they talk to the database directly and do not use DatabaseUpdater.

Currently if you use the Flow or WikiData extensions and pass --schema without an already initialized database it will error out since their maintenance scripts are trying to talk to an empty databse.

The use case for --schema is within jenkins to log the sql that was used within the test instance.
Comment 1 Antoine "hashar" Musso (WMF) 2014-06-26 19:51:47 UTC
Thanks Erik, I have posted on wikitech-l:

arlier today I slightly changed how Jenkins run the MediaWiki extension job.  Specifically the way the database is updated. 

We used to simply:

 php maintenance/update.php


I wanted to log the SQL queries behind added to the database and the script has a --schema option to do just that. So Jenkins now:

 php maintenance/update.php --schema update_sql.log
 sleep 1
 php maintenance/update.php


The sleep is needed because --schema still write to the update_log database.  The two runs ends up having the same ul_key in the table since it just vary by timestamp (so if two run occurs in the same second, the second has a duplicate key error).

There should be a better fix, but sleep 1 works ™


Flow had an issue with the tests failing because --schema still run the post-db maintenance script (might be the cause of above problem).

Erik Bernhardson figured out a temporary workaround for Flow:

 https://gerrit.wikimedia.org/r/#/c/142303/
Comment 2 Gerrit Notification Bot 2014-06-26 19:52:44 UTC
Change 142382 had a related patch set uploaded by EBernhardson:
update.php --schema should not call maint scripts

https://gerrit.wikimedia.org/r/142382
Comment 3 Gerrit Notification Bot 2014-06-26 19:57:22 UTC
Change 142383 had a related patch set uploaded by Hashar:
Revert "Use mw-run-update-script.sh script"

https://gerrit.wikimedia.org/r/142383
Comment 4 Gerrit Notification Bot 2014-06-26 19:59:20 UTC
Change 142383 abandoned by Hashar:
Revert "Use mw-run-update-script.sh script"

Reason:
Will hack the bin/mw-run-update-script.sh slave script instead. This way we don't have to update all the jobs in Jenkins.

https://gerrit.wikimedia.org/r/142383
Comment 5 Gerrit Notification Bot 2014-06-26 20:02:33 UTC
Change 142386 had a related patch set uploaded by Hashar:
Skip update.php --schema for now

https://gerrit.wikimedia.org/r/142386
Comment 6 Gerrit Notification Bot 2014-06-26 20:03:04 UTC
Change 142386 merged by jenkins-bot:
Skip update.php --schema for now

https://gerrit.wikimedia.org/r/142386
Comment 7 Antoine "hashar" Musso (WMF) 2014-06-26 20:05:10 UTC
update.php --schema is now commented out.  The bug in core is still valid though.
Comment 8 Gerrit Notification Bot 2014-11-13 23:36:56 UTC
Change 142382 abandoned by EBernhardson:
update.php --schema should not call maint scripts

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links