-
Notifications
You must be signed in to change notification settings - Fork 38
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
Failed Publishing GitHub checks - Only 65535 characters are allowed; 65537 were supplied. #345
Comments
Related Java code:
but I wonder if GitHub also counts the quotation marks around the string. I hope not! It would be interesting to log the actual GitHub API request and count the bytes from that. |
Is there an easy way to log the request? I could do it when I have some free time. But I never debugged any jenkins or plugin related issues so not sure what the correct troubleshooting steps are. Edit: actually, would probably make sense to replace deprecated call |
Could work around it by just adding a |
No, if it's replaced, then it must use buildByBytes, because the GitHub limit is 65535 bytes, not 65535 characters. |
According to GitHub docs, they say it's a limit of 65535 characters but could be also incorrectly written doc. |
Re logging: I think the HTTP request goes to https://github.com/hub4j/github-api/blob/github-api-1.314/src/main/java/org/kohsuke/github/internal/DefaultGitHubConnector.java, and on Java 11, that chooses https://github.com/hub4j/github-api/blob/github-api-1.314/src/main/java11/org/kohsuke/github/extras/HttpClientGitHubConnector.java, which uses |
Perhaps they changed it. In #131 (comment), the error message said "summary exceeds a maximum bytesize of 65535". You instead got "Only 65535 characters are allowed". Anyway, each character is at least one byte, so if the number of bytes is limited to 65535, then the request will fit in a 65535-character limit as well. |
Or, perhaps they count bytes for the summary but characters for the text. 👀 |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Jenkins controller runs as a pod in K8s cluster with agents being managed ad-hoc via Kubernetes plugin
Reproduction steps
./gradlew --no-daemon -PreactNativeArchitectures=x86_64 assembleDebug
Expected Results
GitHub Checks plugin manages to truncate the output and upload a check to GitHub
Actual Results
Final
Jenkins
check is not being published to GitHub due to:Anything else?
I find it interesting that supplier characters (65537) are only +2 from the max allowed (65535).
It would be quite a coincidence that output of my build exceeds the allowed characters by just 2.
I read somewhere that Check plugin is using
TruncatedString
to ensure that uploaded string does not exceed the max allowed value - I wonder if there is so sort of mistake in the truncation logic, which then results in truncated string to by bigger by 2 from the allowed value.Note: for now I've used "Suppress log output in checks" of my GitHub Organization folder to avoid the issue
The text was updated successfully, but these errors were encountered: