Skip to content

better handle 502 errors when merging PRs #739

@chdsbd

Description

@chdsbd

When Kodiak starts merging a PR, it enters a loop, polling until the PR is ready to merge. If Kodiak makes a GitHub API request and encounters an error, it will eject from this loop, ignoring the PR and moving on to the next PR in queue.

This is problematic behavior as it can trigger extra updates to PRs. We should gracefully retry on recoverable errors.

Here's where we check for an error:

try:
res.raise_for_status()
except http.HTTPError:
log.warning("github api request error", res=res, exc_info=True)
return None

We should audit all of our API requests to ensure we gracefully handle errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions