failed to post PR comment: Body is too long (maximum is 65536 characters)
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 175
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 134
Description
### Describe the Bug
We had a PR that affected many components. Unfortunately Atmos is failing to post PR comment.
```
WARN CI aggregate PR comment skipped
error=
│ failed to post PR comment: POST https://api.github.com/repos/foo/bar/issues/123/comments: 422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]
│ (1) forced error mark
│ | "failed to post PR comment"
│ | errors/*errors.errorString::
│ Wraps: (2) failed to post PR comment: POST https://api.github.com/repos/foo/bar/issues/123/comments: 422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]
│ └─ Wraps: (3) POST https://api.github.com/repos/foo/bar/issues/123/comments: 422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]
│ └─ Wraps: (4) failed to post PR comment
│ Error types: (1) *markers.withMark (2) *fmt.wrapErrors (3) *github.ErrorResponse (4) *errors.errorString
```
### Expected Behavior
Atmos handles the error gracefully. Maybe splitting the content into multiple comments.
### Steps to Reproduce
Create a PR that triggers huge terraform diff across many stacks/components.
### Screenshots
_No response_
### Environment
_No response_
### Additional Context
_No response_
Contributor guide
Research direction
Start at the CI aggregate PR comment path and the GitHub issue-comment POST that produces the 65,536-character error. Reproduce it with a PR containing a large Terraform diff across many stacks or components; done means Atmos handles oversized output gracefully, such as by splitting it into multiple comments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, go, terraform
- Domain
- cli, cloud, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100