grantmcconnaughey / Lintly

Automated GitHub PR code reviewer for Python, JavaScript, CSS, and more.
MIT License
92 stars 18 forks source link

Linty fails when the number of annotations is too high #63

Open Madeyro opened 1 year ago

Madeyro commented 1 year ago

We are seeing 86 errors from Lintly and this is causing Lintly to fail as in https://github.com/grantmcconnaughey/Lintly/issues/31

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.16/x64/bin/lintly", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/lintly/cli.py", line 74, in main
    build.execute()
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/lintly/builds.py", line 82, in execute
    self.submit_to_pr(patch)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/lintly/builds.py", line 151, in submit_to_pr
    self.submit_pr_review(patch, pr_review_action)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/lintly/builds.py", line 163, in submit_pr_review
    self.git_client.create_pull_request_review(
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/lintly/backends/github.py", line 209, in create_pull_request_review
    client.post(url, data, headers={'Accept': GITHUB_API_PR_REVIEW_HEADER})
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/lintly/backends/github.py", line 81, in post
    return self._do_request('post', url, json.dumps(data), headers)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/lintly/backends/github.py", line 113, in _do_request
    raise GitClientError(response.content, status_code=response.status_code)
lintly.backends.errors.GitClientError: b'{\n  "message": "Server Error"\n}\n'