pulumi/pkg/resource/deploy
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
..
deploytest gRPC bridge: fix unknowns in Update previews (#6006) 2020-12-23 13:25:48 -08:00
providers switch uuid packages (#5608) 2020-11-04 03:13:04 +00:00
builtins.go Fix new resource recording. (#5897) 2020-12-08 19:21:58 -08:00
deployment.go Fix a panic due to unsafe concurrent map access (#5995) 2020-12-22 12:04:49 -07:00
deployment_executor.go Ensure we have an import error before using in import path (#5884) 2020-12-08 00:43:35 +00:00
deployment_test.go Rename deploy.Plan to deploy.Deployment. (#5774) 2020-11-18 09:47:52 -08:00
import.go Fix a panic due to unsafe concurrent map access (#5995) 2020-12-22 12:04:49 -07:00
snapshot.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
source.go Revert "Narrow a few interfaces." (#4987) 2020-07-09 15:19:12 +01:00
source_error.go Revert "Narrow a few interfaces." (#4987) 2020-07-09 15:19:12 +01:00
source_eval.go Fix bug with ComponentResource resource refs (#5949) 2020-12-18 14:45:52 -07:00
source_eval_test.go Add support for provider-side preview. (#5443) 2020-10-09 13:13:55 -07:00
source_fixed.go Revert "Narrow a few interfaces." (#4987) 2020-07-09 15:19:12 +01:00
source_null.go Revert "Narrow a few interfaces." (#4987) 2020-07-09 15:19:12 +01:00
source_query.go Add engine support for getResource. (#5646) 2020-11-02 13:36:12 -08:00
source_query_test.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
step.go Add ignoreChanges preprocessing in ImportStep. (#5976) 2020-12-17 14:46:50 -08:00
step_executor.go Fix a panic due to unsafe concurrent map access (#5995) 2020-12-22 12:04:49 -07:00
step_generator.go Fix a panic due to unsafe concurrent map access (#5995) 2020-12-22 12:04:49 -07:00
step_generator_test.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
target.go Respect provider config secretness. (#5742) 2020-11-12 12:18:12 -08:00