NasAmin / trx-parser

This repository contains a Typescript GitHub action for parsing trx files and creating status check for each trx file based on its test outcome
MIT License
15 stars 16 forks source link

Error: Invalid request - only 65535 characters are allowed #68

Closed tandeday closed 3 years ago

tandeday commented 3 years ago

I am kicking the tires on this action using a project with about 1000 tests. Unfortunately it fails. Any suggestions?

Finding Trx files in: /home/runner/work/mit-yousee-odin-api/mit-yousee-odin-api/TestResults
Files count: 1
Processing 1 trx files
Transforming file /home/runner/work/mit-yousee-odin-api/mit-yousee-odin-api/TestResults/_fv-az186-920_2020-12-28_08_37_52.trx
Checking for failing tests
Creating PR check for ODINAPI SELFCARE.TESTS
Creating status check for GitSha: 97c859732655f4633222f0db3b6483c07ab21e70 on a push event
Check time is: Mon, 28 Dec 2020 08:38:34 GMT
Error: Invalid request.

Only 65535 characters are allowed; 1607778 were supplied.
NasAmin commented 3 years ago

Hi @tandeday Thanks for trying to use this action and raising this issue. I am currently on vacation but from the error I can guess that it is failing due to limits on the output field of the checks api.

Not sure what can b done about that but I'll have a look next week.

In the meantime, would you mind sharing the trx if not confidential?

NasAmin commented 3 years ago

Related: github/docs#2403 zyborg/dotnet-tests-report#6

tandeday commented 3 years ago

This is not urgent so no rush. I cannot share the TRX file publicly, but perhaps with you personally. Let's have a look together when you are back from vacation.

NasAmin commented 3 years ago

@tandeday Based on the linked issues in the comment above it is clear this is a hard limit on the GitHub checks API and there is no solution to that limit.

So here's what I propose:

Thoughts?

Once we have some consensus on one of options above or a better option you could suggest then we can talk about implementation. Please feel free to contribute if you have time otherwise I'll try to address this when I can find free time.

tandeday commented 3 years ago

Things have changed as we have had a firing round, and this is no longer in scope. I will suggest that the default behavior is the safest without generating a test report (or at least just create a summary that will fit in the block), and that the full report is only shown if explicitly enabled, and that the documentation clearly shows that there is a hard limit for the size.

Thanks

NasAmin commented 3 years ago

Created a new release https://github.com/NasAmin/trx-parser/releases/tag/v0.1.0 From v0.1.0 onwards, trx-parser will only report failed tests TODO: Update the readme to reflect the new behaviour