-
Notifications
You must be signed in to change notification settings - Fork 595
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
Docker v26 compatibility & test fixes #3097
Conversation
8c524b4
to
8dc1140
Compare
b313b8e
to
ed0bf55
Compare
tests := []struct { | ||
Network string | ||
WantErr bool | ||
Expect string | ||
}{ | ||
{"host", true, "conflicting options"}, | ||
{"none", true, "can't open '/sys/class/net/eth0/address'"}, |
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.
Testing this is problematic as it does not seem to be there at all with rootless.
Replacing this by calling on ip addr
.
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce_26.1.4-1~ubuntu.22.04~jammy_amd64.deb | ||
curl -OSl https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce-cli_26.1.4-1~ubuntu.22.04~jammy_amd64.deb | ||
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-buildx-plugin_0.14.1-1~ubuntu.22.04~jammy_amd64.deb | ||
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-compose-plugin_2.27.1-1~ubuntu.22.04~jammy_amd64.deb |
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.
Also updating the plugins
tests := []struct { | ||
Network string | ||
WantErr bool | ||
Expect string | ||
}{ | ||
{"host", true, "conflicting options"}, | ||
{"none", true, "can't open '/sys/class/net/eth0/address'"}, |
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.
Using /sys/class/net is problematic as it does not seem to exist for rootless in any case. Replacing with a call to ip addr to retrieve the mac address instead.
base.Cmd("start", containerName).AssertOK() | ||
cmd = base.Cmd("logs", containerName) | ||
cmd.AssertOK() | ||
cmd.AssertOutContains(test.Expect) |
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.
Removing faulty logic resulting in multiple repeat executions.
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
Besides a Windows failure that seems unrelated (can you poke it?), the CI is green on this. As indicated in the initial comment, issues are relatively minor changes in behavior of the docker cli, that we are now aligning with, for better or worse (except for the behavior on ip + bridge which is now documented in #3106). Tests have also been cleaned up slightly as some assumptions were wrong (availability of /sys/net, and multiple execution through testutil assert helpers), the logic has been simplified a bit, and they are now parallelized. @AkihiroSuda and crew, PTAL at your convenience. |
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.
Thanks
This fix #3088
So far, the issues were:
--net bridge --ip-address
#3101 - I am disabling the test for now (which was already broken by the way, since it wasn't testing anything for docker) - we might re-enable pending discussion in the linked ticket