You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling Docker::new().networks().list(&Default::default()).await on a Docker Swarm manager node (potentially also on non-manager nodes, I wasn't able to reproduce this though) causes the following error:
I have analyzed this and have identified that in a Swarm Docker will have a special network called ingress which, as far as I understood, is used for routing ingress traffic within the cluster to a worker node that can respond to it. Apparently this network can never have containers associated to it, which the Docker API under GET /networks (as called by .networks().list()) seems to indicate by returning a null in the containers key instead of an empty object. For clarification, following is the reduced output for GET /networks on a Docker Swarm manager node:
Unfortunately shiplift expects this field to always be present (@v0.7.0, @master), which causes the error shown above.
A simple non-breaking solution would probably be to just annotate the field with #[serde(default)], for which I'm happy to open a PR, but I'm noticing that since 0.7.0 some major refactorings seem to have taken place, where backwards-compatibility might not be a concern and actually redefining the field as Optional<HashMap<...>> might be the "more correct" solution.
Do you have any preference on the solution chosen? I'm happy to provide a PR for either one.
Calling
Docker::new().networks().list(&Default::default()).await
on a Docker Swarm manager node (potentially also on non-manager nodes, I wasn't able to reproduce this though) causes the following error:I have analyzed this and have identified that in a Swarm Docker will have a special network called
ingress
which, as far as I understood, is used for routing ingress traffic within the cluster to a worker node that can respond to it. Apparently this network can never have containers associated to it, which the Docker API underGET /networks
(as called by.networks().list()
) seems to indicate by returning anull
in thecontainers
key instead of an empty object. For clarification, following is the reduced output forGET /networks
on a Docker Swarm manager node:Unfortunately shiplift expects this field to always be present (@v0.7.0, @master), which causes the error shown above.
A simple non-breaking solution would probably be to just annotate the field with
#[serde(default)]
, for which I'm happy to open a PR, but I'm noticing that since 0.7.0 some major refactorings seem to have taken place, where backwards-compatibility might not be a concern and actually redefining the field asOptional<HashMap<...>>
might be the "more correct" solution.Do you have any preference on the solution chosen? I'm happy to provide a PR for either one.
0.7.0
,master
@ 9750d29docker version
on the command line:The text was updated successfully, but these errors were encountered: