mozilla-releng/balrog

Show signoff history

Opened this issue · 6 comments

I'd like to be able to see what rules I last signed off on. For example, on Monday March 19 I remember signing off on two system add-on rules for the release channel, but I can't remember the details of the second one and I'd like to review them.

It might also be useful to see a list of all the signoffs that happened recently or in a particular date range. So, what did we sign off on and who did the signoffs, from a week ago, or 2 weeks ago?

(Imported from https://bugzilla.mozilla.org/show_bug.cgi?id=1447764)

I like this! I had the same question this morning (as I missed a message from jordan saying he was signing off, and then it was a mystery to me who had done it)

I wonder if it makes sense to integrate this into the existing history view:
image

Perhaps we can amend the signoff information into the full view being shown in the Drawer at the bottom? That would require stitching together information from rules_history, rules_scheduled_changes, and rules_scheduled_changes_signoffs, but I think that's not too difficult...

Yes, that's where I'd expect it !

AMUZY commented

Hi @bhearsum , as regards this issue, isn't there meant to be extra data coming in? one that holds information about the signoffs given to a rule with scheduled changes.
Is such implemented in the schema of the data in the db already? on that contains rules_history e.t.c I can't find such as I'm trying to tackle this issue.
rules

None returns any data about signoffs given

For retrieving the signoff history of a given rule you can use endpoints like:
https://localhost:8010/api/scheduled_changes/rules?rule_id=120&all=1

(rule_id limits it to the given rule id, all=1 ensures that even already completed scheduled changes will be returned.)

So, when I modified https://localhost:9000/rules/120 twice locally (waiting for each change to enact before doing the next one), I ended up with this response from the URL above:

{
  "count": 2,
  "scheduled_changes": [
    {
      "alias": null,
      "backgroundRate": 100,
      "buildID": null,
      "buildTarget": null,
      "change_type": "update",
      "channel": "beta*",
      "comment": "No updates for Google Play multilocale builds which query as en-US. NB single locale build requests with same localeaa",
      "complete": true,
      "data_version": 1,
      "distVersion": null,
      "distribution": null,
      "fallbackMapping": null,
      "headerArchitecture": null,
      "instructionSet": null,
      "jaws": null,
      "locale": "en-US",
      "mapping": "No-Update",
      "memory": null,
      "mig64": null,
      "osVersion": null,
      "priority": 95,
      "product": "Fennec",
      "required_signoffs": {},
      "rule_id": 120,
      "sc_data_version": 2,
      "sc_id": 5457,
      "scheduled_by": "ben@mozilla.com",
      "signoffs": {
        "ben@mozilla.com": "releng"
      },
      "telemetry_channel": null,
      "telemetry_product": null,
      "telemetry_uptake": null,
      "update_type": "minor",
      "version": null,
      "when": 1700164761667
    },
    {
      "alias": null,
      "backgroundRate": 100,
      "buildID": null,
      "buildTarget": null,
      "change_type": "update",
      "channel": "beta*",
      "comment": "No updates for Google Play multilocale builds which query as en-US. NB single locale build requests with same localeaaaaaaaa",
      "complete": true,
      "data_version": 2,
      "distVersion": null,
      "distribution": null,
      "fallbackMapping": null,
      "headerArchitecture": null,
      "instructionSet": null,
      "jaws": null,
      "locale": "en-US",
      "mapping": "No-Update",
      "memory": null,
      "mig64": null,
      "osVersion": null,
      "priority": 95,
      "product": "Fennec",
      "required_signoffs": {},
      "rule_id": 120,
      "sc_data_version": 2,
      "sc_id": 5458,
      "scheduled_by": "ben@mozilla.com",
      "signoffs": {
        "ben@mozilla.com": "releng"
      },
      "telemetry_channel": null,
      "telemetry_product": null,
      "telemetry_uptake": null,
      "update_type": "minor",
      "version": null,
      "when": 1700164845432
    }
  ]
}

...which has all of the data and metadata (including signoffs made) about the scheduled changes.

Does that help @AMUZY?

AMUZY commented

Definitely helps @bhearsum 😎😎😎no better explanation than this. I'm on it. Expect some good news soon