(
&self,
sandbox: &DriverSandbox,
failure: &DockerProvisioningFailure,
)
| 1110 | } |
| 1111 | |
| 1112 | async fn fail_pending_sandbox( |
| 1113 | &self, |
| 1114 | sandbox: &DriverSandbox, |
| 1115 | failure: &DockerProvisioningFailure, |
| 1116 | ) { |
| 1117 | cleanup_sandbox_token_file(sandbox, &self.config); |
| 1118 | let snapshot = pending_sandbox_snapshot( |
| 1119 | sandbox, |
| 1120 | &self.config.sandbox_namespace, |
| 1121 | error_condition(failure.reason, &failure.message), |
| 1122 | false, |
| 1123 | ); |
| 1124 | { |
| 1125 | let mut pending = self.pending.lock().await; |
| 1126 | if let Some(record) = pending.get_mut(&sandbox.id) { |
| 1127 | record.sandbox = snapshot.clone(); |
| 1128 | record.task = None; |
| 1129 | } else { |
| 1130 | return; |
| 1131 | } |
| 1132 | } |
| 1133 | |
| 1134 | self.publish_platform_event( |
| 1135 | sandbox.id.clone(), |
| 1136 | platform_event( |
| 1137 | "docker", |
| 1138 | "Warning", |
| 1139 | failure.reason, |
| 1140 | format!("Docker sandbox provisioning failed: {}", failure.message), |
| 1141 | ), |
| 1142 | ); |
| 1143 | self.publish_sandbox_snapshot(snapshot); |
| 1144 | } |
| 1145 | |
| 1146 | async fn publish_container_snapshot( |
| 1147 | &self, |
no test coverage detected