pulumi/pkg/resource/plugin
Pat Gavlin 28579eba94
Rework asset identity and exposure of old assets. (#548)
Note: for the purposes of this discussion, archives will be treated as
assets, as their differences are not particularly meaningful.

Currently, the identity of an asset is derived from the hash and the
location of its contents (i.e. two assets are equal iff their contents
have the same hash and the same path/URI/inline value). This means that
changing the source of an asset will cause the engine to detect a
difference in the asset even if the source's contents are identical. At
best, this leads to inefficiencies such as unnecessary updates. This
commit changes asset identity so that it is derived solely from an
asset's hash. The source of an asset's contents is no longer part of
the asset's identity, and need only be provided if the contents
themselves may need to be available (e.g. if a hash does not yet exist
for the asset or if the asset's contents might be needed for an update).

This commit also changes the way old assets are exposed to providers.
Currently, an old asset is exposed as both its hash and its contents.
This allows providers to take a dependency on the contents of an old
asset being available, even though this is not an invariant of the
system. These changes remove the contents of old assets from their
serialized form when they are passed to providers, eliminating the
ability of a provider to take such a dependency. In combination with the
changes to asset identity, this allows a provider to detect changes to
an asset simply by comparing its old and new hashes.

This is half of the fix for [pulumi/pulumi-cloud#158]. The other half
involves changes in [pulumi/pulumi-terraform].
2017-11-12 11:45:13 -08:00
..
analyzer.go Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
analyzer_plugin.go Improve output formatting 2017-09-23 05:20:11 -07:00
check.go Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
context.go Initial work on tracing support (#521) 2017-11-08 17:08:51 -08:00
host.go Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
host_server.go Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
langruntime.go Add accessors to fetch the Pulumi project and stack names 2017-10-19 08:26:57 -07:00
langruntime_plugin.go Add accessors to fetch the Pulumi project and stack names 2017-10-19 08:26:57 -07:00
plugin.go Initial work on tracing support (#521) 2017-11-08 17:08:51 -08:00
provider.go Add a notion of stable properties 2017-10-04 08:22:21 -04:00
provider_plugin.go Rework asset identity and exposure of old assets. (#548) 2017-11-12 11:45:13 -08:00
rpc.go Rework asset identity and exposure of old assets. (#548) 2017-11-12 11:45:13 -08:00
rpc_test.go Skip unknown properties (#524) 2017-11-03 13:40:15 -07:00