Open Gaurav2Github opened 6 months ago
Small addition: Currently the whole output is added as comment. Maybe an option to only comment the TF state relevant outputs would be nice. Basically everything between Terraform will perform the following actions:
and Plan: # to add, # to change, # to destroy.
(in case of a TF plan).
The hundreds of logs "refreshing state..." you might have from your provider are often not much of interest.
Hi there! 👋 We haven't heard from you in 30 days and would like to know if the problem has been resolved or if you still need help. If we don't hear from you before then, I'll auto-close this issue in 30 days.
The problem was not resolved and the issue is not stale.
I would opt to trim to the last 65536
characters rather than the first, so you always have the most important portion of the output.
It would also be useful to have an input parameter that when specified, suppresses the cdktf
output in the comment and instead links to the workflow's execution summary.
I submitted #212 to fix this issue, would welcome some testing/feedback :)
Description
I am receiving validation error as below when plan has more than 65536 chars. This occurs when the action tries to add new/update comment after a successful plan on the PR.
It seems that this 65536 chars is a hard limit https://github.com/orgs/community/discussions/41331 on the Github api.
To mitigate this issue, we should look at trimming the output before trying to add comment or split comments on the PR. Any other suggestion are welcome.
GitHub Action Version
v3.0.3
Configuration
terraformVersion: 1.5.7 cdktfVersion: 0.18.0 stackName: my-tf-stack mode: plan-only terraformCloudToken: ${{ secrets.TF_API_TOKEN }} githubToken: ${{ secrets.GITHUB_TOKEN }}
Gist
No response
Possible Solutions
Trim
messageWithTag
to first 65536 characters before executingoctokit.rest.issues.createComment
oroctokit.rest.issues.updateComment
Workarounds
Immediate resolution would be to set
commentOnPr
andupdateComment
parameters tofalse
temporarily.Anything Else?
No response
References
No response
Help Wanted
Community Note