Skip to content

[BazelBot] Gracefully fail when we error out on merging #821

@boomanaiden154

Description

@boomanaiden154
Traceback (most recent call last):
  File "/var/lib/buildkite-agent/bazel-fixer-bot/./bazelbot_server_main.py", line 63, in <module>
    bot.run()
  File "/var/lib/buildkite-agent/bazel-fixer-bot/bazelbot_server.py", line 230, in run
    ] = self.build_processor.get_builds_to_process(self.last_processed_sha)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildkite-agent/bazel-fixer-bot/utils.py", line 339, in get_builds_to_process
    self.git_repo.refresh_main_branch()
  File "/var/lib/buildkite-agent/bazel-fixer-bot/utils.py", line 216, in refresh_main_branch
    self.gh_fork_repo.merge_upstream(self.main_branch)
  File "/var/lib/buildkite-agent/bazel-fixer-bot/.venv/lib/python3.12/site-packages/github/Repository.py", line 3953, in merge_upstream
    headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/merge-upstream", input=post_parameters)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildkite-agent/bazel-fixer-bot/.venv/lib/python3.12/site-packages/github/Requester.py", line 623, in requestJsonAndCheck
    return self.__check(
           ^^^^^^^^^^^^^
  File "/var/lib/buildkite-agent/bazel-fixer-bot/.venv/lib/python3.12/site-packages/github/Requester.py", line 853, in __check
    raise self.createException(status, responseHeaders, data)
github.GithubException.GithubException: Server Error: 502 {"message": "Server Error"}

Still can't quite figure out why we would be getting a 502 here. The server restarted just fine and was able to run this command just fine after restarting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions