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
Support diagnostics in state conversion #14135
Conversation
Changelog[uncommitted] (2023-10-09)Features
|
// Translate the rpc diagnostics into hcl.Diagnostics. | ||
var diags hcl.Diagnostics | ||
for _, rpcDiag := range resp.Diagnostics { | ||
diags = append(diags, RPCDiagnosticToHclDiagnostic(rpcDiag)) |
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.
Just for my edification, what's the difference between RPC Diagnostics and HCL diagnostics? It looks like at different points we're sending either type over RPCs, so I guess they are distinguished for some other reason?
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.
HCL diagnostics are a type specified by the library we use to handle HCL code parsing and we use it our codegen logic a lot. We also expose codegen facilities across the gRPC layer which may need communicate the diagnostics back and forth, so we translate the HCL type to a specific gRPC type (or vice-versa) that represents the same structure.
### Features - [auto/nodejs] Add support for the path option for config operations [#14305](#14305) - [engine] Converters can return diagnostics from `ConvertState`. [#14135](#14135) ### Bug Fixes - [cli] Tightened the parser for property paths to be less prone to typos [#14257](#14257) - [engine] Fix handling of explicit providers and --target-dependents. [#14238](#14238) - [engine] Fix automatic diffs comparing against output instead of input properties. [#14256](#14256) - [sdkgen/dotnet] Fix codegen with nested modules. [#14297](#14297) - [programgen/go] Fix codegen to correctly output pulumi.Array instead of pulumi.AnyArray [#14299](#14299) - [cli/new] `pulumi new` now allows users to bypass existing project name checks. [#14081](#14081) - [sdk/nodejs] Nodejs now supports unknown resource IDs. [#14137](#14137) - [sdkgen/python] Fix `_configure` failing due to required args mismatch. [#14281](#14281) ### Miscellaneous - [cli] Pull in fixes from esc v0.5.6 [#14284](#14284) - [protobuf] Add a config as property map field to RunRequest and pass that to the SDK [#14273](#14273) - [sdk/python] updates grpcio dependency [#14259](#14259)
### Features - [auto/nodejs] Add support for the path option for config operations [#14305](#14305) - [engine] Converters can return diagnostics from `ConvertState`. [#14135](#14135) ### Bug Fixes - [cli] Tightened the parser for property paths to be less prone to typos [#14257](#14257) - [engine] Fix handling of explicit providers and --target-dependents. [#14238](#14238) - [engine] Fix automatic diffs comparing against output instead of input properties. [#14256](#14256) - [sdkgen/dotnet] Fix codegen with nested modules. [#14297](#14297) - [programgen/go] Fix codegen to correctly output pulumi.Array instead of pulumi.AnyArray [#14299](#14299) - [cli/new] `pulumi new` now allows users to bypass existing project name checks. [#14081](#14081) - [sdk/nodejs] Nodejs now supports unknown resource IDs. [#14137](#14137) - [sdkgen/python] Fix `_configure` failing due to required args mismatch. [#14281](#14281) ### Miscellaneous - [cli] Pull in fixes from esc v0.5.6 [#14284](#14284) - [protobuf] Add a config as property map field to RunRequest and pass that to the SDK [#14273](#14273) - [sdk/python] updates grpcio dependency [#14259](#14259)
Description
Part of fixing pulumi/pulumi-converter-terraform#42. Allow the converter to warn the user which resources have missing mapping data, and thus are likely to not import.
Checklist
make tidy
to update any new dependenciesmake lint
to verify my code passes the lint checkgofumpt
make changelog
and committed thechangelog/pending/<file>
documenting my change