feat: add Zarf package disassembly command - #1520
Conversation
There was a problem hiding this comment.
We will likely want to talk to the Zarf team about how better to handle translations like this - there is a "safety" check test whenever the schemas (either beta or alpha) shift on us but this conversion should be owned more by Zarf than us in the future.
| assert.Equal(t, v1beta1.APIVersion, reassembled.PackageDefinition.OriginalAPIVersion()) | ||
| } | ||
|
|
||
| func TestPackageSchemaCoverage(t *testing.T) { |
There was a problem hiding this comment.
This is that safety check test
|
since I know is'a comin' - @greptileai review |
Greptile SummaryThis PR adds legacy and Next-mode commands that disassemble complete Zarf packages into locally rebuildable source.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issues identified. Package inputs are validated before name-derived paths are used, output is staged before publication, and reconstructed resources are consistently rewritten to local offline inputs. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
CLI[uds dev disassemble] --> Load[Load local or OCI Zarf package]
Load --> Validate[Validate package and reject differential or skeleton forms]
Validate --> Stage[Create output staging directory]
Stage --> Assets[Localize package and component assets]
Assets --> Definition[Rewrite zarf.yaml with local sources]
Definition --> Publish[Atomically publish output directory]
Publish --> Rebuild[Rebuild package offline]
Reviews (1): Last reviewed commit: "fix unit test" | Re-trigger Greptile |
|
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. |
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 withzarf tools archivercommands but this makes the process a bit more streamlined and intentional.Related Issue
Fixes #N/A
Type of change
Checklist before merging