-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Include plugins in docker --badopt help output
#1850
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
Include plugins in docker --badopt help output
#1850
Conversation
Signed-off-by: Ian Campbell <[email protected]>
Previously `docker --badopt` would always include experimental commands even if experimental was not enabled. Signed-off-by: Ian Campbell <[email protected]>
Previously `docker --badopt` output would not include CLI plugins. Fixes docker#1813 Signed-off-by: Ian Campbell <[email protected]>
The linter is complaining:
cmd/docker/docker.go:72:23:warning: dockerCli can be github.com/docker/cli/cli/command.Cli (interfacer)
Unclear precisely which change in the preceeding commits caused it to notice
this possibility.
Signed-off-by: Ian Campbell <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1850 +/- ##
==========================================
- Coverage 56.75% 56.74% -0.02%
==========================================
Files 309 309
Lines 21658 21662 +4
==========================================
Hits 12292 12292
- Misses 8469 8473 +4
Partials 897 897 |
|
Linter complained: Since I'm only adding new function calls to |
thaJeztah
left a comment
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.
LGTM, thanks!
|
ping @silvin-lubecki @tiborvass ptal |
|
noice! 👍 :) |
silvin-lubecki
left a comment
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.
LGTM 👍
- What I did
I arranged to cli plugins include in the output of
docker --badopt, fixes #1813.In the process of writing the e2e test I also noticed that the
docker --badoptunconditionally included experimental (builtin) commands so I fixed that too.Finally since I was adding a new subtest to an existing test, I took the chance to use
t.Runfor all of the subtests.- How I did it
Including cli plugins is achieved by calling
pluginmanager.AddPluginCommandStubsin the flag errro callback function. Handling experimental commands properly is handled by callinghideUnsupportedFeaturesin the same callback.- How to verify it
There is a new e2e test.
- Description for the changelog
/cc @SvenDowideit.