Record the acting user in flag_activity.who, as a nullable column (first step of bug 2085398)
Categories
(bugzilla.mozilla.org :: Bug Creation/Editing, task)
Tracking
()
People
(Reporter: xavier.lhour, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Bug 2085398 (#2796) adds a who column to flag_activity for the user who made the change, which isn't always the setter: redirecting a request keeps the original setter. It makes the column NOT NULL, with a foreign key to profiles, and stops writing flag changes to bugs_activity.
Shipped in one deploy, this breaks flag changes during the rolling deploy: old pods still insert flag_activity rows without who. MySQL strict mode is turned off (Bugzilla/DB/Mysql.pm), so who gets 0 and the foreign key rejects the row.
This bug is the first step, and must be deployed before bug 2085398 (#2796):
flag_activity.who: new nullable column, with a foreign key toprofilesand an index on(who, flag_when). checksetup fills the existing rows withsetter_idBugzilla/Flag.pmwriteswho(the current user, or the setter when there is none) for every flag changescripts/remove-non-public-data.plkeepswhoin the public data dump, and keeps the users it references- Flag changes are still written to
bugs_activity, and nothing readswhoyet
Once this is in production, all pods write who, so 2085398 can make the column NOT NULL and stop writing bugs_activity without breaking the pods still on the old code during its own rolling deploy.
| Reporter | ||
Updated•14 days ago
|
Comment 1•14 days ago
|
||
(via GitHub webhook, authenticated as shared-secret)
Comment 2•13 days ago
|
||
Authored by https://github.com/Xzzz
https://github.com/mozilla/bmo/commit/866379d17a89cd67d14f2c4e1b7f31a2620ea7df
[master] Bug 2088705 - Record the acting user in flag_activity.who, as a nullable column
(via GitHub webhook, authenticated as shared-secret)
Description
•