ActiveData icon indicating copy to clipboard operation
ActiveData copied to clipboard

repo.changeset.backedoutby isn't being populated

Open ahal opened this issue 5 years ago • 6 comments

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

ahal avatar May 16 '19 00:05 ahal

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.

klahnakoski avatar May 29 '19 18:05 klahnakoski

For the record, I'm now obtaining this data from hgmo directly so it isn't blocking me or anything.

ahal avatar May 29 '19 21:05 ahal

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

klahnakoski avatar Feb 23 '20 17:02 klahnakoski

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
}

klahnakoski avatar Feb 23 '20 19:02 klahnakoski

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).

marco-c avatar Feb 24 '20 01:02 marco-c

Some docs

https://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/custom-apis.html

klahnakoski avatar Feb 24 '20 01:02 klahnakoski