-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cmd/bundle): add new bundle build sub-commands #2334
Conversation
Uffizzi Preview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple linter issues
322cc22
to
8b8210e
Compare
Codecov Report
@@ Coverage Diff @@
## gm/fs-oci #2334 +/- ##
=============================================
- Coverage 70.85% 70.66% -0.19%
=============================================
Files 80 81 +1
Lines 7679 7892 +213
=============================================
+ Hits 5441 5577 +136
- Misses 1918 1977 +59
- Partials 320 338 +18
... and 1 file with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
3e91100
to
b6248a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, any chance we could improve test coverage a bit before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add output to the build
command that it expects a ref
as an argument?
It doesn't seem clear to me from the defaults that cobra give us:
workspace/flipt - [gm/bundles-build] » ./bin/flipt bundle build
Error: accepts 1 arg(s), received 0
Usage:
flipt bundle build [flags]
Flags:
-h, --help help for build
workspace/flipt - [gm/bundles-build] » ./bin/flipt bundle build --help
Build a bundle
Usage:
flipt bundle build [flags]
Flags:
-h, --help help for build
@@ -87,6 +88,7 @@ func (c *exportCommand) run(cmd *cobra.Command, _ []string) error { | |||
// default to stdout | |||
out io.Writer = os.Stdout | |||
logger = zap.Must(zap.NewDevelopment()) | |||
enc = ext.EncodingYML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we give the user the ability to set this format via a CLI flag now that we support JSON? could default to yaml still
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yeah I wondered about this. So it will support JSON if you specify a file with .json
as the target.
However, for STDOUT, yeah we could have an actual flag. Same for import and STDIN.
Also wondering if we want to make it ignore our own
|
Do you know which files you would expect to be included from the root of the Flipt repo itself? |
Yeah maybe an exclude directive for internal makes sense? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀🌕
Fixes FLI-653
Fixes FLI-657
This PR adds the following subcommands:
The
build
command builds a target directory containing flipt feature state into an OCI bundle.The target reference can be a local bundle name (e.g.
example:latest
) or even a remote target (e.g.some.registry.io/example:latest
).The
list
command lists out existing local bundles.It also includes JSON support for
import
andexport
.