reviewdog / action-reek

Run reek with reviewdog 🐶
MIT License
9 stars 6 forks source link

Large reek output causes reek check to spin forever #6

Open dnorth98 opened 4 years ago

dnorth98 commented 4 years ago

Running the reek action and it seems if reek has a large amount of output, the runner action will complete but the posted result will sit in the "pending" state forever.

I'm pretty sure it's related to this message from the runner

reviewdog: post failed for reek: failed to post result: PATCH https://api.github.com/repos/ACME/MY-REPO/check-runs/918892721: 422 Invalid request.

Only 65535 characters are allowed; 104394 were supplied. []

I think what happens is the result gets created but because the post fails, it never completes which leaves the check in a forever pending state

Here's our reek action config

  reek:
    name: runner / reek
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v1

      - name: reek
        uses: reviewdog/action-reek@v1
        with:
          reek_version: 6.0.1
          github_token: ${{ secrets.github_token }}
          filter_mode: file
mgrachev commented 4 years ago

I'm sorry for the late reply 🙏

I guess @haya14busa may help with that problem 🤔

patrik-csak commented 3 years ago

I had this same problem and fixed it by forking reviewdog and lowering maxFilteredFinding.

@haya14busa, would you consider this to be a bug in reviewdog? Should reviewdog check the size of the report before calling the GitHub API to avoid making such a large HTTP request?

haya14busa commented 3 years ago

Yes, reviewdog should ideally check the size but it's not implemented. It's not high priority for me to work on this issue, but PR is very much welcome.