Closed Bug 1248475 Opened 8 years ago Closed 8 years ago

Rate changes and rule ids not shown on rule history

Categories

(Release Engineering Graveyard :: Applications: Balrog (frontend), defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nthomas, Assigned: njirap, Mentored)

References

Details

(Whiteboard: [lang=js][good first bug])

Compare 
 https://aus4-admin.mozilla.org/rules/170
specifically the empty strings next to 'Rate' with

mysql> select change_id, changed_by, from_unixtime(substr(timestamp, 1, 10)) as timestamp, backgroundRate from rules_history where rule_id=170 order by change_id desc limit 10;
+-----------+---------------------+----------------------------+----------------+
| change_id | changed_by          | timestamp                  | backgroundRate |
+-----------+---------------------+----------------------------+----------------+
|      4423 | tbirdbld            | 2016-02-15 20:41:30.000000 |             50 |
|      3890 | tbirdbld            | 2016-01-07 22:21:11.000000 |             50 |
|      3889 | jlund@mozilla.com   | 2016-01-07 22:20:21.000000 |             50 |
|      3810 | jwood@mozilla.com   | 2015-12-30 16:03:00.000000 |            100 |
|      3740 | raliiev@mozilla.com | 2015-12-23 19:01:11.000000 |             30 |
|      3734 | tbirdbld            | 2015-12-23 15:18:47.000000 |             30 |
|      3733 | raliiev@mozilla.com | 2015-12-23 15:16:31.000000 |             30 |
|      3425 | jlund@mozilla.com   | 2015-12-02 18:54:06.000000 |            100 |
|      3378 | jlund@mozilla.com   | 2015-11-27 17:07:23.000000 |              0 |
|      3334 | tbirdbld            | 2015-11-25 18:58:35.000000 |             30 |
+-----------+---------------------+----------------------------+----------------+
Adding some more context here:

<nthomas> strictly a front-end problem, if you look at the last object in the json https://aus4-admin.mozilla.org/api/rules/170/revisions
<nthomas> probably just using the same template for rules and rule revisions
<~mtabara> it's rendered from here https://github.com/mozilla/balrog-ui/blob/master/app/templates/rules.html#L112
Good find, and good to know it's probably just a frontend issue. Might be good to fix this at the same time as some of the other history UI bugs (like https://bugzilla.mozilla.org/show_bug.cgi?id=1140262, https://bugzilla.mozilla.org/show_bug.cgi?id=1163160, and https://bugzilla.mozilla.org/show_bug.cgi?id=1129149).
@bhearsum: I'm busy with releaseduty and promotion right now, but if these bugs get prioritized in two weeks only, I'd love to give you a hand in fixing some of them. It'd be the perfect opportunity for me to dig even more in balrog-related infra.
Mentor: bhearsum
Whiteboard: [lang=js]
Summary: Rate changes not shown on rule history → Rate changes and rule_ids not shown on rule history
Assignee: nobody → njirap
Hi
Summary: Rate changes and rule_ids not shown on rule history → Rate changes and change_id not shown on rule history
Njira, I'm updating the summary again to talk about rate changes and rule ids, because those are the important things there. I don't think we care about change ids being shown on the history ui - they don't mean anything to humans.
Summary: Rate changes and change_id not shown on rule history → Rate changes and rule ids not shown on rule history
Ben, if we are viewing the history for a certain rule will the rule_id not be a constant ie the same for all revisions for that particular rule..?
(In reply to Njira from comment #6)
> Ben, if we are viewing the history for a certain rule will the rule_id not
> be a constant ie the same for all revisions for that particular rule..?

That's a good point. We should probably just remove the Rule ID label for the revisions view in that case?
Whiteboard: [lang=js] → [lang=js][good first bug]
This was a backend problem. The mappings for the fields were name differently i.e. they were named
'id' and 'background_rate' instead of what the ui uses i.e. 'rule_id' and 'backgroundRate'

https://github.com/mozilla/balrog/pull/113
(In reply to Ben Hearsum (:bhearsum) from comment #7)
> (In reply to Njira from comment #6)
> > Ben, if we are viewing the history for a certain rule will the rule_id not
> > be a constant ie the same for all revisions for that particular rule..?
> 
> That's a good point. We should probably just remove the Rule ID label for
> the revisions view in that case?


I did not see where we could put the ID.. I don't think it looks good at the 'Revisions of a Rule' title so I have just maintained it as is
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/5cc1691878e9d19862e96356a2605c6287d67870
bug 1248475: Rate changes and rule ids not shown on rule history (fixes #113). r=bhearsum
This made it to production today.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.