-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[19.03 backport] plugin fixes #1878
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
Merged
Merged
Conversation
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
Signed-off-by: Ian Campbell <[email protected]> (cherry picked from commit d57175a) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Previously `docker --badopt` would always include experimental commands even if experimental was not enabled. Signed-off-by: Ian Campbell <[email protected]> (cherry picked from commit 79a75da) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Previously `docker --badopt` output would not include CLI plugins. Fixes docker#1813 Signed-off-by: Ian Campbell <[email protected]> (cherry picked from commit 40a6cf7) Signed-off-by: Sebastiaan van Stijn <[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]>
(cherry picked from commit 7d0645c)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
This regressed in 3af168c ("Ensure plugins can use `PersistentPreRunE` again.") but this wasn't noticed because the helloworld test plugin has it's own `PersistentPreRunE` which has the effect of deferring the resolution of the global variable. In the case where the hook isn't used the variable is resolved during `newPluginCommand` which is before the global variable was set. Initialize the plugin command with a stub function wrapping the call to the (global) hook, this defers resolving the variable until after it has been set, otherwise the initial value (`nil`) is used in the struct. Signed-off-by: Ian Campbell <[email protected]> (cherry picked from commit af200f1) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
Codecov Report
@@ Coverage Diff @@
## 19.03 #1878 +/- ##
==========================================
- Coverage 56.75% 56.74% -0.02%
==========================================
Files 309 309
Lines 21658 21662 +4
==========================================
Hits 12292 12292
- Misses 8469 8473 +4
Partials 897 897 |
silvin-lubecki
approved these changes
May 13, 2019
Contributor
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
tiborvass
approved these changes
May 13, 2019
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.
backports for 19.03 of:
docker --badopthelp output #1850 Include plugins indocker --badopthelp outputdocker --badoptdoesn't show cli plugins #1813 callingdocker --badoptdoesn't show cli plugins