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

Coverage report fails after 65536 characters #10

Open
danhunsaker opened this issue Oct 6, 2020 · 11 comments
Open

Coverage report fails after 65536 characters #10

danhunsaker opened this issue Oct 6, 2020 · 11 comments

Comments

@danhunsaker
Copy link

The GitHub comment maximum length is, apparently, 65536 characters (though I suspect they might mean bytes):

RequestError [HttpError]: Validation Failed: {"resource":"IssueComment","code":"unprocessable","field":"data","message":"Body is too long (maximum is 65536 characters)"}

Having encountered a coverage report that surpasses this limit, and knowing the repo in question will only continue to have lengthier reports in the future, I'd like to find ways to shorten the report, or possibly split it across multiple comments.

I realize I could resort to an external coverage reporting tool, but I'd prefer to keep everything in one place. (Plus, with private repos, the cost of external tools gets really high really fast.)

@yoonwaiyan
Copy link

I'm having the same issue here with the same validation message.

mszlgr added a commit to mszlgr/lcov-reporter-action that referenced this issue Oct 28, 2020
@mszlgr
Copy link

mszlgr commented Nov 5, 2020

Had same problem, and because it looks like this bug is open for long already I forked and modified it to not send link to every line that was not covered. Feel free to use it:

    - name: Report coverage
      uses:  mszlgr/[email protected]

Also this action failed for me when run on below trigger (it assumes that it is pull request), that was also fixed in my fork.

on:
  push:
    branches: [ master ]

@romeovs
Copy link
Owner

romeovs commented Dec 29, 2020

@mszlgr would you consider create a PR for this change?

@ulfgebhardt
Copy link

image

While the original fails with "... 65536 characters" the version of @mszlgr fails with "no PR" which is untrue.

Please publish your code @mszlgr so we can have it properly incorporated

@MuhaddiMu
Copy link

Any updates on this?

@ulfgebhardt
Copy link

ulfgebhardt commented Sep 1, 2021

I do not report the coverage on the PR, but have a github action check & enforce it - its my chosen solution:

https://github.com/webcraftmedia/coverage-check-action

See it here in action:

image

If you want the report in the PR commented this is not a valid solution

@klausbadelt
Copy link

Seems @mszlgr just disables the detail (collapsed) table - not a solution, the per-file table is essential IMHO.
mszlgr/lcov-reporter-action@633ea70

@klausbadelt
Copy link

@ulfgebhardt your check action IMHO is better anyway - annotations rule - but unfortunately it's also missing the per-file details table. Would you consider re-adding that?

@ulfgebhardt
Copy link

ulfgebhardt commented Sep 19, 2021

@klausbadelt I did not write the coverage-check-action tool. Its a fork from https://github.com/devmasx/coverage-check-action with a feature report_name to allow multiple coverage reports in one workflow. The original tool made all coverage reports overwrite others due to duplication of names.
I do not have a particular interest in the per file report, but I could image it to be usefull and if possible without effort I would include it in my projects. Tho I can encourage you to implement it and invite you to do so on https://github.com/webcraftmedia/coverage-check-action . If you decide to do that, I will help you if needed and can provide some infrstructure work like releases for the tool.
Deal?

@andybelltree
Copy link

andybelltree commented Nov 15, 2021

I've just opened a PR which will
a) Allow you to supply filter-changed-files which will create a report for just changed files in that PR. This solves the issue for me
b) Shortens the output to be under the limit with a substring()

Example usage

   - name: Comment code coverage
        uses: andybelltree/[email protected]
        with:
          filter-changed-files: true

#31

@halleyrv
Copy link

halleyrv commented Aug 22, 2022

I put filter-changed-files: true but now this is the comment in my pull request
image
NaN%--

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

9 participants