pulumi/pkg
Pat Gavlin c6d22a25e5
gRPC bridge: fix unknowns in `Update` previews (#6006)
These changes are a combination of three commits, each of which
contributes to the testing and/or fixing of a problem with marshaling
unknowns in `plugin.provider.Update` when `preview` is true.

## deploytest: add support for gRPC adapters. 

These changes add support for communicating with providers using the
gRPC adapters to the deploytest pacakage. This makes it easier to test
the gRPC adapters across typical lifecycle patterns.

Supporting these changes are two additions to the `resource/plugin`
package:

1. A type that bridges between the `plugin.Provider` interface and the
  `pulumirpc.ResourceProviderServer`
2. A function to create a `plugin.Provider` given a
  `pulumirpc.ResourceProviderClient`

The deploytest package uses these to wrap an in-process
`plugin.Provider` in a gRPC interface and connect to it without using
the default plugin host, respectively.

## pulumi_test: test provider preview over gRPC.

Add a test that runs the provider preview lifecycle, but using a
provider that communicates over gRPC.

## gRPC bridge: fix unknowns in `Update` previews

Set the `KeepUnknowns` and `RejectUnknowns` bits in the `MarshalOptions`
used when unmarshaling update results to preserve unknowns during a
preview and reject them otherwise.

These changes also set the `RejectUnknowns` bit in the `MarshalOptions`
used by `Create` if `preview` is false, and fix a bug in the array
unmarshaler that could cause out-of-bounds accesses.

Fixes https://github.com/pulumi/pulumi/issues/6004.
2020-12-23 13:25:48 -08:00
..
backend Do not read TGZs into memory. (#5983) 2020-12-20 12:54:11 -08:00
cmd/pulumi Fix linting. (#5967) 2020-12-16 16:00:59 -08:00
codegen Improve meta tags on documentation (#5968) 2020-12-17 10:44:57 -08:00
engine gRPC bridge: fix unknowns in `Update` previews (#6006) 2020-12-23 13:25:48 -08:00
graph Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
operations Ensure CLI doesn't panic when using pulumi watch and ComponentResources (#5675) 2020-11-04 01:14:43 +00:00
resource gRPC bridge: fix unknowns in `Update` previews (#6006) 2020-12-23 13:25:48 -08:00
secrets Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
testing/integration Ensure stderr is updated on error even if verbose is not set 2020-11-18 00:56:26 -08:00
util Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
version duplicate version to ensure linking is properly handled 2020-03-19 12:49:34 -07:00
go.mod [codegen/docs] - Improve resource doc titles (#5894) 2020-12-08 15:04:36 -08:00
go.sum Fixing up the go deps as this was breaking the publish step 2020-12-08 14:30:21 +00:00