Repository navigation
fix: print a valid skeleton import example from the CLI - #5530
Merged
brandtkeller merged 2 commits intoOct 30, 2026
Merged
Conversation
Since zarf-dev#5379 the import example printed after publishing a skeleton was built from api.Component, which has no yaml tags, so it came out with lowercased keys and every empty field. Convert it to v1alpha1 before printing and print it from the CLI instead of PublishSkeleton, so SDK callers no longer get colored YAML on stdout. Signed-off-by: Igor de Beijer <hi@idebeijer.com>
✅ Deploy Preview for zarf-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
... and 37 files with indirect coverage changes 🚀 New features to boost your workflow:
|
AustinAbro321
requested changes
Oct 26, 2026
AustinAbro321
left a comment
Member
There was a problem hiding this comment.
Thanks for finding this and making the PR. Agree there is a bug in the formatting, also definitely makes sense for this to live at the CLI level
Signed-off-by: Igor de Beijer <hi@idebeijer.com>
brandtkeller
approved these changes
Oct 30, 2026
brandtkeller
left a comment
Member
There was a problem hiding this comment.
lgtm - thanks for taking the initiative here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Started out simply wanting to move printing out of
pkg/packagerwhen I was using Zarf as an SDK with my own logger, wherepackager.PublishSkeletonstill wrote colored YAML straight to stdout. While doing that I noticed the YAML itself was wrong, so this fixes both.Since #5379 the import example printed after a skeleton publish is built from
api.Component, which has no yaml tags, so it comes out with lowercased keys and every empty field. Skeletons are v1alpha1-only, so the CLI now converts it to v1alpha1 before printing, likepackageForDisplay.zarf package publish <dir> <oci://...> packager.PublishSkeleton push skeleton - print example (api.Component, colored, to stdout) + fetch published zarf.yaml + packager.SkeletonImportExample (api.Component) + convert to v1alpha1 + print exampleThe fetch discards parse warnings since publish already showed them, and failing to print the example only logs a warning because the skeleton is already published.
Before (v0.88.0, truncated):
After:
The only difference from v0.86.0 is
required: true, which the v1alpha1 converter always sets. Otherwise CLI output is unchanged, and there's no change to the package format or existing function signatures.Related Issue
Relates to #5379
Checklist before merging