Repository navigation
Conversation
Collaborator
Author
|
Please note that the test_sanity critic failure is the |
This branch has not been deployed
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
Makes
flag_activitythe only record of flag changes: they are no longer written tobugs_activity, and bug history, bugmail and the BugModal activity stream read them fromflag_activity.Part 2 of 1806896, whose part 1 (#2657) moved
flag_state_activityto core asflag_activityand writes every flag change to both tables.Changes
Bugzilla::BugandBugzilla::Attachmentno longer logflagtypes.nametobugs_activity, the user merge ineditusers.cgiwrites its flag changes toflag_activity.GetBugActivityand BugMail's_get_diffsbuild the flag rows fromflag_activity(previous state taken from the same flag's prior row) and ignore the oldflagtypes.namerows inbugs_activity.flag_idinflag_activityinstead of matching the flag type name.scripts/flag_activity_backfill.pl: copies the flag changes inbugs_activitythat are missing fromflag_activity. Before part 1, only review, feedback, needinfo and data-review were recorded there. Backfilled rows haveflag_id0, as the flag can't be recovered reliably frombugs_activity, their history entries show the new state without the previous one. Runs in batches of 1000 bugs, one transaction each, and skips rows already present, so it can be re-run.t/flag-activity-backfill.tThe old
flagtypes.namerows stay inbugs_activity, nothing is deleted.Deploy steps
Without the backfill, history before part 1 loses its changes to flag types other than review, feedback, needinfo and data-review. The script is safe while the current code still writes both tables, so it can run before the switch:
perl scripts/flag_activity_backfill.pl --dry-run, check the counts (unknown flag typecounts changes to flag types deleted or renamed since; those are skipped).--dry-run.If it can only run after the rollout, run steps 1-2 right after it; until then those older changes are missing from bug history.
Test plan
bugs_activitygets no newflagtypes.namerowbugs_activity: missing from history before the backfill, shown after iteditusers.cgi: the reassigned requests appear in bug historyReferences