Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action failed and exited in between without proper message #34

Open
sameerseekala1 opened this issue Aug 6, 2024 · 1 comment
Open

Comments

@sameerseekala1
Copy link

Hi, I am using this action for first on our repo with 1000 branches and i would like to delete some of them. Initially job ran fine showing the branches eligible for deletion but after few mins i saw this error message.

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/application/main.py", line 6, in
deleted_branches = actions.run_action(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/application/src/actions.py", line 10, in run_action
branches = github.get_deletable_branches(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/application/src/github.py", line 77, in get_deletable_branches
if self.has_open_pulls(commit_hash=commit_hash):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/application/src/github.py", line 138, in has_open_pulls
raise RuntimeError(f'Failed to make request to {url}. {response} {response.json()}')
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

After throwing this error it processed few more branches and then exited without giving final output, PFA screenshot for reference.

Appreciate any help here.

Screenshot 2024-08-06 140710
@luispabon
Copy link
Contributor

Has this error re-occurred? Looks like GH's API returned a non-json response, which should never happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants