Comments (8)
Related Java code:
- MAX_MESSAGE_SIZE_TO_CHECKS_API:
- used by GitHubChecksDetails.getOutput():
- which calls ChecksOutput.getText(int): https://github.com/jenkinsci/checks-api-plugin/blob/cb1ff615492a373c63cb4ccfd8d77d4a6f8d6e14/src/main/java/io/jenkins/plugins/checks/api/ChecksOutput.java#L72-L80
- which calls the deprecated TruncatedString.build(int): https://github.com/jenkinsci/checks-api-plugin/blob/cb1ff615492a373c63cb4ccfd8d77d4a6f8d6e14/src/main/java/io/jenkins/plugins/checks/api/TruncatedString.java#L70-L81
- causing Joiner.getLength(String) to treat the
maxLength
as the number of UTF-8 bytes: https://github.com/jenkinsci/checks-api-plugin/blob/cb1ff615492a373c63cb4ccfd8d77d4a6f8d6e14/src/main/java/io/jenkins/plugins/checks/api/TruncatedString.java#L194-L196
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.
from github-checks-plugin.
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 TruncatedString.build()
with TruncatedString.buildByChars()
from github-checks-plugin.
Could work around it by just adding a - 3
somewhere as an extra buffer.
from github-checks-plugin.
replace deprecated call
TruncatedString.build()
withTruncatedString.buildByChars()
No, if it's replaced, then it must use buildByBytes, because the GitHub limit is 65535 bytes, not 65535 characters.
Although really the choice on chars vs. bytes should be made by github-checks-plugin rather than checks-api-plugin.
from github-checks-plugin.
replace deprecated call
TruncatedString.build()
withTruncatedString.buildByChars()
No, if it's replaced, then it must use buildByBytes, because the GitHub limit is 65535 bytes, not 65535 characters. Although really the choice on chars vs. bytes should be made by github-checks-plugin rather than checks-api-plugin.
According to GitHub docs, they say it's a limit of 65535 characters but could be also incorrectly written doc.
from github-checks-plugin.
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 java.net.http.HttpClient
. https://stackoverflow.com/a/53231046 suggests logging can be configured via the jdk.httpclient.HttpClient.log
system property.
from github-checks-plugin.
they say it's a limit of 65535 characters
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.
from github-checks-plugin.
Or, perhaps they count bytes for the summary but characters for the text. 👀
from github-checks-plugin.
Related Issues (20)
- Allow a configurable credential for github checks plugin instead of using the cred from the initial clone HOT 2
- Unable to connect using GitHub SCM and github app credentials
- Dependency Dashboard
- Using environment variable for status checks name
- Re-enable integrations tests
- Updating status checks on merge of PR instead of head
- Pick up organization name in GitHub multi-branch job HOT 2
- Head of build log is not useful in failures
- Broken using SSH credentials with this plugin
- GitHub checks not published despite successful job execution
- GitHub Checks is spamming the logs HOT 3
- Chess incorrectly report success on failed stage if junit is enabled and not failing
- Configuration ignores app credential override
- Checks fail if run on system locked out of public internet. HOT 5
- Couldn't authenticate with GitHub App for Checks without owner defined (single org) HOT 6
- Add getting started documentation
- Manual builds throw an exception when they run HOT 2
- Plugin not publishing completed status checks back to the correct commit under rare cases
- "github checks plugin" does not work in jenkins 2.426.3-lts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-checks-plugin.