Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GithubPRPlanPlugin Max Comment Issue #426

Open
codezninja opened this issue Feb 3, 2022 · 1 comment
Open

GithubPRPlanPlugin Max Comment Issue #426

codezninja opened this issue Feb 3, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@codezninja
Copy link
Contributor

When the plan to post is more than the max character the pipeline will fail. The error is not very informative. When posting Jenkins only returns ERROR: Creating GitHub comment failed: HTTP/2 422

When running the body manually in verbose mode was I able to determine the actually error was

{
  "message": "Validation Failed",
  "errors": [
    {
      "resource": "IssueComment",
      "code": "unprocessable",
      "field": "data",
      "message": "Body is too long (maximum is 65536 characters)"
    }
  ],
  "documentation_url": "https://docs.github.com/enterprise/3.1/rest/reference/issues#create-an-issue-comment"
}

Proposal

  1. We break up the body txt into multiple posts.
  2. We don't hard fail if the body.txt is over a certain size and just skip the PR posting and echo out that error
@kmanning
Copy link
Collaborator

kmanning commented Feb 3, 2022

Interesting, the code seems to indicate that that should already be happening:

https://github.com/manheim/terraform-pipeline/blob/master/src/GithubPRPlanPlugin.groovy#L170-L171

@kmanning kmanning added the bug Something isn't working label Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants