ActiveData
ActiveData copied to clipboard
repo.changeset.backedoutby isn't being populated
By using adr inspect --table repo
, I see that there exists a repo.changeset.backedoutby
key. However, it doesn't exist for changesets that were backed out. For example, take this changeset:
https://hg.mozilla.org/integration/autoland/rev/91bc05242c6f02a5d30c71557693129303e7067e
{
"from":"repo",
"select":"changeset.backedoutby",
"where":{
"and":[
{
"prefix":{
"changeset.id":"91bc05242c6f02a5d30c71557693129303e7067e"
}
},
{
"eq":{
"branch.name":"autoland"
}
}
]
},
"limit":100,
"format":"table"
}
The above query returns null
. I wonder if this was previously working and then got broken along the way. For context, this value can be obtained in hgmo's json api:
https://hg.mozilla.org/integration/autoland/rev/91bc05242c6f02a5d30c71557693129303e7067e?style=json
I know what's causing this: The repo
record is picked up too soon. We should add some logic that identifies the backout changeset, and force a reload on the backedoutby changesets.
For the record, I'm now obtaining this data from hgmo
directly so it isn't blocking me or anything.
If this gets done, then we must parse the desc
and reload any revisions found
https://hg.mozilla.org/integration/autoland/rev/d6e21ffd8ecceee564afa0c7c8b1bcf61fbd6aff?style=json
Get all the changesets that perform a backout (which assumes the word "backout" is in the description)
{
"from":"repo",
"select":["changeset.id","changeset.description.words"],
"where":[
{"eq":{"changeset.description":"backed"}},
{"gte":{"push.date":{"date":"today-month"}}}
],
"limit":10000
}
You could also use https://hg.mozilla.org/integration/autoland/json-automationrelevance/d6e21ffd8ecceee564afa0c7c8b1bcf61fbd6aff, which gives you directly the nodes being backed-out (so no parsing necessary, and more precise).
Some docs
https://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/custom-apis.html