microsoft / microsoft/go

Detect GraphQL mutation failure in bot infra: failure enabling auto-merge or approving PRs

Open
#246 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
431
Forks
44
Avg merge
21h 18m
Merged PRs (30d)
30

Description

I got errors (as I'd expect) enabling automerge and self-approving PRs while doing some dev work, but the sync command claimed overall success:

...
---- Enabling auto-merge with reviewer account...
...
---- Full response:
{"data":{"enablePullRequestAutoMerge":null},"errors":[{"type":"UNPROCESSABLE","path":["enablePullRequestAutoMerge"],"locations":[{"line":2,"column":4}],"message":"Pull request is not in the correct state to enable auto-merge"}]}
----
---- PR for master -> dev/auto-merge/microsoft/main: Done.

Completed successfully.

GitHub seems to be sending us a success response code (we already check if it's 2xx, but I haven't debugged further), but there are errors.

Related:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the sync command path that calls the enablePullRequestAutoMerge and pull-request approval mutations. Inspect how GraphQL responses are handled when a 2xx response contains errors, then verify that such failures prevent the command from claiming overall success.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, graphql
Domain
api, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.