diff --git a/services/backup/Cargo.lock b/services/backup/Cargo.lock --- a/services/backup/Cargo.lock +++ b/services/backup/Cargo.lock @@ -28,23 +28,24 @@ [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.28", ] [[package]] @@ -55,7 +56,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -564,7 +565,7 @@ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -666,7 +667,7 @@ "proc-macro2", "quote", "scratch", - "syn", + "syn 1.0.105", ] [[package]] @@ -683,7 +684,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -696,7 +697,7 @@ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.105", ] [[package]] @@ -823,7 +824,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -1304,7 +1305,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -1332,7 +1333,7 @@ checksum = "c142c0e46b57171fe0c528bee8c5b7569e80f0c17e377cd0e30ea57dbc11bb51" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.105", ] [[package]] @@ -1344,7 +1345,7 @@ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.105", "version_check", ] @@ -1361,9 +1362,9 @@ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -1395,7 +1396,7 @@ "prost", "prost-types", "regex", - "syn", + "syn 1.0.105", "tempfile", "which", ] @@ -1410,7 +1411,7 @@ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -1425,9 +1426,9 @@ [[package]] name = "quote" -version = "1.0.21" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -1661,7 +1662,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -1749,6 +1750,17 @@ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "0.1.1" @@ -1860,7 +1872,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -1941,7 +1953,7 @@ "proc-macro2", "prost-build", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -2016,7 +2028,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", ] [[package]] @@ -2176,7 +2188,7 @@ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.105", "wasm-bindgen-shared", ] @@ -2198,7 +2210,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.105", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/services/blob/Cargo.lock b/services/blob/Cargo.lock --- a/services/blob/Cargo.lock +++ b/services/blob/Cargo.lock @@ -80,7 +80,7 @@ checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -118,7 +118,7 @@ "parse-size", "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -233,7 +233,7 @@ "actix-router", "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -300,29 +300,30 @@ [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "8c6f84b74db2535ebae81eede2f39b947dcbf01d093ae5f791e5dd414a1bf289" [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.28", ] [[package]] @@ -333,7 +334,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -949,7 +950,7 @@ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -1080,7 +1081,7 @@ "proc-macro2", "quote", "scratch", - "syn", + "syn 1.0.103", ] [[package]] @@ -1097,7 +1098,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -1121,7 +1122,7 @@ "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.103", ] [[package]] @@ -1132,7 +1133,7 @@ dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -1145,7 +1146,7 @@ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.103", ] [[package]] @@ -1302,7 +1303,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -1908,7 +1909,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -1942,7 +1943,7 @@ checksum = "c142c0e46b57171fe0c528bee8c5b7569e80f0c17e377cd0e30ea57dbc11bb51" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.103", ] [[package]] @@ -1954,7 +1955,7 @@ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.103", "version_check", ] @@ -1971,9 +1972,9 @@ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -2005,7 +2006,7 @@ "prost", "prost-types", "regex", - "syn", + "syn 1.0.103", "tempfile", "which", ] @@ -2020,7 +2021,7 @@ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -2035,9 +2036,9 @@ [[package]] name = "quote" -version = "1.0.21" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -2285,7 +2286,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -2414,6 +2415,17 @@ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "0.1.1" @@ -2542,7 +2554,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -2558,9 +2570,9 @@ [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -2623,7 +2635,7 @@ "proc-macro2", "prost-build", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -2710,7 +2722,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -2896,7 +2908,7 @@ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.103", "wasm-bindgen-shared", ] @@ -2918,7 +2930,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/services/blob/src/http/handlers/blob.rs b/services/blob/src/http/handlers/blob.rs --- a/services/blob/src/http/handlers/blob.rs +++ b/services/blob/src/http/handlers/blob.rs @@ -1,6 +1,5 @@ use crate::http::errors::handle_blob_service_error; use crate::service::BlobService; -use crate::tools::BoxedError; use crate::validate_identifier; use actix_web::error::{ @@ -11,7 +10,7 @@ web, Error as HttpError, HttpResponse, }; use anyhow::Result; -use async_stream::{try_stream, AsyncStream}; +use async_stream::try_stream; use serde::{Deserialize, Serialize}; use tokio_stream::StreamExt; use tracing::{debug, info, instrument, trace, warn}; @@ -175,7 +174,7 @@ tracing::Span::current().record("blob_hash", &blob_hash); trace!("Receiving blob data"); - let stream: AsyncStream, BoxedError>, _> = try_stream! { + let stream = try_stream! { while let Some(mut field) = payload.try_next().await.map_err(Box::new)? { let field_name = field.name(); if field_name != "blob_data" { diff --git a/services/blob/src/service.rs b/services/blob/src/service.rs --- a/services/blob/src/service.rs +++ b/services/blob/src/service.rs @@ -275,9 +275,8 @@ let range = offset..(offset + next_size); trace!(?range, "Getting {} bytes of data", next_size); - yield s3_client - .get_object_bytes(&s3_path, range) - .await?; + let bytes = s3_client.get_object_bytes(&s3_path, range).await?; + yield bytes; offset += next_size; }