docker / app

Make your Docker Compose applications reusable, and share them on Docker Hub
Apache License 2.0
1.57k stars 176 forks source link

APP-342 Disable experimental CLI commands and flags in normal mode #747

Closed aiordache closed 4 years ago

aiordache commented 4 years ago

Signed-off-by: Anca Iordache anca.iordache@docker.com

Experimental commands are hidden from help but are still enabled.

- What I did Disabled experimental commands and flags in normal mode - How I did it Filter out all commands and flags annotated with "experimentalCLI"

- How to verify it

$ DOCKER_CLI_EXPERIMENTAL="disabled" docker app run --cnab-bundle-json 
unknown flag: --cnab-bundle-json
See 'docker app run --help'.
$ DOCKER_CLI_EXPERIMENTAL="enabled" docker app run --cnab-bundle-json 
flag needs an argument: --cnab-bundle-json
See 'docker app run --help'.
$ DOCKER_CLI_EXPERIMENTAL="enabled" docker app -h
....
  update      Update a running App
  validate    Check that an App definition (.dockerapp) is syntactically correct
$ DOCKER_CLI_EXPERIMENTAL="disabled" docker app -h
...
  update      Update a running App
$ DOCKER_CLI_EXPERIMENTAL="disabled" docker app validate .
"validate" is not a docker app command
See 'docker app --help'
$ DOCKER_CLI_EXPERIMENTAL="enabled" docker app validate .
Validated "/home/anca/go/src/github.com/docker/app-e2e/definition/app-e2e.dockerapp"

- Description for the changelog Disable experimental CLI commands and flags in normal mode.

- A picture of a cute animal (not mandatory)

image

codecov[bot] commented 4 years ago

Codecov Report

Merging #747 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #747   +/-   ##
=======================================
  Coverage   69.07%   69.07%           
=======================================
  Files          63       63           
  Lines        3467     3467           
=======================================
  Hits         2395     2395           
  Misses        752      752           
  Partials      320      320

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d7d8312...1b94c74. Read the comment docs.