thoth-station / support

ℹ Any Thoth related support questions
https://thoth-station.ninja/
0 stars 4 forks source link

Kebechet thoth-advise manager: GithubAPIException on kebechet_runners.py:212 #254

Closed shreekarSS closed 2 years ago

shreekarSS commented 2 years ago

Description

This is an automated issue generated by Kebechet v1.10.1. The thoth-advise manager threw an exception (GithubAPIException) at runtime while working on the following repository https://github.com/shreekarSS/ps-nlp

Traceback

Traceback (most recent call last):
  File "/home/sshreeka/.local/share/virtualenvs/kebechet-br4_vW2r/lib/python3.8/site-packages/ogr/abstract.py", line 107, in wrapper
    return function(*args, **kwargs)
  File "/home/sshreeka/.local/share/virtualenvs/kebechet-br4_vW2r/lib/python3.8/site-packages/ogr/services/github/project.py", line 423, in get_files
    contents = self.github_repo.get_contents(path="", ref=ref)
  File "/home/sshreeka/.local/share/virtualenvs/kebechet-br4_vW2r/lib/python3.8/site-packages/github/Repository.py", line 1789, in get_contents
    headers, data = self._requester.requestJsonAndCheck(
  File "/home/sshreeka/.local/share/virtualenvs/kebechet-br4_vW2r/lib/python3.8/site-packages/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/home/sshreeka/.local/share/virtualenvs/kebechet-br4_vW2r/lib/python3.8/site-packages/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 404 {"message": "No commit found for the ref kebechet-thoth-adviser-2207151", "documentation_url": "https://docs.github.com/v3/repos/contents/"}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/sshreeka/wip/issue_151/kebechet/kebechet/kebechet_runners.py", line 212, in run
    instance.run(**manager_configuration)
  File "/home/sshreeka/wip/issue_151/kebechet/kebechet/managers/thoth_advise/thoth_advise.py", line 396, in run
    opened_merge = self._open_merge_request(
  File "/home/sshreeka/wip/issue_151/kebechet/kebechet/managers/thoth_advise/thoth_advise.py", line 168, in _open_merge_request
    file_paths.append(self.project.get_files(ref=branch_name, filter_regex=file))
  File "/home/sshreeka/.local/share/virtualenvs/kebechet-br4_vW2r/lib/python3.8/site-packages/ogr/abstract.py", line 119, in wrapper
    __check_for_internal_failure(__wrap_exception(ex))
  File "/home/sshreeka/.local/share/virtualenvs/kebechet-br4_vW2r/lib/python3.8/site-packages/ogr/abstract.py", line 59, in __check_for_internal_failure
    raise ex
ogr.exceptions.GithubAPIException
goern commented 2 years ago

/kind bug /priority critical-urgent /assign @KPostOffice /sig devsecops /triage accepted

harshad16 commented 2 years ago

/sig user-experience /remove-sig devsecops /assign @shreekarSS

KPostOffice commented 2 years ago

I am closing these as they were created from local testing from @shreekarSS , this makes it difficult to tell whether they are due to an existing bug or due to bugs introduced during local development. I've opened a PR to have this behavior configurable and off by default.