User:Malyacko/Bugzilla42Upgrade

Document refers to upgrading Bugzilla from 4.0.9 to 4.2.4, locally tested with WM changes available in Gerrit which might not necessaraily be in sync with what's on the server.

= Relevant documentation =
 * http://wikitech.wikimedia.org/view/Bugzilla.wikimedia.org#Upgrade_from_3.6.0_to_4.0
 * To ignore on that page: http://wikitech.wikimedia.org/view/Bugzilla_linking_patch is irrelevant and superseded by wikimedia/bugzilla/modifications/bugzilla-4.0/extensions/Wikimedia/Extension.pm (Tested for "r15716"in bug 2396#c27)
 * STILL MUST CHECK: Applied patches. See https://bugzilla.wikimedia.org/show_bug.cgi?id=40642#c3

= Announcement = bugzilla.wikipedia.org will be unavailable due to maintenance work on Thursday, November 29th from 22:00UTC until max. Friday November 30th 02:00UTC (Thursday, November 29th 14:00PST until max. 18:00PST).
 * Set https://bugzilla.wikimedia.org/editparams.cgi?section=general#announcehtml_desc to

= Before running checksetup.pl = ./template/en/custom/global/site-navigation.html.tmpl ./template/en/custom/global/user-links.html.tmpl ./template/en/custom/global/search-links.html.tmpl
 * make sure that in extensions/Voting/ there is NO file called "disabled" otherwise we disable voting! (MUST run checksetup.pl afterwards in case of deleting that file!)
 * Reapply diff for bugzilla-4.0/Bugzilla/BugMail.pm to bugzilla-4.2/Bugzilla/BugMail.pm (see my email attachment).
 * I needed to run: /usr/bin/perl install-module.pl Math::Random::ISAAC
 * I ignored: "WARNING: You need to set the max_allowed_packet parameter in your MySQL configuration to at least 3276750. Currently it is set to 1048576. You can set this parameter in the [mysqld] section of your MySQL configuration file."
 * Due to https://bugzilla.mozilla.org/show_bug.cgi?id=736057 you MUST run find . -type f -name "*.tmpl" -exec replace 'FILTER url_quote' 'FILTER uri' -- {} \; in order to fix

= Likely breaks when upgrading =
 * "Weekly Summary" link on left pane in Bugzilla will be a 404. It links to bwo/weekly-bug-summary.cgi but (proper) extensions have the URL style bwo/page.cgi?id=weekly-bug-summary.html . Still this doesn't work.
 * I've tried copying updated versions from https://projects.kde.org/projects/websites/bugs-kde-org/repository/revisions/kde/raw/weekly-bug-summary.cgi and https://projects.kde.org/projects/websites/bugs-kde-org/repository/revisions/kde/raw/component-report.cgi into "extensions/WeeklyReport/" dir but I get "500 Internal Server Error". Does something need to be run / generated on the server (cronjob)? I have no idea.

= Might break when upgrading =
 * "Bugzilla weekly report" email sent on Mondays to wikitech-l - no idea.
 * Code likely at wikimedia/bugzilla/modifications/bugzilla-3.6.2/scripts/bugzilla_report.php
 * /srv/org/wikimedia/bugzilla/extensions/Sitemap/ isn't in Git. We cannot immediately check if it still works (Google indexing).
 * More info: https://code.google.com/p/bugzilla-sitemap/ and http://bzr.mozilla.org/bugzilla/extensions/sitemap/trunk/files

= We don't care if it breaks = wikimedia/bugzilla/modifications/bugzilla-4.0/client/ (after having contacted Mark A. Hershberger).

= Must test after upgrade =
 * Check if extension https://bugzilla.wikimedia.org/weekly-bug-summary.cgi?tops=10&days=7 works at all - see above.
 * Navigation > Help is broken in 4.2.4, links to non-existing /docs/en/html/bug_page.html . 4.0.9 links to /docs/en/html/index.html
 * /reports.cgi says "Unable to open the chart datafile /var/lib/bugzilla./data/mining/-All-" locally here, but might be because of missing data.

= After all is done =
 * Update Gerrit: Copy wikimedia/bugzilla/modifications/bugzilla-4.0 to "bugzilla-4.2"
 * Copy SiteMap from server into Gerrit so stuff is in sync
 * Find out where "weekly Bugzilla email" code is located on server and also copy to Gerrit
 * Close https://bugzilla.wikimedia.org/show_bug.cgi?id=33158
 * Find out how changes committed in Gerrit get deployed on server.

= Other stuff to do after disabling bugmail =
 * Merge version numbers in "MediaWiki" product:
 * {1.17, 1.17.0, 1.17.0beta1, 1.17.0rc1, 1.17.1, 1.17.2, 1.17.3, 1.17.4} => 1.17.x
 * {1.18, 1.18.0, 1.18.1, 1.18.2, 1.18.3} => 1.18.x (keep separate 1.18.6)
 * {1.19.0beta1, 1.19.0beta2, 1.19rc1} => 1.19rc1
 * Merge "lowest" priority into "low" priority.