Last Comment Bug 1248475 - Rate changes and rule ids not shown on rule history
: Rate changes and rule ids not shown on rule history
Status: RESOLVED FIXED
[lang=js][good first bug]
:
Product: Release Engineering
Classification: Other
Component: Balrog: Frontend (show other bugs)
: unspecified
: Unspecified Unspecified
-- normal (vote)
: ---
Assigned To: Njira
: Ben Hearsum (:bhearsum)
:
Mentors: Ben Hearsum (:bhearsum)
Depends on: 1302450
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-15 13:09 PST by Nick Thomas [:nthomas]
Modified: 2016-09-14 13:09 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description User image Nick Thomas [:nthomas] 2016-02-15 13:09:06 PST
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 |
+-----------+---------------------+----------------------------+----------------+
Comment 1 User image Mihai Tabara [:mtabara]⌚️GMT 2016-02-16 05:56:24 PST
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
Comment 2 User image Ben Hearsum (:bhearsum) 2016-02-16 10:54:36 PST
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).
Comment 3 User image Mihai Tabara [:mtabara]⌚️GMT 2016-02-16 12:34:37 PST
@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.
Comment 4 User image Njira 2016-06-23 03:13:02 PDT
Hi
Comment 5 User image Ben Hearsum (:bhearsum) 2016-06-23 12:54:02 PDT
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.
Comment 6 User image Njira 2016-06-23 22:58:18 PDT
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..?
Comment 7 User image Ben Hearsum (:bhearsum) 2016-06-28 07:39:10 PDT
(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?
Comment 8 User image Njira 2016-08-26 22:38:13 PDT
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
Comment 9 User image Njira 2016-08-26 22:40:06 PDT
(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
Comment 10 User image [github robot] 2016-09-07 05:51:12 PDT
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
Comment 11 User image Ben Hearsum (:bhearsum) 2016-09-14 13:09:22 PDT
This made it to production today.

Note You need to log in before you can comment on or make changes to this bug.