Conversation
With the declining reliability of the GitHub API, I've started to see Scala Steward run summaries become so large that they exceed GitHub Actions' 1024k limit: ``` call-reusable-workflow / scala-steward $GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 1194k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary ``` The run summary for just 37 repos is 1194k, because many of them failed with a `502 Bad Gateway` response from GitHub - and when GitHub fails like that, it returns a large HTML error page - about 55KB of HTML: ``` 2026-03-10 10:43:51,750 ERROR Steward guardian/ophan failed org.scalasteward.core.util.UnexpectedResponse: uri: https://api.github.com/installation/repositories?per_page=100 method: GET status: 502 Bad Gateway headers: cache-control: no-cache connection: close content-security-policy: default-src 'none'; style-src 'unsafe-inline'; img-src data:; content-type: text/html; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff x-frame-options: deny x-github-request-id: 9C00:23F69F:90EE0B:2713574:69AFF5E7 x-xss-protection: 0 body: <!DOCTYPE html> <!-- Hello future GitHubber! I bet you're here to remove those nasty inline styles, DRY up these templates and make 'em nice and re-usable, right? Please, don't. https://github.com/styleguide/templates/2.0 --> <html> <head> <title>Unicorn! · GitHub</title> ... ``` ## Fix This change truncates the body of the response written to logs and the summary. The truncation is only for the `UnexpectedResponse` exception, which occurs for HTTP status codes of 5xx and above, where the full response body is less likely to be useful, and not others like `DecodeFailure` (where the full response body might be diagnostically useful). ## Background Scala Steward run summaries were introduced in June 2023 with: * #3071
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3844 +/- ##
=======================================
Coverage 90.39% 90.39%
=======================================
Files 177 177
Lines 5110 5110
Branches 459 458 -1
=======================================
Hits 4619 4619
Misses 491 491 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mzuehlke
approved these changes
Mar 10, 2026
Member
mzuehlke
left a comment
There was a problem hiding this comment.
These long error messages are of no real value. Good idea to truncate them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the sadly declining reliability of the GitHub API, I've started to see Scala Steward run summaries become so large that they exceed GitHub Actions' 1024k limit:
In that example, the run summary for just 37 repos is 1194KB because many of them failed with a
502 Bad Gatewayresponse from GitHub - and when GitHub fails like that, it returns a large HTML error page - about 55KB of HTML:Fix
This change truncates the body of the response written to logs and the summary. The truncation is only for the
UnexpectedResponseexception, which occurs for HTTP status codes of 5xx and above, where the full response body is less likely to be useful, and not others likeDecodeFailure(where the full response body might be diagnostically useful).