Skip to content

Commit

Permalink
Merge pull request #1821 from vdice/feat/oci-inline-default
Browse files Browse the repository at this point in the history
feat(oci): inline content when applicable by default
  • Loading branch information
vdice authored Oct 2, 2023
2 parents 56e6e17 + ebf8d89 commit 0306346
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions crates/oci/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ impl Client {
auth: RegistryAuth,
reference: Reference,
) -> Result<Option<String>> {
// Opt-in to omitting layers for files that have been inlined into the manifest.
// TODO: After full integration this can be turned on by default.
let skip_inlined_files = !std::env::var_os("SPIN_OCI_SKIP_INLINED_FILES")
.unwrap_or_default()
.is_empty();

// For each component in the application, add layers for the wasm module and
// all static assets and update the locked application with the file digests.
let mut layers = Vec::new();
Expand Down Expand Up @@ -157,7 +151,7 @@ impl Client {
// As a workaround for OCI implementations that don't support very small blobs,
// don't push very small content that has been inlined into the manifest:
// https://github.com/distribution/distribution/discussions/4029
let skip_layer = skip_inlined_files && content_inline;
let skip_layer = content_inline;
if !skip_layer {
layers.push(layer);
}
Expand Down

0 comments on commit 0306346

Please sign in to comment.