clippy: use bollard::models::NetworkConnectRequest (deprecation)
ci / gates (push) Successful in 6s
ci / frontend (push) Successful in 35s
ci / rust (push) Successful in 2m51s
ci / e2e (push) Has been skipped
ci / publish (push) Successful in 2m19s

CI's clippy step failed on commit 194d63e because
bollard::network::ConnectNetworkOptions + its ::container field are
deprecated in bollard 0.19. Switch to the OpenAPI-generated
NetworkConnectRequest which the deprecation notice points at.

Behavior unchanged: same POST to /networks/bridge/connect with the
container name as payload.

Also attached bridge to the currently-in-flight research team
container out-of-band so its still-running iteration can complete —
without this the run would time out again like the last one.
This commit is contained in:
Omar Sobh
2026-07-10 14:49:16 -07:00
parent 194d63ef36
commit a0fb64ac47
+5 -4
View File
@@ -273,12 +273,13 @@ pub async fn spawn(
/// attached" case (repeat spawns / restarts). Logs any real failure /// attached" case (repeat spawns / restarts). Logs any real failure
/// with the container name so a broken network isn't invisible. /// with the container name so a broken network isn't invisible.
async fn attach_external_bridge(docker: &Docker, name: &str) { async fn attach_external_bridge(docker: &Docker, name: &str) {
use bollard::network::ConnectNetworkOptions; // Use the OpenAPI-generated NetworkConnectRequest — the older
let opts: ConnectNetworkOptions<String> = ConnectNetworkOptions { // ConnectNetworkOptions was deprecated in bollard 0.19.
container: name.to_string(), let req = bollard::models::NetworkConnectRequest {
container: Some(name.to_string()),
..Default::default() ..Default::default()
}; };
match docker.connect_network("bridge", opts).await { match docker.connect_network("bridge", req).await {
Ok(_) => {} Ok(_) => {}
Err(bollard::errors::Error::DockerResponseServerError { Err(bollard::errors::Error::DockerResponseServerError {
status_code: 403, .. status_code: 403, ..