-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Skip inspect of built-in networks on stack deploy #362
Conversation
cc @mavenugo |
LGTM Not sure why the CI is failing though... |
Signed-off-by: Alex Mavrogiannis <alex.mavrogiannis@docker.com>
1851a63
to
7f53c99
Compare
Codecov Report
@@ Coverage Diff @@
## master #362 +/- ##
==========================================
+ Coverage 45.47% 45.49% +0.01%
==========================================
Files 193 193
Lines 16061 16065 +4
==========================================
+ Hits 7304 7308 +4
Misses 8379 8379
Partials 378 378 |
Amended my commit with no code diff - looks like CI just needed a little nudge |
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
@@ -56,7 +58,8 @@ func TestValidateExternalNetworks(t *testing.T) { | |||
expectedMsg: "Unexpected", | |||
}, | |||
{ | |||
network: "host", | |||
noInspect: true, | |||
network: "host", |
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.
I'm not really a fan of this storing state in the testcase struct.
I think the same thing can be accomplished by setting inspectError
, and asserting there was no error, right?
Fixed in #365
This didn't make the cut for 17.07, opened docker-archive/docker-ce#177 to back port it |
- What I did
The current flow of
docker stack deploy -c
performs a network inspect operation for every external network. However, built-in networks are always known to exist so these inspect calls are redundant. This PR removes them.- How I did it
For every external network in a compose file, omit the network inspect operation if it's a built-in network ("none", "default", "container", "bridge" or "host")
- How to verify it
or
Then, verify the deployed task is attached to the "host" network on the target node.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Alex Mavrogiannis alex.mavrogiannis@docker.com