Coder Social home page Coder Social logo

Comments (10)

timja avatar timja commented on June 11, 2024

cc @mrginglymus

from github-checks-plugin.

j-martin avatar j-martin commented on June 11, 2024

I think that's what https://github.com/jenkinsci/github-checks-plugin/pull/101/files is supposed to do. It might just be that the max size be lowered to allow the rest of the payload to be sent.

https://github.com/jenkinsci/github-checks-plugin/pull/101/files#diff-fd0d45e50475b17adec8ca170773d293c9de8536261d66d1f1484598723a862cR37

I am guessing saying it is specific to 1.10 might be wrong.

This is the error we are seeing in our logs so I guess it is still coming from GitHub:

[GitHub Checks] Failed Publishing GitHub checks: org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/alloytech/alloy/check-runs/1961940126 {"message":"Validation Failed","errors":[{"resource":"CheckRun","code":"custom","field":"summary","message":"summary exceeds a maximum bytesize of 65535"}],"documentation_url":"https://docs.github.com/rest/reference/checks#update-a-check-run"}

from github-checks-plugin.

mrginglymus avatar mrginglymus commented on June 11, 2024

What plugin is sending these checks, or is it a manual invocation of the publishChecks step?

from github-checks-plugin.

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

The GitHub error response says "a maximum bytesize of 65535" but TruncatedString counts characters rather than bytes.

from github-checks-plugin.

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

https://github.community/t/undocumented-65535-character-limit-on-requests/117564 likewise says the limit is 65535 bytes, and applies to each property separately.

I hope that encoding a newline as \n in a JSON string won't consume two of those bytes.

from github-checks-plugin.

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

From jenkinsci/junit-plugin#192 (comment), GitLab and Bitbucket Server have limits given in characters rather than bytes. It might be best to make the Checks API plugin provide an array of strings and make the GitHub Checks plugin measure how many bytes each string will cost.

from github-checks-plugin.

mrginglymus avatar mrginglymus commented on June 11, 2024

I can see two things to do - we can update TruncatedString to truncate on byte-length rather than char-length. If that's the root of this problem, then we'll solve it without having to update anything else.

The other thing is to make the TruncatedString able to truncate on char or bytes at the callers discretion; as there's only one at the moment it's less urgent to implement that.

from github-checks-plugin.

timja avatar timja commented on June 11, 2024

The other thing is to make the TruncatedString able to truncate on char or bytes at the callers discretion; as there's only one at the moment it's less urgent to implement that.

not published yet but this was just hosted:
https://github.com/jenkinsci/gitea-checks-plugin

from github-checks-plugin.

mrginglymus avatar mrginglymus commented on June 11, 2024

I'm doing it now, and it's easy enough to do both. PR incoming...

from github-checks-plugin.

mrginglymus avatar mrginglymus commented on June 11, 2024

jenkinsci/checks-api-plugin#88

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.