Skip to content

Conversation

@thaJeztah
Copy link
Member

backports for 19.03 of:

Ian Campbell added 5 commits May 13, 2019 09:05
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]>
@thaJeztah
Copy link
Member Author

ping @ijc @silvin-lubecki @SvenDowideit

@thaJeztah thaJeztah changed the base branch from master to 19.03 May 13, 2019 16:10
@codecov-io
Copy link

Codecov Report

Merging #1878 into 19.03 will decrease coverage by 0.01%.
The diff coverage is 20%.

@@            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

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiborvass tiborvass merged commit 394c393 into docker:19.03 May 13, 2019
@thaJeztah thaJeztah deleted the 19.03_plugin_fixes branch May 13, 2019 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants