mozilla / code-review

Automated static analysis & linting bot for Mozilla repositories
Mozilla Public License 2.0
56 stars 42 forks source link

Pushes to taskgraph-try have `None` as the commit message. #508

Open tomprince opened 4 years ago

tomprince commented 4 years ago

https://treeherder.mozilla.org/#/jobs?repo=taskgraph-try&author=reviewbot

La0 commented 4 years ago

Indeed, and it's happening in production, not in testing with the latest code.

I got this line in the events logs:

code-review/production/events 2020-02-27 04:06:15.725989 libmozevent.mercurial: Applying patch (phid='PHID-DIFF-bkzfw2z7vbfphj7brpqi' message='None\nDifferential Diff: PHID-DIFF-bkzfw2z7vbfphj7brpqi') 

The message is built using the commit message from Phabricator (here is the relevant code)

And here is the result from the Conduit API call on your patch:

{
  "data": [
    {
      "id": 234911,
      "type": "DIFF",
      "phid": "PHID-DIFF-bkzfw2z7vbfphj7brpqi",
      "fields": {
        "revisionPHID": "PHID-DREV-mgs6k6xhuweyobdqja6f",
        "authorPHID": "PHID-USER-fu2yuh6gonry46x7h3lr",
        "repositoryPHID": "PHID-REPO-liwcrizcwtpjejelpbpd",
        "refs": [
          {
            "type": "branch",
            "name": "default"
          },
          {
            "type": "base",
            "identifier": "6c517d0ed0e152f5ff797cc1824267624a911a42"
          }
        ],
        "dateCreated": 1582776366,
        "dateModified": 1582776368,
        "policy": {
          "view": "public"
        }
      },
      "attachments": {
        "commits": {
          "commits": [
            {
              "identifier": "d72d54ec3af40ac04e684c5d3f6a63a937272a60",
              "tree": null,
              "parents": [
                "6c517d0ed0e152f5ff797cc1824267624a911a42"
              ],
              "author": {
                "name": "Tom Prince",
                "email": "mozilla@hocat.ca",
                "raw": "\"Tom Prince\" <mozilla@hocat.ca>",
                "epoch": 1582776300
              },
              "message": null
            }
          ]
        }
      }
    }
  ],
  "maps": {},
  "query": {
    "queryKey": null
  },
  "cursor": {
    "limit": 100,
    "after": null,
    "before": null,
    "order": null
  }
}

As you can see, the message payload is null on your commit d72d54ec3af40ac04e684c5d3f6a63a937272a60. Which tool did you use to publish on Phabricator ?

tomprince commented 4 years ago

I use hg phabsend from mercurial's phabricator extension.

I think it would probably make more sense to use the title+summary from the associated revision, as this matches what lando will use when the commit eventually lands (https://github.com/mozilla-conduit/lando-api/blob/master/landoapi/commit_message.py ; although with the replace_reviewer logic from there).