pulumi/pkg/resource
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
..
analyzer Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
deploy gRPC bridge: fix unknowns in Update previews (#6006) 2020-12-23 13:25:48 -08:00
edit Protect against panic in finding go executable and finding resources (#5548) 2020-10-11 07:13:54 +01:00
graph Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
provider Handle invalid UTF-8 characters before RPC calls (#4816) 2020-06-17 13:30:59 -06:00
stack Fix a few issues with resource references. (#5804) 2020-11-23 11:15:10 -08:00
testdata support jar files 2020-08-10 14:15:35 -07:00