-
Notifications
You must be signed in to change notification settings - Fork 14
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
idea: support for condensed display of multiple plans? #12
Comments
Interesting thought! I am not entirely sure how to implement the "drill-down" in a single plan since you need to persist the plan somewhere. One option would be to add a bunch of collapsed comments to the PR which contain the full plan and add a link to these collapsed comments (example). I'll have to think a bit more about other options 👀 |
This comment was marked as resolved.
This comment was marked as resolved.
At the moment it's the calling action's responsibility to ensure the plan is available in the local filesystem before calling terraform-plan-comment? So I was naively assuming that would contInue - instead of this
then the caller would have to ensure all the plans were available in the local file system, then call uber-terraform-plan-comment with something like:
then uber-terraform-plan-comment would have all the plan files available, and then could iterate over the jobs to make the uber comment? |
@simonblake-mp Looking at the GitLab issue linked, I really like their proposal diagram, particularly this one: Like yourself, I too run Terraform in matrix strategy for multiple different directories in various configurations, and I relate to noisy PRs with a whole bunch of comments. With that said, what do you think about this view? The list in this screenshout is a product of TF-via-PR GitHub Action and integrated with GitHub's native status checks, enabling you to easily scan through multiple plan summaries in one place. It also includes support for commenting TF plan in PR comments and job summaries, as shown here. You can probably tell I'm the Action's author, which is why I'm on the look-out for use-cases/feature-requests that users are seeking and connecting them to the relevant Action. |
@rdhar sorry for the delay! That's super pretty - putting the plan/apply output directly into status check line - in a lot of circumstances that would remove the need to post plan comments to the PR at all. |
@simonblake-mp Agreed! So if the PR comment is disabled to reduce clutter in the conversation thread, a copy of the plan is attached to the workflow summary for ease of reference/audit (also accessible by clicking Details on the status check line). |
Up until few weeks ago, I didn't know how easy this would be 😄 so, definitely possible to write a condensed summary to the status check and put the details somewhere else. I'd be grateful for a PR (following some more concrete proposal) unless it is fine that this feature will still take some time 😄 |
🤖 StalebotThis issue hasn't seen updates in the last 60 days. If it has been resolved or won't be worked on, please consider closing the issue. Otherwise, it will be closed automatically in 30 days. |
This is total pie in the sky, I'm just spitballing.
I suspect many folks use a matrix to run multiple terraform plans concurrently (to different environments or cloud accounts or whatever) then feed each plan through a comment action to get a comment per matrix element in the PR. So if you've got, say, 8 environments, then you get 8 plan comments, which can add excessive scrolling to the PR.
What would be super sweet would be for a way to combine all those plans into a single uber-comment that showed a one line summary of all the changes across all the plans, making it easy for a reviewer to see if a single plan is out of whack versus all the rest, then allowing drill down to a specific plan.
Gitlab does something like this, although not in a comment (they have native TF support in a widget) - I'm struggling to find an actual picture of it in use (I no longer use gitlab), but their design ideas are visible here - https://gitlab.com/gitlab-org/gitlab/-/issues/222964
Obviously there are constraints, particularly around total comment size, and how to handle updating reruns and whatnot, so it wouldn't be trivial.
The text was updated successfully, but these errors were encountered: