pulumi/pkg
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
..
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 Merge pull request #448 from pulumi/TwoPhaseSnapshot 2017-10-23 10:27:30 -07: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 Make archive assets stream their contents. (#542) 2017-11-08 15:28:41 -08:00
testing Remove integration test working folder if tests pass 2017-11-06 11:50:21 -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 Aggregate process termination errors 2017-10-30 23:35:11 -07:00
workspace Suport workspace local configuration and use it by default 2017-11-02 13:05:01 -07:00