Skip to content

feat(next)!: align ZarfPackageLayout with upstream PackageLayout - #1472

Merged
eoghanriley merged 2 commits into
mainfrom
eoghanriley/cli-307
Aug 24, 2026
Merged

eoghanriley merged 2 commits into
mainfrom
eoghanriley/cli-307

Conversation

@eoghanriley

Copy link
Copy Markdown
Contributor

Description

This PR aligns our public ZarfPackageLayout withe the zarf type by renaming some fields and moving IsPartial out to a new type ZarfPackageLayoutLoadResult

Related Issue

Fixes CLI-207

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@eoghanriley
eoghanriley requested a review from a team as a code owner August 24, 2026 19:31
@eoghanriley eoghanriley changed the title chore: Align ZarfPackageLayout with upstream PackageLayout feat(next)!: Align ZarfPackageLayout with upstream PackageLayout Aug 24, 2026
@eoghanriley eoghanriley changed the title feat(next)!: Align ZarfPackageLayout with upstream PackageLayout feat(next)!: align ZarfPackageLayout with upstream PackageLayout Aug 24, 2026
@greptile-apps

greptile-apps Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR aligns the public package-layout API with Zarf’s layout model and moves partial-layout metadata into dedicated load-result and deployment-option types.

  • External package loaders now stage complete packages in the adapter-owned destination directory.
  • The adapter reloads staged package data before applying supported public mutations, preserving private deployment fields.
  • Partial-layout state is propagated independently through loader results and deploy hooks.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
pkg/bundle/zarf.go The adapter now assigns the supplied staging directory internally, reloads the complete Zarf layout, and reapplies public mutations without discarding private deployment data.
pkg/bundle/deploy.go Public loader and hook contracts now carry partial-layout metadata separately from ZarfPackageLayout.
internal/zarf/layout.go Internal layout loaders now return a structured result containing the loaded layout and partial-state metadata.
internal/zarf/deploy.go Package deployment consumes the structured load result and propagates its layout and partial state.
pkg/bundle/zarf_test.go Tests cover staged private-data preservation, partial metadata, staging ownership, and rejection of unstaged loader results.

Sequence Diagram

sequenceDiagram
    participant Loader as Public layout loader
    participant Stage as Adapter-owned staging directory
    participant Adapter as Package layout adapter
    participant Zarf as Zarf deployment
    Loader->>Stage: Stage complete package
    Loader-->>Adapter: Layout mutations and IsPartial
    Adapter->>Stage: LoadFromDir
    Stage-->>Adapter: Complete private deployment state
    Adapter->>Adapter: Apply supported public mutations
    Adapter->>Zarf: Deploy reconstructed layout
Loading

Reviews (2): Last reviewed commit: "fix: enforce ZarfPackageLayout dirPath b..." | Re-trigger Greptile

Comment thread pkg/bundle/zarf.go Resolved

@chance-coleman chance-coleman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@eoghanriley
eoghanriley merged commit 5ac8a6c into main Aug 24, 2026
25 checks passed
@eoghanriley
eoghanriley deleted the eoghanriley/cli-307 branch August 24, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants