When creating PR from Graphite validate_commit_message fails on first run

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      If I use gt submit to create a PR and fill in a title and description, validate_commit_message fails the first time. If I rerun it, then it succeeds. 

      Steps to Reproduce

      1. Use graphite to create a branch and changes
      2. Use gt submit to create a draft PR (should open automatically)
      3. Update the title and description of the draft PR
      4. Publish the PR

      Expected Result

      validate_commit_message succeeds

      Actual Result

      validate_commit_message fails

      Impact

      The PR very quickly has a red X for "evergreen" failing, but it is not a meaningful failure.

      Attachments/Screenshots

      I noticed that the PR title seems to be correct in the validate_commit_message but the description is missing. I wonder if graphite internally creates the PR then updates the description, but validate_commit_message gets the old data?

      Example failure:

      [2026/03/12 12:49:01.835] python buildscripts/validate_commit_message.py[2026/03/12 12:49:01.835] 2026-03-12 16:48:59 [info     ] Sending request                request={'query': '{\n            repository(owner: "10gen", name: "mongo") {\n                pullRequest(number: 49495) {\n                    viewerMergeHeadlineText(mergeType: SQUASH)\n                    viewerMergeBodyText(mergeType: SQUASH)\n                }\n            }\n         }'}[2026/03/12 12:49:01.835] 2026-03-12 16:48:59 [info     ] Squashed content               content={'data': {'repository': {'pullRequest': {'viewerMergeHeadlineText': 'SERVER-XXX: Add generic attribute code and utilities (#49495)', 'viewerMergeBodyText': 'This code and these utilities be used to support updating metrics to\nsupport attributes. Merging separately since it is a good chunk of code\nby itself, plus there is some less-obvious C++ to try to make things as\nrobust as possible.'}}}}[2026/03/12 12:49:01.835] CI base commit to diff from: 406d4008d92d3bef2b60f3ede90107a93ce584eb[2026/03/12 12:49:01.835] 2026-03-12 16:49:00 [error    ] PR summary is not valid; it must match the regular expression: re.compile('(?:Revert ")?(?:([A-Z]+)-[0-9]+|Import wiredtiger)')[2026/03/12 12:49:01.835] Current summary: SERVER-XXX: Add generic attribute code and utilities (#49495)[2026/03/12 12:49:01.835] Please update the PR title and description to match the expected format.[2026/03/12 12:49:01.835] If you are seeing this on a PR, after changing the required field, you will need to restart the failed validate_commit_message task in Evergreen before being able to submit your PR.[2026/03/12 12:49:01.835] The decision to add this check was made in SERVER-101443, please feel free to leave comments/feedback on that ticket.[2026/03/12 12:49:01.835] 2026-03-12 16:49:00 [error    ] Invalid commit, unable to merge[2026/03/12 12:49:01.835] Finished with exit code: 1 

            Assignee:
            Zack Winter
            Reporter:
            Michael Nugent
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: