Skip to content

fix!: only pull required layers during OCI deploy#4699

Merged
AustinAbro321 merged 22 commits intomainfrom
fix-assemble-layers
Apr 9, 2026
Merged

fix!: only pull required layers during OCI deploy#4699
AustinAbro321 merged 22 commits intomainfrom
fix-assemble-layers

Conversation

@AustinAbro321
Copy link
Copy Markdown
Member

@AustinAbro321 AustinAbro321 commented Mar 9, 2026

Description

I noticed this issue while working on #4580. There are two issues here.

The first is that in cmd/package we weren't filtering components on load during deploy. We shouldn't filter early for interactive deploys, however we should filter early when we are confirming.

The second issue is that is that assemble layers was pulling every layer when AllLayers was given even when requested components were only a subset of the components. Also the previous API didn't have a nice way to ask for multiple layer types. For instance for skeleton packages, and the soon to be introduced "connected" packages, we won't want to pull images, so we had a isSkeleton check that pulled everything except images. Now we can request all the layers besides images.

Related Issue

Fixes #4698

Checklist before merging

Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 9, 2026

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 6582047
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/69d41c82aae55700087eb8b4

Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 37 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cmd/package.go 13.63% 19 Missing ⚠️
src/cmd/initialize.go 0.00% 8 Missing ⚠️
src/pkg/packager/pull.go 22.22% 6 Missing and 1 partial ⚠️
src/pkg/zoci/pull.go 90.00% 2 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
src/pkg/packager/create.go 55.91% <100.00%> (ø)
src/pkg/packager/load.go 65.77% <100.00%> (-0.68%) ⬇️
src/pkg/zoci/common.go 54.16% <100.00%> (+4.16%) ⬆️
src/pkg/zoci/pull.go 54.34% <90.00%> (-6.48%) ⬇️
src/pkg/packager/pull.go 48.24% <22.22%> (+0.07%) ⬆️
src/cmd/initialize.go 26.22% <0.00%> (-0.66%) ⬇️
src/cmd/package.go 37.92% <13.63%> (-0.17%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
@AustinAbro321 AustinAbro321 marked this pull request as ready for review March 10, 2026 20:21
@AustinAbro321 AustinAbro321 requested review from a team as code owners March 10, 2026 20:21
Copy link
Copy Markdown
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally have no issues with the approach and appreciate the update.

Noticed a minor gap outside of the scope of these changes that we could include and otherwise just need to resolve CI.

Comment thread src/pkg/packager/pull.go Outdated
Comment thread src/pkg/zoci/pull.go
@github-project-automation github-project-automation bot moved this to In progress in Zarf Apr 2, 2026
AustinAbro321 and others added 2 commits April 6, 2026 16:44
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Copy link
Copy Markdown
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AustinAbro321 AustinAbro321 added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit 05a3a36 Apr 9, 2026
32 checks passed
@AustinAbro321 AustinAbro321 deleted the fix-assemble-layers branch April 9, 2026 17:32
@github-project-automation github-project-automation bot moved this from In progress to Done in Zarf Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

zarf package deploy oci://<oci-source> pull optional components, even when not required

2 participants