Coder Social home page Coder Social logo

Comments (8)

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

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.

from github-checks-plugin.

jankosecki avatar jankosecki commented on June 11, 2024

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.

timja avatar timja commented on June 11, 2024

Could work around it by just adding a - 3 somewhere as an extra buffer.

from github-checks-plugin.

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

replace deprecated call TruncatedString.build() with TruncatedString.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.

jankosecki avatar jankosecki commented on June 11, 2024

replace deprecated call TruncatedString.build() with TruncatedString.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.

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

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.

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

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.

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

Or, perhaps they count bytes for the summary but characters for the text. 👀

from github-checks-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.