pulumi/pkg
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
..
apitype Rework polling (#531) 2017-11-06 14:12:20 -08:00
compiler/errors Use Stack over Environment to describe a deployment target 2017-10-16 13:04:20 -07:00
diag Use Fprint, not Fprintf, so we don't format messages 2017-10-26 10:30:30 -07:00
encoding Use go-yaml directly 2017-10-20 14:01:37 -07:00
engine Initial work on tracing support (#521) 2017-11-08 17:08:51 -08:00
graph Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
pack Encrypt secrets in Pulumi.yaml 2017-10-24 16:48:12 -07:00
resource Rework asset identity and exposure of old assets. (#548) 2017-11-12 11:45:13 -08:00
testing Do not delete temp directories during tests. 2017-11-08 16:51:55 -08:00
tokens Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
tools Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
util Initial work on tracing support (#521) 2017-11-08 17:08:51 -08:00
workspace Suport workspace local configuration and use it by default 2017-11-02 13:05:01 -07:00