pulumi/pkg/resource
Pat Gavlin d01465cf6d
Make archive assets stream their contents. (#542)
We currently have a nasty issue with archive assets wherein they read
their entire contents into memory each time they are accessed (e.g. for
hashing or translation). This interacts badly with scenarios that
place large amounts of data in an archive: aside from limiting the size
of an archive the engine can handle, it also bloats the engine's memory
requirements. This appears to have caused issues when running the PPC in
AWS: evidence suggests that the very high peak memory requirements this
approach implies caused high swap traffic that impacted the service's
availability.

In order to fix this issue, these changes move archives onto a
streaming read model. In order to read an archive, a user:
- Opens the archive with `Archive.Open`. This returns an ArchiveReader.
- Iterates over its contents using `ArchiveReader.Next`. Each returned
  blob must be read in full between successive calls to
  `ArchiveReader.Next`. This requirement is essentially forced upon us
  by the streaming nature of TAR archives.
- Closes the ArchiveReader with `ArchiveReader.Close`.

This model does not require that the complete contents of the archive or
any of its constituent files are in memory at any given time.

Fixes #325.
2017-11-08 15:28:41 -08:00
..
config Encrypt secrets in Pulumi.yaml 2017-10-24 16:48:12 -07:00
deploy Use full state during updates (#526) 2017-11-03 19:45:19 -07:00
idl Bring LUMIDL up to code 2017-09-11 16:58:25 -07:00
plugin Skip unknown properties (#524) 2017-11-03 13:40:15 -07:00
provider Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
stack Fix where integration tests look for checkpoints 2017-10-27 19:42:17 -07:00
testdata Fix asset bugs; write more tests 2017-10-24 09:00:11 -07:00
asset.go Make archive assets stream their contents. (#542) 2017-11-08 15:28:41 -08:00
asset_test.go Make archive assets stream their contents. (#542) 2017-11-08 15:28:41 -08:00
errors.go Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
properties.go Add more context information to assert. (#449) 2017-10-24 08:25:39 -07:00
properties_diff.go Add diffing logic for assets/archives 2017-07-17 12:11:15 -07:00
properties_diff_test.go Many asset improvements 2017-10-22 13:39:21 -07:00
properties_test.go Tolerate computed and output properties 2017-08-03 11:01:38 -07:00
resource_goal.go Add auto-parenting 2017-10-15 04:38:26 -07:00
resource_id.go Encrypt secrets in Pulumi.yaml 2017-10-24 16:48:12 -07:00
resource_id_test.go Permit -1 for randlen and maxlen 2017-07-15 09:59:44 -07:00
resource_state.go Track resources that are pending deletion in checkpoints. 2017-10-18 17:09:00 -07:00
status.go Wire up Lumi to the new runtime strategy 2017-09-04 11:35:21 -07:00
urn.go Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
urn_test.go Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00