From 194e4f40c94b320eaf09891750406b18b7094a62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 16:30:38 +0000 Subject: [PATCH 1/7] Bump rsmq_async from 11.2.0 to 12.0.0 in /deepwell Bumps [rsmq_async](https://github.com/Couragium/rsmq-async-rs) from 11.2.0 to 12.0.0. - [Changelog](https://github.com/DavidBM/rsmq-async-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/Couragium/rsmq-async-rs/commits) --- updated-dependencies: - dependency-name: rsmq_async dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- deepwell/Cargo.lock | 4 ++-- deepwell/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deepwell/Cargo.lock b/deepwell/Cargo.lock index a0bf46d0c3..41b9238572 100644 --- a/deepwell/Cargo.lock +++ b/deepwell/Cargo.lock @@ -3134,9 +3134,9 @@ dependencies = [ [[package]] name = "rsmq_async" -version = "11.2.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5a240e09bd141f078e2b559db3b6df09f3fd6b0be94ca5c292878d5ff95809" +checksum = "2d2fcb95695cdf22792ce612c4ea6eaea9842edc70fc2ded285a48c3bee97254" dependencies = [ "async-trait", "bb8", diff --git a/deepwell/Cargo.toml b/deepwell/Cargo.toml index 6bcff2e443..681cab0229 100644 --- a/deepwell/Cargo.toml +++ b/deepwell/Cargo.toml @@ -47,7 +47,7 @@ redis = { version = "0.25", features = ["aio", "connection-manager", "keep-alive ref-map = "0.1" regex = "1" reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false } -rsmq_async = "11" +rsmq_async = "12" rust-s3 = { version = "0.32", features = ["with-tokio"], default-features = false } rust-otp = "2" sea-orm = { version = "1", features = ["sqlx-postgres", "runtime-tokio-rustls", "postgres-array", "macros", "with-json", "with-time"], default-features = false } From af3bf1e4cc2ac6a76d51f667ef4e3e8b1be469e5 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sat, 31 Aug 2024 20:54:05 -0400 Subject: [PATCH 2/7] Update rust-s3. --- deepwell/Cargo.lock | 480 +++++++++++++++++++++++--------------------- deepwell/Cargo.toml | 2 +- 2 files changed, 256 insertions(+), 226 deletions(-) diff --git a/deepwell/Cargo.lock b/deepwell/Cargo.lock index 41b9238572..89df745a1a 100644 --- a/deepwell/Cargo.lock +++ b/deepwell/Cargo.lock @@ -218,6 +218,20 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "attohttpc" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a13149d0cf3f7f9b9261fad4ec63b2efbf9a80665f52def86282d26255e6331" +dependencies = [ + "http 1.1.0", + "log", + "native-tls", + "serde", + "serde_json", + "url", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -226,14 +240,16 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-creds" -version = "0.30.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeeee1a5defa63cba39097a510dfe63ef53658fc8995202a610f6a8a4d03639" +checksum = "7f84143206b9c72b3c5cb65415de60c7539c79cd1559290fddec657939131be0" dependencies = [ - "dirs", + "attohttpc", + "home", + "log", + "quick-xml", "rust-ini", "serde", - "serde-xml-rs", "thiserror", "time", "url", @@ -263,18 +279,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -519,6 +523,26 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "tiny-keccak", +] + [[package]] name = "const-str" version = "0.3.2" @@ -787,7 +811,7 @@ dependencies = [ "redis", "ref-map", "regex", - "reqwest 0.12.8", + "reqwest", "rsmq_async", "rust-otp", "rust-s3", @@ -858,26 +882,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -891,9 +895,12 @@ dependencies = [ [[package]] name = "dlv-list" -version = "0.3.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +dependencies = [ + "const-random", +] [[package]] name = "dotenvy" @@ -925,15 +932,6 @@ dependencies = [ "serde", ] -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - [[package]] name = "entities" version = "1.0.1" @@ -1129,6 +1127,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1353,25 +1366,6 @@ dependencies = [ "url", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.6" @@ -1568,7 +1562,6 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -1591,7 +1584,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.6", + "h2", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -1621,6 +1614,19 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.31", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "hyper-util" version = "0.1.9" @@ -2061,6 +2067,15 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minidom" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f45614075738ce1b77a1768912a60c0227525971b03e09122a05b8a34a2a6278" +dependencies = [ + "rxml", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2100,6 +2115,23 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "nom" version = "7.1.3" @@ -2241,12 +2273,50 @@ version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "ordered-float" version = "3.9.2" @@ -2258,12 +2328,12 @@ dependencies = [ [[package]] name = "ordered-multimap" -version = "0.4.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown 0.12.3", + "hashbrown 0.14.5", ] [[package]] @@ -2719,6 +2789,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "quick-xml" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "quinn" version = "0.11.5" @@ -2927,17 +3007,6 @@ dependencies = [ "bitflags 2.6.0", ] -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.15", - "libredox", - "thiserror", -] - [[package]] name = "ref-map" version = "0.1.3" @@ -2982,51 +3051,13 @@ dependencies = [ "bytecheck", ] -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "winreg", -] - [[package]] name = "reqwest" version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-core", "futures-util", @@ -3050,7 +3081,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tokio-rustls 0.26.0", "tower-service", @@ -3150,12 +3181,13 @@ dependencies = [ [[package]] name = "rust-ini" -version = "0.18.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +checksum = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f" dependencies = [ "cfg-if", "ordered-multimap", + "trim-in-place", ] [[package]] @@ -3172,30 +3204,38 @@ dependencies = [ [[package]] name = "rust-s3" -version = "0.32.3" +version = "0.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6009d9d4cf910505534d62d380a0aa305805a2af0b5c3ad59a3024a0715b847" +checksum = "c3df3f353b1f4209dcf437d777cda90279c397ab15a0cd6fd06bd32c88591533" dependencies = [ "async-trait", "aws-creds", "aws-region", - "base64 0.13.1", + "base64", + "bytes", "cfg-if", + "futures", "hex", "hmac", "http 0.2.12", + "hyper 0.14.31", + "hyper-tls", "log", "maybe-async", "md5", + "minidom", + "native-tls", "percent-encoding", - "reqwest 0.11.27", + "quick-xml", "serde", - "serde-xml-rs", "serde_derive", + "serde_json", "sha2", "thiserror", "time", "tokio", + "tokio-native-tls", + "tokio-rustls 0.24.1", "tokio-stream", "url", ] @@ -3251,6 +3291,18 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.7", + "sct", +] + [[package]] name = "rustls" version = "0.22.4" @@ -3260,7 +3312,7 @@ dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -3274,7 +3326,7 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -3307,6 +3359,16 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustls-webpki" version = "0.102.8" @@ -3324,6 +3386,23 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +[[package]] +name = "rxml" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98f186c7a2f3abbffb802984b7f1dfd65dac8be1aafdaabbca4137f53f0dff7" +dependencies = [ + "bytes", + "rxml_validation", + "smartstring", +] + +[[package]] +name = "rxml_validation" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22a197350ece202f19a166d1ad6d9d6de145e1d2a8ef47db299abe164dbd7530" + [[package]] name = "ryu" version = "1.0.18" @@ -3354,6 +3433,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "sea-bae" version = "0.2.1" @@ -3518,18 +3607,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "serde-xml-rs" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65162e9059be2f6a3421ebbb4fef3e74b7d9e7c60c50a0e292c6239f19f1edfa" -dependencies = [ - "log", - "serde", - "thiserror", - "xml-rs", -] - [[package]] name = "serde_derive" version = "1.0.213" @@ -3696,6 +3773,17 @@ dependencies = [ "serde", ] +[[package]] +name = "smartstring" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" +dependencies = [ + "autocfg", + "static_assertions", + "version_check", +] + [[package]] name = "socket2" version = "0.5.7" @@ -3712,7 +3800,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37468c595637c10857701c990f93a40ce0e357cedb0953d1c26c8d8027f9bb53" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures", "http 1.1.0", @@ -3853,7 +3941,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ "atoi", - "base64 0.22.1", + "base64", "bitflags 2.6.0", "byteorder", "bytes", @@ -3896,7 +3984,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi", - "base64 0.22.1", + "base64", "bitflags 2.6.0", "byteorder", "crc", @@ -4106,12 +4194,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.1" @@ -4133,27 +4215,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tap" version = "1.0.1" @@ -4295,6 +4356,16 @@ dependencies = [ "syn 2.0.82", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-retry" version = "0.3.0" @@ -4306,6 +4377,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.25.0" @@ -4741,19 +4822,6 @@ version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" -[[package]] -name = "wasm-streams" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.72" @@ -4806,22 +4874,6 @@ dependencies = [ "wikidot-normalize", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.9" @@ -4831,12 +4883,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows" version = "0.52.0" @@ -5043,16 +5089,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wyz" version = "0.5.1" @@ -5062,12 +5098,6 @@ dependencies = [ "tap", ] -[[package]] -name = "xml-rs" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" - [[package]] name = "yansi" version = "1.0.1" diff --git a/deepwell/Cargo.toml b/deepwell/Cargo.toml index 681cab0229..2b8efa3773 100644 --- a/deepwell/Cargo.toml +++ b/deepwell/Cargo.toml @@ -48,7 +48,7 @@ ref-map = "0.1" regex = "1" reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false } rsmq_async = "12" -rust-s3 = { version = "0.32", features = ["with-tokio"], default-features = false } +rust-s3 = { version = "0.35", features = ["with-tokio", "tokio-rustls"] } rust-otp = "2" sea-orm = { version = "1", features = ["sqlx-postgres", "runtime-tokio-rustls", "postgres-array", "macros", "with-json", "with-time"], default-features = false } sea-query = "0.32" From 4454ea0dc56e2f583feeb5550f9c66da2cc09970 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Sep 2024 18:06:51 -0400 Subject: [PATCH 3/7] Fix compilation issues. --- deepwell/Cargo.lock | 1 + deepwell/Cargo.toml | 1 + deepwell/src/api.rs | 2 +- deepwell/src/redis.rs | 2 +- deepwell/src/services/blob/service.rs | 11 ++++++++--- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/deepwell/Cargo.lock b/deepwell/Cargo.lock index 89df745a1a..835fcf9e68 100644 --- a/deepwell/Cargo.lock +++ b/deepwell/Cargo.lock @@ -786,6 +786,7 @@ dependencies = [ "async-trait", "bb8", "built", + "bytes", "cfg-if", "clap", "color-backtrace", diff --git a/deepwell/Cargo.toml b/deepwell/Cargo.toml index 2b8efa3773..75a2c95916 100644 --- a/deepwell/Cargo.toml +++ b/deepwell/Cargo.toml @@ -21,6 +21,7 @@ argon2 = "0.5" arraystring = "0.3" async-trait = "0.1" # remove when trait async fn enhancements land bb8 = "0.8" +bytes = "1" cfg-if = "1" clap = "4" color-backtrace = "0.6" diff --git a/deepwell/src/api.rs b/deepwell/src/api.rs index 241ea77407..9196edcdaf 100644 --- a/deepwell/src/api.rs +++ b/deepwell/src/api.rs @@ -56,7 +56,7 @@ pub struct ServerStateInner { pub rsmq: PooledRsmq, pub localizations: Localizations, pub mime_analyzer: MimeAnalyzer, - pub s3_bucket: Bucket, + pub s3_bucket: Box, } impl Debug for ServerStateInner { diff --git a/deepwell/src/redis.rs b/deepwell/src/redis.rs index 1ac0d4ae6c..7343a924b0 100644 --- a/deepwell/src/redis.rs +++ b/deepwell/src/redis.rs @@ -43,7 +43,7 @@ pub async fn connect(redis_uri: &str) -> Result<(redis::Client, PooledRsmq)> { .await?; // No redis pubsub (realtime=false) - PooledRsmq::new_with_pool(pool, false, None) + PooledRsmq::new_with_pool(pool, false, None).await? }; // Set up queue if it doesn't already exist diff --git a/deepwell/src/services/blob/service.rs b/deepwell/src/services/blob/service.rs index fce8167eb8..62d37116aa 100644 --- a/deepwell/src/services/blob/service.rs +++ b/deepwell/src/services/blob/service.rs @@ -24,12 +24,14 @@ use crate::models::blob_pending::{ self, Entity as BlobPending, Model as BlobPendingModel, }; use crate::utils::assert_is_csprng; +use bytes::Bytes; use cuid2::cuid; use rand::distributions::{Alphanumeric, DistString}; use rand::thread_rng; -use s3::request_trait::ResponseData; +use s3::request::request_trait::ResponseData; use s3::serde_types::HeadObjectResult; use sea_orm::TransactionTrait; +use std::collections::HashMap; use std::str; use std::sync::Arc; use time::format_description::well_known::Rfc2822; @@ -109,7 +111,7 @@ impl BlobService { // Create presign URL let bucket = ctx.s3_bucket(); let presign_url = - bucket.presign_put(&s3_path, config.presigned_expiry_secs, None)?; + bucket.presign_put(&s3_path, config.presigned_expiry_secs, None, None).await?; // Get timestamps let created_at = now(); @@ -500,7 +502,10 @@ impl BlobService { match status { 200 | 204 => Ok(Some(result)), 404 => Ok(None), - _ => s3_error(&ResponseData::new(vec![], status), "heading S3 blob"), + _ => { + let response = ResponseData::new(Bytes::new(), status, HashMap::new()); + s3_error(&response, "heading S3 blob") + } } } From 7b6fdcac2abebd002c10a5043ffbf97caffd6690 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Sun, 1 Sep 2024 18:23:55 -0400 Subject: [PATCH 4/7] Remove default features. --- deepwell/Cargo.lock | 149 -------------------------------------------- deepwell/Cargo.toml | 2 +- 2 files changed, 1 insertion(+), 150 deletions(-) diff --git a/deepwell/Cargo.lock b/deepwell/Cargo.lock index 835fcf9e68..730918e506 100644 --- a/deepwell/Cargo.lock +++ b/deepwell/Cargo.lock @@ -218,20 +218,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "attohttpc" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a13149d0cf3f7f9b9261fad4ec63b2efbf9a80665f52def86282d26255e6331" -dependencies = [ - "http 1.1.0", - "log", - "native-tls", - "serde", - "serde_json", - "url", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -244,7 +230,6 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f84143206b9c72b3c5cb65415de60c7539c79cd1559290fddec657939131be0" dependencies = [ - "attohttpc", "home", "log", "quick-xml", @@ -1128,21 +1113,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1615,19 +1585,6 @@ dependencies = [ "webpki-roots", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.31", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "hyper-util" version = "0.1.9" @@ -2068,15 +2025,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minidom" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f45614075738ce1b77a1768912a60c0227525971b03e09122a05b8a34a2a6278" -dependencies = [ - "rxml", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2116,23 +2064,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nom" version = "7.1.3" @@ -2274,50 +2205,12 @@ version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" -[[package]] -name = "openssl" -version = "0.10.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" -dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "ordered-float" version = "3.9.2" @@ -3220,12 +3113,9 @@ dependencies = [ "hmac", "http 0.2.12", "hyper 0.14.31", - "hyper-tls", "log", "maybe-async", "md5", - "minidom", - "native-tls", "percent-encoding", "quick-xml", "serde", @@ -3235,7 +3125,6 @@ dependencies = [ "thiserror", "time", "tokio", - "tokio-native-tls", "tokio-rustls 0.24.1", "tokio-stream", "url", @@ -3387,23 +3276,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" -[[package]] -name = "rxml" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98f186c7a2f3abbffb802984b7f1dfd65dac8be1aafdaabbca4137f53f0dff7" -dependencies = [ - "bytes", - "rxml_validation", - "smartstring", -] - -[[package]] -name = "rxml_validation" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a197350ece202f19a166d1ad6d9d6de145e1d2a8ef47db299abe164dbd7530" - [[package]] name = "ryu" version = "1.0.18" @@ -3774,17 +3646,6 @@ dependencies = [ "serde", ] -[[package]] -name = "smartstring" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" -dependencies = [ - "autocfg", - "static_assertions", - "version_check", -] - [[package]] name = "socket2" version = "0.5.7" @@ -4357,16 +4218,6 @@ dependencies = [ "syn 2.0.82", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-retry" version = "0.3.0" diff --git a/deepwell/Cargo.toml b/deepwell/Cargo.toml index 75a2c95916..c6230eae5f 100644 --- a/deepwell/Cargo.toml +++ b/deepwell/Cargo.toml @@ -49,7 +49,7 @@ ref-map = "0.1" regex = "1" reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false } rsmq_async = "12" -rust-s3 = { version = "0.35", features = ["with-tokio", "tokio-rustls"] } +rust-s3 = { version = "0.35", features = ["with-tokio", "tokio-rustls"], default-features = false } rust-otp = "2" sea-orm = { version = "1", features = ["sqlx-postgres", "runtime-tokio-rustls", "postgres-array", "macros", "with-json", "with-time"], default-features = false } sea-query = "0.32" From 06f05952bb24aca3d05a25796e934594e54697b7 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Mon, 14 Oct 2024 14:32:49 -0400 Subject: [PATCH 5/7] Fix feature flags for rust-s3. --- deepwell/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepwell/Cargo.toml b/deepwell/Cargo.toml index c6230eae5f..f07f4cd28b 100644 --- a/deepwell/Cargo.toml +++ b/deepwell/Cargo.toml @@ -49,7 +49,7 @@ ref-map = "0.1" regex = "1" reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false } rsmq_async = "12" -rust-s3 = { version = "0.35", features = ["with-tokio", "tokio-rustls"], default-features = false } +rust-s3 = { version = "0.35", features = ["with-tokio", "tokio-rustls-tls"], default-features = false } rust-otp = "2" sea-orm = { version = "1", features = ["sqlx-postgres", "runtime-tokio-rustls", "postgres-array", "macros", "with-json", "with-time"], default-features = false } sea-query = "0.32" From 7283824ec75ebe3d7f6269661a899400c978a847 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Mon, 14 Oct 2024 14:33:28 -0400 Subject: [PATCH 6/7] Update lockfile after feature flag changes. --- deepwell/Cargo.lock | 82 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/deepwell/Cargo.lock b/deepwell/Cargo.lock index 730918e506..0f5a86304c 100644 --- a/deepwell/Cargo.lock +++ b/deepwell/Cargo.lock @@ -218,6 +218,21 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "attohttpc" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a13149d0cf3f7f9b9261fad4ec63b2efbf9a80665f52def86282d26255e6331" +dependencies = [ + "http 1.1.0", + "log", + "rustls 0.22.4", + "serde", + "serde_json", + "url", + "webpki-roots", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -230,6 +245,7 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f84143206b9c72b3c5cb65415de60c7539c79cd1559290fddec657939131be0" dependencies = [ + "attohttpc", "home", "log", "quick-xml", @@ -264,6 +280,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + [[package]] name = "base64" version = "0.22.1" @@ -1567,6 +1589,20 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.31", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + [[package]] name = "hyper-rustls" version = "0.27.3" @@ -2879,8 +2915,8 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls 0.22.4", - "rustls-native-certs", - "rustls-pemfile", + "rustls-native-certs 0.7.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "ryu", "sha1_smol", @@ -2951,7 +2987,7 @@ version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-core", "futures-util", @@ -2959,7 +2995,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "hyper 1.5.0", - "hyper-rustls", + "hyper-rustls 0.27.3", "hyper-util", "ipnet", "js-sys", @@ -2970,7 +3006,7 @@ dependencies = [ "pin-project-lite", "quinn", "rustls 0.23.15", - "rustls-pemfile", + "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", @@ -3105,7 +3141,7 @@ dependencies = [ "async-trait", "aws-creds", "aws-region", - "base64", + "base64 0.22.1", "bytes", "cfg-if", "futures", @@ -3113,11 +3149,14 @@ dependencies = [ "hmac", "http 0.2.12", "hyper 0.14.31", + "hyper-rustls 0.24.2", "log", "maybe-async", "md5", "percent-encoding", "quick-xml", + "rustls 0.21.12", + "rustls-native-certs 0.6.3", "serde", "serde_derive", "serde_json", @@ -3221,6 +3260,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + [[package]] name = "rustls-native-certs" version = "0.7.3" @@ -3228,12 +3279,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + [[package]] name = "rustls-pemfile" version = "2.2.0" @@ -3662,7 +3722,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37468c595637c10857701c990f93a40ce0e357cedb0953d1c26c8d8027f9bb53" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures", "http 1.1.0", @@ -3742,7 +3802,7 @@ dependencies = [ "paste", "percent-encoding", "rustls 0.23.15", - "rustls-pemfile", + "rustls-pemfile 2.2.0", "serde", "serde_json", "sha2", @@ -3803,7 +3863,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ "atoi", - "base64", + "base64 0.22.1", "bitflags 2.6.0", "byteorder", "bytes", @@ -3846,7 +3906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi", - "base64", + "base64 0.22.1", "bitflags 2.6.0", "byteorder", "crc", From 8f813fe3dc64a492448a4376ab052c0038e74d35 Mon Sep 17 00:00:00 2001 From: Emmie Maeda Date: Mon, 14 Oct 2024 14:47:52 -0400 Subject: [PATCH 7/7] Run rustfmt. --- deepwell/src/services/blob/service.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deepwell/src/services/blob/service.rs b/deepwell/src/services/blob/service.rs index 62d37116aa..2a3fc74650 100644 --- a/deepwell/src/services/blob/service.rs +++ b/deepwell/src/services/blob/service.rs @@ -110,8 +110,9 @@ impl BlobService { // Create presign URL let bucket = ctx.s3_bucket(); - let presign_url = - bucket.presign_put(&s3_path, config.presigned_expiry_secs, None, None).await?; + let presign_url = bucket + .presign_put(&s3_path, config.presigned_expiry_secs, None, None) + .await?; // Get timestamps let created_at = now();