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

plugin: Handle eval errors on the plugin side #1700

Merged
merged 1 commit into from
Feb 25, 2023

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Feb 25, 2023

See also terraform-linters/tflint-plugin-sdk#235

For historical reasons, errors from evaluating unknown or NULL values were handled on the server side rather than on the client side.
https://github.com/terraform-linters/tflint/blob/v0.45.0/plugin/server.go#L143-L167

But given that EvaluateExpr is an endpoint that returns a cty.Value, it's preferable to handle this error on the plugin side.

This PR changes to skip server-side error handling when the plugin's SDK is v0.16+. This is an internal change and has no end-user impact.

@wata727 wata727 force-pushed the handle_errors_in_plugin branch from 980c2e1 to e512680 Compare February 25, 2023 14:11
@wata727 wata727 force-pushed the handle_errors_in_plugin branch from e512680 to 6ebdcdd Compare February 25, 2023 14:20
@wata727 wata727 merged commit 79c6e09 into master Feb 25, 2023
@wata727 wata727 deleted the handle_errors_in_plugin branch February 25, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant