reviewdog / action-brakeman

Run brakeman with reviewdog 🐶
MIT License
39 stars 25 forks source link

Github Checks sometimes fail if too many characters sent in request #16

Closed mehagar closed 9 months ago

mehagar commented 3 years ago

I started to see this message in some of my brakeman checks:

reviewdog: post failed for brakeman: failed to post result: PATCH api.github.com/repos/schooladmin/schooladmin/check-runs/1929969266: 422 Invalid request.

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

Here is the workflow config file I am using:

name: brakeman
on: [pull_request]
jobs:
  brakeman:
    name: runner / brakeman
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v1
      - name: brakeman
        uses: reviewdog/action-brakeman@v1
        with:
          github_token: ${{ secrets.github_token }}

Strangely, this only happens when Dependabot creates a PR. Dependabot creates a branch in the same upstream repo - normally, we create a fork of the repo and create a PR from the branch of the fork. Perhaps that has something to do with it.

mgrachev commented 3 years ago

@haya14busa Hey! Do you know anything about this?

haya14busa commented 3 years ago

idk. Do you see a similar amount of text in usual PRs from forked repos?

mehagar commented 3 years ago

What do you mean by the amount of text? I created a gist here that shows all of the output in case it helps.

mehagar commented 3 years ago

I think this is the same issue as in https://github.com/reviewdog/action-reek/issues/6.

javierjulio commented 9 months ago

@mehagar does this still occur on v2 of the action? Is the amount of reported Brakeman warnings irrelevant here and the issue is just to do with forked repos?

javierjulio commented 9 months ago

Related issue https://github.com/reviewdog/action-rubocop/issues/67 after reviewing other actions. It could be this is just for very large PRs which I think is safe to ignore. This comment https://github.com/reviewdog/action-rubocop/issues/67#issuecomment-1059184363 links to the reviewdog related code where possibly the error can be handled and an explicit error message given. I don't see an alternative other than failing with an error.

javierjulio commented 9 months ago

Worth noting we released a new action version yesterday which bumped the reviewdog version to the latest. This PR https://github.com/reviewdog/reviewdog/pull/1264 resolves that issue.