Skip to content

Commit

Permalink
Rework how we use storage for storing images
Browse files Browse the repository at this point in the history
This patch overhauls how we use containers/storage to store images,
dropping most of our own metadata in favor of facilities that are
now provided by default by the storage library.  Additionally:
* storageImageDestination now caches blobs in a temporary directory
  until Commit() is called
* storageImageDestination generates a barebones manifest if one isn't
  supplied before Commit() is called
* storageImageDestination uses new APIs in containers/storage to
  look for a local layer with the same contents of a blob, making it
  better at noticing when a PutBlob() isn't necessary
* storageImageDestination sets the creation date for the image if it
  can be determined during Commit()
* storageImageDestination defaults to using the hex part of the digest
  of the image's configuration blob as an image's ID, making it better
  at catching re-pulls of the same image
* storageImageDestination no longer discards names which have been set
  for an image when reusing an ID
* storageImage now counts sizes of uncompressed data when determining
  image size
* storageImage now counts the size of the configuration blob when
  computing an image's size
* storageImage returns an updated image with the manifest listing
  uncompressed layer blobs
* storageImageSource also returns such an updated manifest
* storageImageSource now always returns uncompressed layers

Test changes:
* storage tests now always write an image manifest
* the test for determining an image's size now actually writes the
  configuration blob that it later tries to read

Signed-off-by: Nalin Dahyabhai <[email protected]>
  • Loading branch information
nalind committed Jul 31, 2017
1 parent e6ced5e commit 032b94b
Show file tree
Hide file tree
Showing 2 changed files with 816 additions and 412 deletions.
Loading

0 comments on commit 032b94b

Please sign in to comment.