Closed Bug 1371429 Opened 7 years ago Closed 7 years ago

we have so many AWFY alerts in the UI,I would like to reset them and start fresh

Categories

(Tree Management :: Perfherder, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jmaher, Unassigned)

Details

with so many alerts, it would be near impossible to realistically investigate them all or even do basic work on them.

Instead of wiping out everything, how about we delete or mark invalid/acknowledged all alerts that are older than May 1, 2017 ?

That will make the list smaller, possibly if we don't get to these soon we can repeat this for a smaller range of older alerts again.
:wlach- do you have ideas on how to do something like this?
Flags: needinfo?(wlachance)
Component: Treeherder → Perfherder
(In reply to Joel Maher ( :jmaher) from comment #1)
> :wlach- do you have ideas on how to do something like this?

We could do this with a relatively simple MySQL query, I would imagine.
(In reply to William Lachance (:wlach) (use needinfo!) from comment #2)
> (In reply to Joel Maher ( :jmaher) from comment #1)
> > :wlach- do you have ideas on how to do something like this?
> 
> We could do this with a relatively simple MySQL query, I would imagine.

By the way, should have said, if you want me to do this, I can, probably not too much trouble. Just needinfo me again when you're sure on the plan. :)
Flags: needinfo?(wlachance)
:wlach, if you could do do the query that would really help out!

I would like to just mark all alerts prior to 2017-06-01 as acknowledged and assume we can handle the rest from June ok!
Flags: needinfo?(wlachance)
Done via the heroku console:

>>> alert_summary_ids = PerformanceAlertSummary.objects.filter(last_updated__lte=datetime.date(2017,06,01), framework_id=5).values_list('id', flat=True)
>>> for alert in PerformanceAlert.objects.filter(summary_id__in=alert_summary_ids):
...   if alert.status == PerformanceAlert.UNTRIAGED:
...     alert.status = PerformanceAlert.ACKNOWLEDGED
...     alert.save()
... 
>>> for alert_summary in PerformanceAlertSummary.objects.filter(last_updated__lte=datetime.date(2017,06,01), framework_id=5):
...   if alert_summary.status == PerformanceAlertSummary.INVESTIGATING:
...     alert_summary.status = PerformanceAlertSummary.INVALID
...     alert_summary.save()
...
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(wlachance)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.