pulumi/sdk/go/common
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
..
apitype [cli] Add an import command. (#4765) 2020-10-14 12:51:53 +01:00
constant expose execution kind via update metadata (#5258) 2020-08-31 09:07:59 -07:00
diag Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
encoding Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
resource gRPC bridge: fix unknowns in Update previews (#6006) 2020-12-23 13:25:48 -08:00
testing Add PULUMI_BACKEND_URL env var (#5789) 2020-11-22 15:27:59 -08:00
tokens Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
tools switch os/user with luser 2020-07-27 14:44:08 -07:00
util Do not read TGZs into memory. (#5983) 2020-12-20 12:54:11 -08:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace Do not read TGZs into memory. (#5983) 2020-12-20 12:54:11 -08:00