Skip to content

feat: parse multi doc zarf.yaml files#4827

Merged
AustinAbro321 merged 12 commits intomainfrom
parse-generic-api-version
Apr 17, 2026
Merged

feat: parse multi doc zarf.yaml files#4827
AustinAbro321 merged 12 commits intomainfrom
parse-generic-api-version

Conversation

@AustinAbro321
Copy link
Copy Markdown
Member

@AustinAbro321 AustinAbro321 commented Apr 15, 2026

Description

This implements parsing for multi doc Zarf packages, which will be used in built packages according to zarf-dev/proposals#48. This also implements parsing for arbitrary API versions. Right now there is only v1alpha1, but when a new API version is added, it can be easily converted to the return type

Relates to #3433

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 Apr 15, 2026

Deploy Preview for zarf-docs canceled.

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

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

codecov Bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 85.00000% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/internal/pkgcfg/pkgcfg.go 87.09% 8 Missing and 4 partials ⚠️
src/pkg/zoci/fetch.go 50.00% 2 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
src/pkg/packager/layout/package.go 65.42% <100.00%> (ø)
src/pkg/zoci/fetch.go 37.50% <50.00%> (-2.50%) ⬇️
src/internal/pkgcfg/pkgcfg.go 78.20% <87.09%> (+12.23%) ⬆️

... and 2 files with indirect coverage changes

🚀 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>
@AustinAbro321 AustinAbro321 marked this pull request as ready for review April 16, 2026 13:09
@AustinAbro321 AustinAbro321 requested review from a team as code owners April 16, 2026 13:09
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.

minor nits otherwise tracing the logic currently in the debugger

Comment thread src/internal/pkgcfg/pkgcfg.go Outdated
{version: v1alpha1.APIVersion, priority: 1, decode: decodeV1Alpha1},
}

// Parse parses a package definition
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: if someone is looking at the doccomments for Parse and ParseMultiDoc - do we have enough information here to help them understand the distinction of when to use each?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added to the parse comment

Comment thread src/internal/pkgcfg/pkgcfg.go Outdated
@github-project-automation github-project-automation Bot moved this to In progress in Zarf Apr 16, 2026
AustinAbro321 and others added 2 commits April 16, 2026 14:23
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Co-authored-by: Brandt Keller <43887158+brandtkeller@users.noreply.github.com>
Signed-off-by: Austin Abro <37223396+AustinAbro321@users.noreply.github.com>
Comment thread src/internal/pkgcfg/pkgcfg.go
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 - either purposefully or otherwise the errors for parsing yaml that isn't a zarf manifest begin to become more clear.

@AustinAbro321 AustinAbro321 added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit 44ae0e2 Apr 17, 2026
32 checks passed
@AustinAbro321 AustinAbro321 deleted the parse-generic-api-version branch April 17, 2026 19:27
@github-project-automation github-project-automation Bot moved this from In progress to Done in Zarf Apr 17, 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.

2 participants