-
Notifications
You must be signed in to change notification settings - Fork 696
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
fix: tf plan truncated on PR comments and plan_validate_all error logs in github actions #1129
fix: tf plan truncated on PR comments and plan_validate_all error logs in github actions #1129
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
92ff0a4
to
fb13d7a
Compare
38779ca
to
60b9950
Compare
@@ -139,7 +139,7 @@ convert_path() { | |||
## Terraform apply for single environment. | |||
tf_apply() { | |||
local path=$1 | |||
local tf_env="${path#$base_dir/}" | |||
local tf_env="${path#"$base_dir"/}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are good - usually the pr lint flags these - I have had to wrap all vars before in other repos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Seems the linter has been Expected — Waiting for status to be reported
for a number of weeks (possibly waiting for an approval to run). I validated locally using shellcheck. If this is likely to get flagged by the linter I can change it back as it is not functional change that is part of the PR.
For reference here is the issue flagged by shellcheck: https://www.shellcheck.net/wiki/SC2295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/gcbrun to get the linter going
60b9950
to
1163fee
Compare
/gcbrun (unsure if it "works" in a nested comment) |
Might be a flake:
|
/gcbrun |
a6ffcbb
to
b236605
Compare
Looks like this time both cloud build checks failed. Possibly another flake? I also had to pull in the latest changes. Can you help me with the error so I can address any changes needed in the PR? |
/gcbrun |
Checks have passed. Can a get a review and merge if this is ready to go? |
Pulled in the latest from master, can I get a review as well? |
525b3ce
to
b7db511
Compare
/gcbrun |
@nbugden I will try a deploy on github for the review |
FYI @daniel-cit I just fixed the named branches in the pipeline triggers. Still had |
@daniel-cit any questions about the PR? Did you get a chance to test it? |
@nbugden tested |
/gcbrun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/gcbrun |
4 similar comments
/gcbrun |
/gcbrun |
/gcbrun |
/gcbrun |
@daniel-cit one of the integration test pipelines failed |
/gcbrun |
1 similar comment
/gcbrun |
/gcbrun |
/gcbrun |
/gcbrun |
@apeabody the build is green :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already approved and no change to module code
Context:
The terraform plan generated in GitHub Actions is often truncated when the comment is posted to a PR. This is because the comment is posting the stdout for all environments not just the plan generated by terraform. This PR logs the terraform plan as a separate text file for each environment and then uses those files to create 1 comment per environment on the PR from GitHub Actions.
This also removes the need for #1113 as stdout from the
plan_validate_all
stage is no longer written to a file.Issue(s) Resolved:
#1109
#1130