Closed Bug 1443777 Opened 6 years ago Closed 6 years ago

Bug links from old alert summaries are broken

Categories

(Tree Management :: Perfherder, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: igoldan, Assigned: igoldan)

References

Details

Attachments

(1 file)

After bug 1428032 landed, I noticed that older alert summaries have broken links to their associated bugs.

If you relink the alert summaries to their corresponding bug, the problem goes away -- but you have to do that for every single one of them.

Here are some examples:
https://treeherder.mozilla.org/perf.html#/alerts?id=8650
https://treeherder.mozilla.org/perf.html#/alerts?id=8527
https://treeherder.mozilla.org/perf.html#/alerts?id=11656
https://treeherder.mozilla.org/perf.html#/alerts?id=11073
Attachment #8976806 - Flags: review?(wlachance)
I must say that this is a *partial* workaround, because of the missing issue_tracker fields from PerformanceAlertSummary. It still doesn't resolve the case for the few github tasks we have.
I only wanted to retain the old behavior, when we were still getting broken links for non-Bugzilla bugs.

The real solution for this issue would be to spend time and fill in the correct issue_trackers for the old alert summaries.
So I am OK if you r- this.
I would prefer to solve this by executing the following sql statement:

update performance_alert_summary set issue_tracker_id=1 where issue_tracker_id is NULL;

And then modifying this column to not allow null for the issue_tracker field:

https://github.com/mozilla/treeherder/blob/c25d373b10d9d2a062994d69eaadf661f138b575/treeherder/perf/models.py#L239

(just delete the `null=True` and then create a new migration)

:emorley, does that sound ok? I ran the above query on stage and it seemed to work fine.
Flags: needinfo?(emorley)
Sounds good to me - thank you for checking :-)
Flags: needinfo?(emorley)
Comment on attachment 8976806 [details] [review]
Link to GitHub pull-request: https://github.com/mozilla/treeherder/pull/3560

:igoldan, can you do up another patch with the migration/deletion that I suggest? I can take care of modifying the db and applying the patch.
Attachment #8976806 - Flags: review?(wlachance)
Attachment #8976806 - Flags: review?(wlachance)
I preferred using set a default value for the issue_tracker field, as it implies a backfill with the missing values.
I also tweaked the *.js a bit, so it's a little more readable.
Attachment #8976806 - Flags: review?(wlachance) → review+
16:04:29	
`update performance_alert_summary set issue_tracker_id=1 where issue_tracker_id is NULL;`
12802 row(s) affected Rows matched: 12802  Changed: 12802  Warnings: 0	0.531 sec
(on prod only)
Commit pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/6becf445a3c377e329860bc7cc2b0b287c02a397
Bug 1443777 - Bug links from old alert summaries are broken (#3560)

Make issue_tracker column non nullable and fix broken tests
I believe this can be marked as resolved?
Flags: needinfo?(emorley)
Yes; normally the person who merges the PR also closes the bug.
If they forget, feel free to close :-)
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(emorley)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: