Repository navigation
Bug 2088705 - Record the acting user in flag_activity.who, as a nullable column - #2808
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a nullable
flag_activity.whocolumn for the user who made each flag change, and writes it on every flag change. Nothing reads it yet, and flag changes are still written tobugs_activity.First step of 2085398 (#2796), which makes the column NOT NULL and stops writing
bugs_activity. Shipped in one deploy, that broke flag changes on the pods still running the old code during the rolling deploy: they insert rows withoutwho, which MySQL (strict mode off) stores as 0, and the foreign key rejects it. Once this is deployed, every pod writeswho.Changes
flag_activity.whocolumn, nullable, with a foreign key toprofilesand an index on(who, flag_when). It differs fromsetter_idwhen a request is redirected, which keeps the original setter.who = setter_idon the rows without it, on every run: the existing rows, and the ones pods on the old code insert during the deploy.Bugzilla::Flagwriteswho(the current user, or the setter when there is none) for every flag change.scripts/remove-non-public-data.plkeepswhoin the public data dump, and the users it references.t/flag-activity-who.t.Test plan
flag_activityrow has that user aswhoand the requester assetter_idwho: the column, its foreign key and index are added, and the existing rows getwho = setter_idflag_activityrow withoutwho: it's saved withwhoNULL, and the next checksetup fills itReferences