diff --git a/.github/workflows/rust-check.yml b/.github/workflows/rust-check.yml new file mode 100644 index 0000000000..9ca4233c82 --- /dev/null +++ b/.github/workflows/rust-check.yml @@ -0,0 +1,72 @@ +# Compiles the whole workspace on pull requests. +# +# Until this existed the only Cargo build was the Docker publish workflow, which runs on +# pushes to main/test, so dependency changes and refactors merged without ever being +# type-checked. That is what let the sqlx/reqwest/rustls advisory work sit unvalidated. +name: "Rust check" + +on: + pull_request: + paths: + - 'Cargo.toml' + - 'Cargo.lock' + - '.sqlx/**' + - 'crates/**' + - '.github/workflows/rust-check.yml' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: rust-check-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + name: cargo check + runs-on: ubuntu-latest + timeout-minutes: 120 + env: + # storyteller-web and mysql_queries compile only against the committed .sqlx metadata, + # and CI has no MySQL. See .claude/rules/testing.md. + SQLX_OFFLINE: "true" + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: "0" + steps: + - name: Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + # Mirrors the build image's package set (build/service_cpu.Dockerfile): cmake and + # libclang for the native crates, fontconfig for the egui stack, libssl for the few + # non-rustls C clients, and ALSA because tauri-realtime pulls cpal. + - name: Install system dependencies + run: | + sudo apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + libasound2-dev \ + libclang-dev \ + libfontconfig1-dev \ + libssl-dev \ + pkg-config + + # The Docker image pins 1.93.0; check with the same compiler that ships. + - name: Install Rust + run: | + rustup toolchain install 1.93.0 --profile minimal + rustup default 1.93.0 + rustc --version + + - name: Cache cargo registry and target + uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 + + # --locked fails when Cargo.lock is out of sync with the manifests, which is exactly + # the regression a dependency bump introduces. --all-targets covers tests, benches and + # examples, none of which the Docker build compiles. + - name: cargo check + run: cargo check --locked --workspace --all-targets diff --git a/Cargo.lock b/Cargo.lock index 676aca552d..12a2aa6e4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -479,7 +479,7 @@ dependencies = [ "enums", "errors", "futures 0.3.32", - "hostname 0.4.0", + "hostname", "log", "mysql_queries", "rand 0.8.5", @@ -918,17 +918,18 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "attohttpc" -version = "0.28.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a13149d0cf3f7f9b9261fad4ec63b2efbf9a80665f52def86282d26255e6331" +checksum = "16e2cdb6d5ed835199484bb92bb8b3edd526effe995c61732580439c1a67e2e9" dependencies = [ + "base64 0.22.1", "http 1.3.1", "log", - "rustls 0.22.4", + "rustls 0.23.36", "serde", "serde_json", "url", - "webpki-roots 0.26.2", + "webpki-roots 1.0.2", ] [[package]] @@ -957,7 +958,7 @@ dependencies = [ "anyhow", "arrayvec", "log", - "nom", + "nom 7.1.3", "num-rational", "v_frame", ] @@ -973,17 +974,17 @@ dependencies = [ [[package]] name = "aws-creds" -version = "0.38.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba912106484991c456adb3364338a2534d0818bd9374b324b608074e3b55f581" +checksum = "886acd98f2df6e988d5428e92cdf041792ffa87a494d2b5125982502ec726a9c" dependencies = [ "attohttpc", "home", "log", - "quick-xml 0.32.0", + "quick-xml", "rust-ini", "serde", - "thiserror 1.0.63", + "thiserror 2.0.18", "time", "url", ] @@ -1012,11 +1013,11 @@ dependencies = [ [[package]] name = "aws-region" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ae4ae7c45238b60af0a3b27ef2fcc7bd5b8fdcd8a6d679919558b40d3eff7a" +checksum = "8f38493193e45cb4788ee7d479ee94a0a56721ccd28de79bbd0227bb8c11fee3" dependencies = [ - "thiserror 1.0.63", + "thiserror 2.0.18", ] [[package]] @@ -1107,6 +1108,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "base64ct" version = "1.6.0" @@ -1346,7 +1353,7 @@ dependencies = [ "dotenv", "easyenv", "errors", - "hostname 0.4.0", + "hostname", "log", "server_environment", "tempfile", @@ -1523,7 +1530,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom", + "nom 7.1.3", ] [[package]] @@ -1584,16 +1591,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "chumsky" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" -dependencies = [ - "hashbrown 0.14.5", - "stacker", -] - [[package]] name = "cidr-utils" version = "0.5.11" @@ -1981,7 +1978,7 @@ checksum = "2eac901828f88a5241ee0600950ab981148a18f2f756900ffba1b125ca6a3ef9" dependencies = [ "cookie 0.18.1", "document-features", - "idna 1.1.0", + "idna", "log", "publicsuffix", "serde", @@ -2733,7 +2730,7 @@ dependencies = [ "filesys", "google_drive_downloader", "hashing", - "hostname 0.4.0", + "hostname", "hyper 1.6.0", "jobs_common", "log", @@ -2789,7 +2786,7 @@ dependencies = [ "chrono", "easyenv", "errors", - "hostname 0.4.0", + "hostname", "serde", "serde_derive", "serde_json", @@ -2949,11 +2946,11 @@ dependencies = [ [[package]] name = "email-encoding" -version = "0.2.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" +checksum = "9f690ae2169f2ceb3f45b28b6fcd8fa16839f2f5c8818546774b9425f5f71004" dependencies = [ - "base64 0.21.7", + "base64 0.23.1", "memchr", ] @@ -3127,7 +3124,7 @@ dependencies = [ "enums", "errors", "futures 0.3.32", - "hostname 0.4.0", + "hostname", "log", "mysql_queries", "once_cell", @@ -3995,17 +3992,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - [[package]] name = "hostname" version = "0.4.0" @@ -4441,16 +4427,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "1.1.0" @@ -4616,7 +4592,7 @@ dependencies = [ "filesys", "google_drive_downloader", "hashing", - "hostname 0.4.0", + "hostname", "images", "jobs_common", "jsonpath_lib", @@ -5020,29 +4996,27 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "lettre" -version = "0.11.2" +version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a48c2e9831b370bc2d7233c2620298c45f3a158ed6b4b8d7416b2ada5a268fd8" +checksum = "f2c646bd5cc763b1087b15493e29a64be6147ba8f19342004fa52048ee596eae" dependencies = [ - "base64 0.21.7", - "chumsky", + "base64 0.23.1", "email-encoding", "email_address", "fastrand 2.3.0", "futures-util", - "hostname 0.3.1", + "hostname", "httpdate", - "idna 0.5.0", + "idna", "mime", - "nom", - "once_cell", + "nom 8.0.0", + "percent-encoding", "quoted_printable", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", - "socket2 0.5.10", + "rustls 0.23.36", + "socket2 0.6.2", "tokio", "url", - "webpki-roots 0.25.3", + "webpki-roots 1.0.2", ] [[package]] @@ -5344,12 +5318,6 @@ dependencies = [ "workspace-build-acceleration", ] -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - [[package]] name = "matchit" version = "0.7.3" @@ -5400,9 +5368,9 @@ dependencies = [ [[package]] name = "md5" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" +checksum = "7ebb8d8732c6a6df3d8f032a82911cfc747e00efb95cc46e8d0acd5b5b88570c" [[package]] name = "media" @@ -5829,6 +5797,15 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + [[package]] name = "nonzero_ext" version = "0.3.0" @@ -5841,6 +5818,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" +[[package]] +name = "ntapi" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" +dependencies = [ + "winapi", +] + [[package]] name = "num" version = "0.4.3" @@ -6012,6 +5998,25 @@ dependencies = [ "libc", ] +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.11.0", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "oboe" version = "0.4.6" @@ -6618,22 +6623,13 @@ version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" -[[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] - [[package]] name = "publicsuffix" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf" dependencies = [ - "idna 1.1.0", + "idna", "psl-types", ] @@ -6705,19 +6701,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.32.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "quick-xml" -version = "0.36.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" dependencies = [ "memchr", "serde", @@ -7539,9 +7525,9 @@ dependencies = [ [[package]] name = "rust-s3" -version = "0.36.0-beta.2" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7d6f3a3dd397743e8f344ffc80ea7137aee423983ae25b512e5332ad11362f" +checksum = "15d4ed794cdfede6c59f81d485cae6bb63f47a7e35d190148d40754f783073c4" dependencies = [ "async-trait", "aws-creds", @@ -7549,7 +7535,7 @@ dependencies = [ "base64 0.22.1", "bytes", "cfg-if", - "futures 0.3.32", + "futures-util", "hex", "hmac 0.12.1", "http 1.3.1", @@ -7558,13 +7544,14 @@ dependencies = [ "md5", "minidom", "percent-encoding", - "quick-xml 0.36.2", + "quick-xml", "reqwest 0.12.23", "serde", "serde_derive", "serde_json", "sha2 0.10.8", - "thiserror 1.0.63", + "sysinfo", + "thiserror 2.0.18", "time", "tokio", "tokio-stream", @@ -7620,20 +7607,6 @@ dependencies = [ "sct", ] -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring", - "rustls-pki-types", - "rustls-webpki 0.102.8", - "subtle", - "zeroize", -] - [[package]] name = "rustls" version = "0.23.36" @@ -7741,17 +7714,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustls-webpki" version = "0.103.9" @@ -8437,7 +8399,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" dependencies = [ "itertools 0.11.0", - "nom", + "nom 7.1.3", "unicode_categories", ] @@ -8661,19 +8623,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "stacker" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "winapi", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -8741,7 +8690,7 @@ dependencies = [ "google_sign_in", "grok_api_client", "hashing", - "hostname 0.4.0", + "hostname", "http_server_common", "images", "infer 0.16.0", @@ -9312,6 +9261,20 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "sysinfo" +version = "0.37.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows 0.61.3", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -9971,7 +9934,7 @@ dependencies = [ "filesys", "google_drive_downloader", "hashing", - "hostname 0.4.0", + "hostname", "hyper 1.6.0", "jobs_common", "log", @@ -10003,7 +9966,7 @@ dependencies = [ "errors", "filesys", "hashing", - "hostname 0.4.0", + "hostname", "jobs_common", "lfu", "log", @@ -10158,7 +10121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", - "idna 1.1.0", + "idna", "percent-encoding", "serde", "serde_derive", @@ -10745,6 +10708,28 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + [[package]] name = "windows-core" version = "0.51.1" @@ -10773,6 +10758,52 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "windows-link" version = "0.1.3" @@ -10785,6 +10816,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + [[package]] name = "windows-registry" version = "0.5.2" @@ -10940,6 +10981,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -11301,7 +11351,7 @@ dependencies = [ "hyper-rustls 0.24.2", "hyper-rustls 0.27.3", "hyper-util", - "idna 1.1.0", + "idna", "indexmap 1.9.3", "indexmap 2.13.0", "itertools 0.13.0", @@ -11313,7 +11363,7 @@ dependencies = [ "mime_guess", "miniz_oxide", "mio", - "nom", + "nom 7.1.3", "num-bigint", "num-integer", "num-iter", diff --git a/Cargo.toml b/Cargo.toml index 7fc0d93373..62c3a46f3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -320,7 +320,7 @@ redis = { version = "1.0.2", features = ["r2d2", "tokio-rustls-comp", "tokio-com regex = "1.12.3" reqwest = { version = "0.12.23", default-features = false, features = [ "charset", "http2", "system-proxy", "json", "cookies", "rustls-tls", "gzip" ] } reqwest-websocket = { version = "0.5.0" } -rust-s3 = { version = "0.36.0-beta.2", default-features = false, features = ["fail-on-err", "tags", "tokio-rustls-tls"] } +rust-s3 = { version = "0.38.0", default-features = false, features = ["fail-on-err", "tags", "tokio-rustls-tls"] } erased-serde = "0.4" serde = { version = "1.0.228", features = ["derive"] } serde_derive = "1.0.228" diff --git a/crates/api_clients/bucket_client/src/bucket_client_builder.rs b/crates/api_clients/bucket_client/src/bucket_client_builder.rs index 7881ebad40..6ca1188de6 100644 --- a/crates/api_clients/bucket_client/src/bucket_client_builder.rs +++ b/crates/api_clients/bucket_client/src/bucket_client_builder.rs @@ -71,13 +71,11 @@ impl BucketClientBuilder { let region_name = require(self.region_name, "region_name")?; let bucket_name = require(self.bucket_name, "bucket_name")?; - let credentials = Credentials { - access_key: Some(access_key), - secret_key: Some(secret_key), - security_token: None, - session_token: None, - expiration: None, - }; + // NB: `Credentials` has private fields in aws-creds 0.40, so it can only be built through + // its constructor (which also validates the key pair). + let credentials = + Credentials::new(Some(&access_key), Some(&secret_key), None, None, None) + .map_err(s3::error::S3Error::from)?; // A custom endpoint targets an S3-compatible host via `Region::Custom`; // otherwise the region name is parsed as a standard AWS region. diff --git a/crates/api_clients/cloud_storage/src/legacy_bucket_client.rs b/crates/api_clients/cloud_storage/src/legacy_bucket_client.rs index 504d593451..2dfc64455c 100644 --- a/crates/api_clients/cloud_storage/src/legacy_bucket_client.rs +++ b/crates/api_clients/cloud_storage/src/legacy_bucket_client.rs @@ -55,13 +55,9 @@ impl LegacyBucketClient { bucket_request_timeout: Option, ) -> anyhow::Result { - let credentials = Credentials { - access_key: Some(access_key.to_string()), - secret_key: Some(secret_key.to_string()), - security_token: None, - session_token: None, - expiration: None - }; + // NB: `Credentials` has private fields in aws-creds 0.40, so it can only be built through + // its constructor (which also validates the key pair). + let credentials = Credentials::new(Some(access_key), Some(secret_key), None, None, None)?; // NB: The GCS buckets aren't supported by default. let region = Region::Custom { diff --git a/crates/lib/deprecated/email_sender/Cargo.toml b/crates/lib/deprecated/email_sender/Cargo.toml index c8dc97c25b..bb296438aa 100644 --- a/crates/lib/deprecated/email_sender/Cargo.toml +++ b/crates/lib/deprecated/email_sender/Cargo.toml @@ -20,5 +20,5 @@ errors = { path = "../../errors" } workspace-build-acceleration = { version = "0.1", path = "../../../workspace-build-acceleration" } # External -lettre = { version = "0.11.2", default-features = false, features = ["smtp-transport", "pool", "hostname", "builder", "rustls-tls"] } +lettre = { version = "0.11.23", default-features = false, features = ["smtp-transport", "pool", "hostname", "builder", "rustls-tls"] }