ataylorme / eslint-annotate-action

A GitHub action that takes ESLint results from a JSON file and adds them as annotated pull request comments
MIT License
88 stars 32 forks source link

`Only 65535 characters are allowed` error #70

Closed dancrumb closed 2 months ago

dancrumb commented 9 months ago

This looks like a regression of #32

My config is:

- name: Generate Lint Report
      if: "!cancelled()"
      uses: ataylorme/eslint-annotate-action@2.2.0
      with:
        report-json: ${{ inputs.workspace-name }}-eslint_report.json
        repo-token: "${{ inputs.github_token }}"
        check-name: "${{inputs.workspace-description}} Lint Report"
        fail-on-error: false
        markdown-report-on-step-summary: true

The logs look fine until:

...
ℹ  info      Analyzing <filename>
ℹ  info      Analyzing <filename>
ℹ  info      Analyzing <filename>
ℹ  info      
0 ESLint error(s) and 0 ESLint warning(s) found in pull request changed files.
0 ESLint error(s) and 164 ESLint warning(s) found in files outside of the pull request.

✖  fatal     Invalid request.

Only 65535 characters are allowed; 68338 were supplied.
oxc commented 8 months ago

We're hitting the same issue. I assume this only happens with markdown-report-on-step-summary: true (we have a lot of warnings 😞)

ValentinGurkov commented 5 months ago

I'm experiencing the same unfortunately, does anybody know of a workaround that does not involve suppressing the warnings? Because on a large monorepo with microservices, we've got something like: Only 65535 characters are allowed; 320944 were supplied. which is waaaay above the limit

ataylorme commented 5 months ago

This seems like a character limit on the check run summary.

does anybody know of a workaround that does not involve suppressing the warnings

I don't know if there is a good answer without simplifying the summary to include the number of errors and warnings without actually listing them all out.

ValentinGurkov commented 5 months ago

This seems like a character limit on the check run summary.

does anybody know of a workaround that does not involve suppressing the warnings

I don't know if there is a good answer without simplifying the summary to include the number of errors and warnings without actually listing them all out.

I'd support the idea of a such minimal summary and we can look into other ways of obtaining a complete list

ataylorme commented 4 months ago

I am working on v3 (in progress) and will make it so when only-pr-files is true only those files are included in the summary. Please let me know if any of you are interested in helping to test that version.

edit: to test please update your action reference to uses: ataylorme/eslint-annotate-action@v3-beta

ataylorme commented 4 months ago

I also truncated the summary if it is too long

ataylorme commented 2 months ago

3.0.0 has been released. Please update any references to the v3 branch instead of v3-beta. Make sure to read the Changelog as there are breaking changes (GH_TOKEN input has changed)