Skip to content

feat: add Zarf package disassembly/reassembly flows - #1520

Merged
joelmccoy merged 53 commits into
mainfrom
feat/add-disassemble-capability
Oct 29, 2026
Merged

joelmccoy merged 53 commits into
mainfrom
feat/add-disassemble-capability

Conversation

@Racer159

Copy link
Copy Markdown
Contributor

Description

This PR adds a Zarf package disassembly command to uds-cli - the goal is to take a built Zarf package and disassemble it into re-creatable source code that can be modified entirely offline. This is possible today manually with zarf tools archiver commands but this makes the process a bit more streamlined and intentional.

Related Issue

Fixes #N/A

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

Comment thread internal/mode/disassemble/beta.go Resolved
@Racer159
Racer159 marked this pull request as ready for review September 1, 2026 19:51
@Racer159
Racer159 requested a review from a team as a code owner September 1, 2026 19:51
@Racer159

Racer159 commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

since I know is'a comin' - @greptileai review

@greptile-apps

greptile-apps Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge because no blocking failure remains within the scope of this follow-up review.

Summary

This PR adds feature-gated workflows for converting complete Zarf packages into editable offline source trees and rebuilding them afterward.

  • Adds package mod disassemble and package mod reassemble commands behind the PackageMod feature.
  • Implements package asset recovery, source rewriting, metadata validation, and reassembly.
  • Propagates normalized feature settings into the Next command tree while preserving the Zarf argument boundary.
  • Adds unit, integration, cluster lifecycle, and documentation coverage.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Complete Zarf package] --> B[package mod disassemble]
  B --> C[Editable source tree]
  C --> D[Modify and review source]
  D --> E[package mod reassemble]
  E --> F[Recreated Zarf package]
Loading

Reviews (3) Β· Last reviewed commit: "Merge branch 'main' into feat/add-disass..." Β· Reviewed by Greptile

@Racer159
Racer159 marked this pull request as draft September 1, 2026 20:30
@Racer159

Racer159 commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Want to improve UX a little so moved back to draft - specifically thinking about how a chart edit might be needed... the zarf yaml I think can also use Zarf's helpers to be formatted a little cleaner and I want to explore that too.

@Racer159

Racer159 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review again on the final shape

@bradclawsie bradclawsie 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.

Great work. I've reviewed and did a guided reading of data flow. I round-tripped a zarf-init package from disassembly to reassembly (and then deployed the rebuilt package into a fresh cluster).

I had one edge case in another comment, but I am totally fine with applying that patch on my own if you have other things you want to move on to.

Otherwise, this is ready to merge. Let me know how you would like to proceed, and thanks again for this work.

Comment thread internal/zarf/modify/kubernetes.go Resolved
slaskawi
slaskawi previously approved these changes Oct 14, 2026

@slaskawi slaskawi 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! Let's get this in!

Comment thread internal/zarf/modify/files.go Resolved
chance-coleman
chance-coleman previously approved these changes Oct 15, 2026

@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

@joelmccoy joelmccoy left a comment

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.

Really late getting to this.. Took a very first pass and will do a deeper one soon, but wanted to callout the decision to feature flag. I disagree with this and would like to discuss. Left a comment on this and would love input from @slaskawi @chance-coleman @eoghanriley

Comment thread internal/cli/cmd.go Resolved
@joelmccoy
joelmccoy merged commit 60c5cfb into main Oct 29, 2026
53 checks passed
@joelmccoy
joelmccoy deleted the feat/add-disassemble-capability branch October 29, 2026 17:12
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.

6 participants