enable experimental commands by default, and remove `BUILDX_EXPERIMENTAL` env-var
I saw https://github.com/docker/buildx/pull/3240 which reminded me that I wanted to open this patch as suggestion.
remove "experimental" hint from help / usage output
This was added in 02c2073feb3681e5c13e944d5f1cd2246cc22013, which changed the buildx CLI to match the behavior of the docker CLI, which conditionally hid some options that were marked experimental. The CLI now shows has client-side experimental options enabled by default (but labeled as experimental where suitable).
Before this patch, every command would print this message unless experimental was enabled;
docker buildx --help
...
Run 'docker buildx COMMAND --help' for more information on a command.
Experimental commands and flags are hidden. Set BUILDX_EXPERIMENTAL=1 to show them.
With this patch applied, that message is no longer shown.
commands: enable experimental commands by default
Experimental commands are labeled as experimental, but we can enable them by default to encourage users to try them.
remove uses of BUILDX_EXPERIMENTAL for generating docs
As the experimental commands are enabled by default now, there's no need to set this env-var for generating the docs.
util/confutil: remove IsExperimental() utility
This function is no longer used, and does not have external consumers; https://grep.app/search?f.lang=Go&q=.IsExperimental%28%29
tests: remove redundant cleanup
t.TempDir() already cleans up after the test.
remove "experimental" integration tests
Experimental commands are now enabled by default, so there should not be a need to run tests separately.
docs: remove use of BUILDX_EXPERIMENTAL as example
It was only used to illustrate the concept, so let's use something generic.
Did a quick rebase to get a fresh run of CI and moved it out of draft
All green again; PTAL
Updated to now enable experimental commands by default;
- commands: enable experimental commands by default
- remove uses of BUILDX_EXPERIMENTAL for generating docs
- util/confutil: remove IsExperimental() utility
- remove "experimental" integration tests
- docs: remove use of BUILDX_EXPERIMENTAL as example
@thaJeztah For a follow-up I was wondering if we still need to alter Usage and Short for flags and commands in: https://github.com/docker/buildx/blob/55698253a52d4b09a538fc6888a5eacae6c6266b/util/cobrautil/cobrautil.go#L22-L53
Maybe docker/cli has this kind of helpers already?
Maybe docker/cli has this kind of helpers already?
docker/cli adds an experimental warning to the "usage" / "help" output of the command itself, but does not add a (EXPERIMENTAL) to flags and/or commands in overviews.
We should probably look what we want to do there; to some extend the "ALL CAPS" format seems a bit aggressive, but maybe there's some middle ground.