Skip to content

TFC: Implement run panel for viewing plan #1590

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

Merged
merged 4 commits into from
Nov 20, 2023
Merged

TFC: Implement run panel for viewing plan #1590

merged 4 commits into from
Nov 20, 2023

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Oct 12, 2023

Closes #1506

The issue covers both plan and apply, so it's not fully being fixed by this PR yet but we track apply in a follow-up issue #1637


I went as far in the implementation as I felt was reasonable in terms of effort/LOC and value added. Some trade-offs/TODOs are listed below, which I'm happy to file if we agree on those.

The exclusion of testing in particular is a little unfortunate because there's no simple way of telling the user this is a missing feature. They just won't see any tree items and instead see the same welcome view. It's not great but I'm really struggling to come up with a good way around it and I'd greatly appreciate input on this. Also there's so many different test messages with different contexts that it feels like adding support would be quite involved.

Similarly, nesting is a bit more complex than I originally thought, because once we nest under e.g. module, or even just resource type, then we suddenly face situation where we have to either "invent" new icons for the mix of actions (create/update/delete/...) or risk reducing the usefulness of the panel if we don't put any icons there.


UX

Summary: This adds a panel to render the plan log which was previously rendered as raw JSON.

JSON (prior to this PR)

2023-11-14 16 54 55

Planned changes

Screenshot 2023-11-14 at 19 19 56

Screenshot 2023-11-14 at 17 08 05

Outputs

Screenshot 2023-11-14 at 19 18 04

Diagnostics

2023-11-14 17 05 05

Drifts

Screenshot 2023-11-14 at 17 13 19

Fallback for CLI (non-structured) output

2023-11-14 17 02 22

TODO

@radeksimko radeksimko added enhancement New feature or request terraform-cloud Features or bugs related to TFC integration in the editor labels Oct 12, 2023
@radeksimko radeksimko force-pushed the f-tfc-run-panel branch 5 times, most recently from 2de7fc6 to 9d51fc0 Compare October 12, 2023 15:11
@radeksimko radeksimko marked this pull request as ready for review October 12, 2023 15:42
@radeksimko radeksimko requested a review from a team as a code owner October 12, 2023 15:42
@jpogran jpogran linked an issue Oct 12, 2023 that may be closed by this pull request
1 task
@radeksimko radeksimko force-pushed the f-tfc-run-panel branch 2 times, most recently from 0e55ed9 to 6c7dadc Compare October 24, 2023 09:21
Base automatically changed from f-tfc to main November 6, 2023 15:10
@radeksimko radeksimko force-pushed the f-tfc-run-panel branch 11 times, most recently from 08a6864 to ac777a1 Compare November 13, 2023 10:26
@radeksimko radeksimko marked this pull request as draft November 13, 2023 15:59
@radeksimko radeksimko force-pushed the f-tfc-run-panel branch 5 times, most recently from 07a2105 to bec481d Compare November 14, 2023 13:48
@radeksimko radeksimko requested a review from a team November 14, 2023 19:20
@radeksimko radeksimko marked this pull request as ready for review November 14, 2023 19:30
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

I added a couple of questions and minor refactoring suggestions.

@radeksimko radeksimko requested a review from a team November 16, 2023 17:34
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking the time to implement my suggestions.

LGTM 👍

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request terraform-cloud Features or bugs related to TFC integration in the editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve display of plan/apply logs in the TFC view
3 participants