Skip to content

Message:Body is too long and tfcmt could not post comment to PR #227

@guitarrapc

Description

@guitarrapc

Description of issue

When large change PR was create, tfcmt unable to POST changes to PR comment with following error.

POST https://api.github.com/repos/OWNER/REPO/issues/NNN/comments: 422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]

Summary

GitHub PR has limitation of PR comment length for 65536 characters, therefore some times tfcmt fail to post result.

Since tfcmt 3.0.0 and above compress plan result it rarely happens. But apply result still contains whole changes and often reached this limit.

Expected behaviour

post changes to PR without error.

Actual behaviour

tfcmt failed to post message. PR shows nothing and user need check GitHub Actions logs.

Other idea

Pulumi also has similar behaviour of Posting changes to GitHub PR comments with comment-on-pr: true

see; https://github.com/pulumi/actions

If message length is over 65536, then it split comment to another comment from terminated line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions