Skip to content

hcl2template: only warn once for missing plugins #12506

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 1 commit into from
Jul 17, 2023

Conversation

lbajolet-hashicorp
Copy link
Contributor

In HCL2, if a template contains a `required_plugins' block, but the required plugins are not installed, we print a warning.

Prior to this commit, this was reported as an error once per missing plugin, which was redundant.
This commit changes that by gathering all the missing plugins once, and printing them as a bullet list, so the message isn't redundant anymore.

@lbajolet-hashicorp lbajolet-hashicorp requested a review from a team as a code owner July 17, 2023 18:50
In HCL2, if a template contains a `required_plugins' block, but the
required plugins are not installed, we print a warning.

Prior to this commit, this was reported as an error once per missing
plugin, which was redundant.
This commit changes that by gathering all the missing plugins once, and
printing them as a bullet list, so the message isn't redundant anymore.
@lbajolet-hashicorp lbajolet-hashicorp force-pushed the hcl2_warn_once_on_uninstalled_plugins branch from 30b0868 to f4eda95 Compare July 17, 2023 18:58
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

Looks great. Nicely done.

@lbajolet-hashicorp lbajolet-hashicorp merged commit 456bc23 into main Jul 17, 2023
@lbajolet-hashicorp lbajolet-hashicorp deleted the hcl2_warn_once_on_uninstalled_plugins branch July 17, 2023 20:54
@nywilken nywilken added the backport/1.9.x Backport PR changes to `release/1.9.x` label Jul 18, 2023
@github-actions
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 Aug 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.9.x Backport PR changes to `release/1.9.x`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants