pulumi/sdk/go/common/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
..
config Add the ability to copy configs between stacks (#4971) 2020-07-17 11:14:10 +01:00
plugin gRPC bridge: fix unknowns in `Update` previews (#6006) 2020-12-23 13:25:48 -08:00
asset.go support jar files 2020-08-10 14:15:35 -07:00
asset_test.go add initial pull-request workflow (#5276) 2020-09-09 13:37:03 -07:00
custom_timeouts.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
errors.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
properties.go Fix a few issues with resource references. (#5804) 2020-11-23 11:15:10 -08:00
properties_diff.go Add support for serialized resource references. (#5041) 2020-10-27 10:12:12 -07:00
properties_diff_test.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
properties_path.go Properly resize arrays when adding (#5872) 2020-12-06 21:23:50 +00:00
properties_path_test.go Properly resize arrays when adding (#5872) 2020-12-06 21:23:50 +00:00
properties_test.go fix unknown status for secrets wrapping unknowns (#4377) 2020-04-13 22:47:08 +01:00
resource_goal.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
resource_id.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
resource_id_test.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
resource_operation.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
resource_state.go Avoid replace on second update with import applied (#4403) 2020-04-15 18:52:40 -07:00
stack.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
status.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
urn.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
urn_test.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00