From 56f9c0b165c0f54d5651768399864cbc42181af7 Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:38:46 +0200 Subject: [PATCH 1/8] consistency --- DEVELOPING.md | 5 ++++- cargo-shuttle/Cargo.toml | 8 +++++--- deployer/prepare.sh | 5 ++++- e2e/tests/integration/helpers/mod.rs | 17 ++++++++++------- resources/aws-rds/Cargo.toml | 13 ++++++++----- resources/aws-rds/README.md | 2 ++ resources/aws-rds/src/lib.rs | 1 + 7 files changed, 34 insertions(+), 17 deletions(-) diff --git a/DEVELOPING.md b/DEVELOPING.md index e03b4f1e7..3d9cdbf90 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -136,8 +136,11 @@ In order to test local changes to the library crates, you may want to add the be ```toml [patch.crates-io] -shuttle-service = { path = "[base]/shuttle/service" } +shuttle-codegen = { path = "[base]/shuttle/codegen" } +shuttle-common = { path = "[base]/shuttle/common" } +shuttle-proto = { path = "[base]/shuttle/proto" } shuttle-runtime = { path = "[base]/shuttle/runtime" } +shuttle-service = { path = "[base]/shuttle/service" } shuttle-aws-rds = { path = "[base]/shuttle/resources/aws-rds" } shuttle-persist = { path = "[base]/shuttle/resources/persist" } diff --git a/cargo-shuttle/Cargo.toml b/cargo-shuttle/Cargo.toml index b9c197d1d..d88c6bfa3 100644 --- a/cargo-shuttle/Cargo.toml +++ b/cargo-shuttle/Cargo.toml @@ -11,6 +11,7 @@ homepage = "https://www.shuttle.rs" anyhow = { workspace = true } async-trait = { workspace = true } bollard = { workspace = true } +cargo-generate = "0.18.3" cargo_metadata = { workspace = true } chrono = { workspace = true } clap = { workspace = true, features = ["env"] } @@ -34,12 +35,15 @@ reqwest = { workspace = true, features = ["json"] } reqwest-middleware = "0.2.0" reqwest-retry = "0.2.0" rmp-serde = { workspace = true } +semver = "1.0.17" serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } strum = { workspace = true } tar = { workspace = true } tokio = { workspace = true, features = ["macros", "signal"] } -tokio-tungstenite = { version = "0.19.0", features = ["rustls-tls-webpki-roots"] } +tokio-tungstenite = { version = "0.19.0", features = [ + "rustls-tls-webpki-roots", +] } toml = { workspace = true } toml_edit = { workspace = true } tonic = { workspace = true } @@ -52,8 +56,6 @@ tracing-subscriber = { workspace = true, features = [ url = "2.3.1" uuid = { workspace = true, features = ["v4"] } webbrowser = "0.8.2" -semver = "1.0.17" -cargo-generate = "0.18.3" [dependencies.shuttle-common] workspace = true diff --git a/deployer/prepare.sh b/deployer/prepare.sh index ba9d6eb70..703a32467 100755 --- a/deployer/prepare.sh +++ b/deployer/prepare.sh @@ -33,8 +33,11 @@ touch $CARGO_HOME/config.toml if [[ $PROD != "true" ]]; then echo ' [patch.crates-io] - shuttle-service = { path = "/usr/src/shuttle/service" } + shuttle-codegen = { path = "/usr/src/shuttle/codegen" } + shuttle-common = { path = "/usr/src/shuttle/common" } + shuttle-proto = { path = "/usr/src/shuttle/proto" } shuttle-runtime = { path = "/usr/src/shuttle/runtime" } + shuttle-service = { path = "/usr/src/shuttle/service" } shuttle-aws-rds = { path = "/usr/src/shuttle/resources/aws-rds" } shuttle-persist = { path = "/usr/src/shuttle/resources/persist" } diff --git a/e2e/tests/integration/helpers/mod.rs b/e2e/tests/integration/helpers/mod.rs index 0d796c8f2..c1424930b 100644 --- a/e2e/tests/integration/helpers/mod.rs +++ b/e2e/tests/integration/helpers/mod.rs @@ -38,15 +38,18 @@ impl TempCargoHome { write!( config, r#"[patch.crates-io] -shuttle-service = {{ path = "{}" }} +shuttle-codegen = {{ path = "{}" }} +shuttle-common = {{ path = "{}" }} +shuttle-proto = {{ path = "{}" }} shuttle-runtime = {{ path = "{}" }} +shuttle-service = {{ path = "{}" }} shuttle-aws-rds = {{ path = "{}" }} +shuttle-metadata = {{ path = "{}" }} shuttle-persist = {{ path = "{}" }} shuttle-shared-db = {{ path = "{}" }} shuttle-secrets = {{ path = "{}" }} shuttle-static-folder = {{ path = "{}" }} -shuttle-metadata = {{ path = "{}" }} shuttle-axum = {{ path = "{}" }} shuttle-actix-web = {{ path = "{}" }} @@ -60,9 +63,13 @@ shuttle-thruster = {{ path = "{}" }} shuttle-tide = {{ path = "{}" }} shuttle-tower = {{ path = "{}" }} shuttle-warp = {{ path = "{}" }}"#, - WORKSPACE_ROOT.join("service").display(), + WORKSPACE_ROOT.join("codegen").display(), + WORKSPACE_ROOT.join("common").display(), + WORKSPACE_ROOT.join("proto").display(), WORKSPACE_ROOT.join("runtime").display(), + WORKSPACE_ROOT.join("service").display(), WORKSPACE_ROOT.join("resources").join("aws-rds").display(), + WORKSPACE_ROOT.join("resources").join("metadata").display(), WORKSPACE_ROOT.join("resources").join("persist").display(), WORKSPACE_ROOT.join("resources").join("shared-db").display(), WORKSPACE_ROOT.join("resources").join("secrets").display(), @@ -70,10 +77,6 @@ shuttle-warp = {{ path = "{}" }}"#, .join("resources") .join("static-folder") .display(), - WORKSPACE_ROOT - .join("resources") - .join("metadata") - .display(), WORKSPACE_ROOT .join("services") .join("shuttle-axum") diff --git a/resources/aws-rds/Cargo.toml b/resources/aws-rds/Cargo.toml index 704056557..3254315a9 100644 --- a/resources/aws-rds/Cargo.toml +++ b/resources/aws-rds/Cargo.toml @@ -10,10 +10,13 @@ keywords = ["shuttle-service", "rds"] async-trait = "0.1.56" paste = "1.0.7" serde = { version = "1.0.148", features = ["derive"] } -shuttle-service = { path = "../../service", version = "0.24.0" } -sqlx = { version = "0.7.1", features = ["runtime-tokio-native-tls"] } +shuttle-service = { path = "../../service", version = "0.24.0", default-features = false } +sqlx = "0.7.1" [features] -postgres = ["sqlx/postgres"] -mysql = ["sqlx/mysql"] -mariadb = ["sqlx/mysql"] +postgres = ["sqlx/postgres", "sqlx/runtime-tokio-native-tls"] +postgres-rustls = ["sqlx/postgres", "sqlx/runtime-tokio-rustls"] +mysql = ["sqlx/mysql", "sqlx/runtime-tokio-native-tls"] +mysql-rustls = ["sqlx/mysql", "sqlx/runtime-tokio-rustls"] +mariadb = ["sqlx/mysql", "sqlx/runtime-tokio-native-tls"] +mariadb-rustls = ["sqlx/mysql", "sqlx/runtime-tokio-rustls"] diff --git a/resources/aws-rds/README.md b/resources/aws-rds/README.md index cb19123b6..d42078797 100644 --- a/resources/aws-rds/README.md +++ b/resources/aws-rds/README.md @@ -16,6 +16,8 @@ Add `shuttle-aws-rds` to the dependencies for your service. Every engine is behi | MySql | mysql | shuttle_aws_rds::MySql | | MariaDB | mariadb | shuttle_aws_rds::MariaDB | +Note: You can also add `-rustls` after the feature flag, `postgres-rustls` etc + An example using the Tide framework can be found on [GitHub](https://github.com/shuttle-hq/shuttle-examples/tree/main/tide/postgres) ### Options diff --git a/resources/aws-rds/src/lib.rs b/resources/aws-rds/src/lib.rs index aa501f486..7087fbf37 100644 --- a/resources/aws-rds/src/lib.rs +++ b/resources/aws-rds/src/lib.rs @@ -1,4 +1,5 @@ #![doc = include_str!("../README.md")] +#![allow(unused_imports)] use async_trait::async_trait; use paste::paste; From d16f9da70d486d54b11be3daedbf5ce13ce87ae5 Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:39:00 +0200 Subject: [PATCH 2/8] ci: experiment new layout --- .circleci/config.yml | 170 ++++++++++++++++++++++++++++--------------- 1 file changed, 111 insertions(+), 59 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef84ee408..ff2957918 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,9 +11,9 @@ executors: docker: - image: cimg/rust:1.70.0 resource_class: small - image-ubuntu: + machine-ubuntu: machine: - image: ubuntu-2204:2022.04.1 + image: ubuntu-2204:2023.07.2 docker_layer_caching: true resource_class: xlarge @@ -89,8 +89,11 @@ commands: command: | cat\<< EOF > ~/.cargo/config.toml [patch.crates-io] - shuttle-service = { path = "$PWD/service" } + shuttle-codegen = { path = "$PWD/codegen" } + shuttle-common = { path = "$PWD/common" } + shuttle-proto = { path = "$PWD/proto" } shuttle-runtime = { path = "$PWD/runtime" } + shuttle-service = { path = "$PWD/service" } shuttle-aws-rds = { path = "$PWD/resources/aws-rds" } shuttle-persist = { path = "$PWD/resources/persist" } @@ -121,19 +124,16 @@ commands: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.70.0 --target add wasm32-wasi sudo apt update && sudo apt install -y libssl1.1 install-protoc: - parameters: - arch: - description: "The architecture of protoc to install" - type: string - default: "linux-x86_64" steps: - run: name: Install protoc + environment: + ARCH: "linux-x86_64" + VERSION: "22.2" command: | - curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-<< parameters.arch >>.zip &&\ - sudo unzip -o protoc-21.9-<< parameters.arch >>.zip -d /usr/local bin/protoc &&\ - sudo unzip -o protoc-21.9-<< parameters.arch >>.zip -d /usr/local 'include/*' &&\ - rm -f protoc-21.9-<< parameters.arch >>.zip + curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v$VERSION/protoc-$VERSION-$ARCH.zip" && \ + unzip -o "protoc-$VERSION-$ARCH.zip" bin/protoc "include/*" -d /usr/local && \ + rm -f "protoc-$VERSION-$ARCH.zip" make-artifact: parameters: target: @@ -170,6 +170,24 @@ commands: paths: - << parameters.target >>/* - << parameters.target >>.env + do-integration: + steps: + - install-rust + - checkout + - run: git submodule sync + - run: git submodule update --init + - restore-cargo-cache + - apply-patches + - run: + name: Run unit tests + command: cargo test --package << parameters.crate >> --all-features --lib -- --nocapture + - run: + name: Run integration tests + # Only run integration tests if there are any + command: | + set +o pipefail + (cargo test --package << parameters.crate >> --all-features --test '*' -- --list 2>&1 | grep -q "no test target matches pattern") && echo "nothing to test" || cargo test --package << parameters.crate >> --all-features --test '*' -- --nocapture + - save-cargo-cache jobs: workspace: @@ -182,7 +200,7 @@ jobs: # the Cargo.lock. - run: command: | - [[ -z $(cat Cargo.lock | grep "\[\[patch.unused\]\]") ]] + [ -z $(grep "\[\[patch.unused\]\]" Cargo.lock) ] - run: cargo fmt --all --check # TODO: this is incompatible with workspace inheritance, uncomment when # https://github.com/DevinR528/cargo-sort/pull/29 is merged @@ -197,7 +215,7 @@ jobs: -A clippy::let-unit-value \ -A clippy::format-push-string - save-cargo-cache - check-standalone: + test-standalone: parameters: path: description: "Path to crate external from workspace" @@ -222,38 +240,41 @@ jobs: << parameters.features >> \ --manifest-path << parameters.path >>/Cargo.toml \ --no-deps -- \ - --D warnings \ - -A clippy::let-unit-value \ - -A clippy::format-push-string + --D warnings - run: cargo test << parameters.features >> --manifest-path << parameters.path >>/Cargo.toml -- --nocapture - save-cargo-cache - platform-test: + test-workspace-member: parameters: crate: - description: "Crate to test" + description: "Crate in workspace to test" type: string - # Using an image since tests will start a docker container - executor: image-ubuntu + executor: docker-rust + resource_class: medium+ steps: - - install-rust - - install-protoc - checkout - - run: git submodule sync - - run: git submodule update --init - restore-cargo-cache - - apply-patches - - run: - name: Run unit tests - command: cargo test --package << parameters.crate >> --all-features --lib -- --nocapture - - run: - name: Run integration tests - # Only run integration tests if there are any - command: | - set +o pipefail - (cargo test --package << parameters.crate >> --all-features --test '*' -- --list 2>&1 | grep -q "no test target matches pattern") && echo "nothing to test" || cargo test --package << parameters.crate >> --all-features --test '*' -- --nocapture + - run: cargo test --package << parameters.crate >> --all-features -- --nocapture - save-cargo-cache + test-workspace-member-integration: + parameters: + crate: + description: "Crate in workspace to test" + type: string + executor: docker-rust + resource_class: medium+ + steps: + - do-integration + test-workspace-member-integration-machine: + parameters: + crate: + description: "Crate in workspace to test" + type: string + # Using a machine image since tests will start a docker container + executor: machine-ubuntu + steps: + - do-integration e2e-test: - executor: image-ubuntu + executor: machine-ubuntu steps: - install-rust - checkout @@ -284,7 +305,7 @@ jobs: key: docker-buildx-{{ .Branch }} when: always build-and-push: - executor: image-ubuntu + executor: machine-ubuntu parameters: aws-access-key-id: description: "AWS cli access key id" @@ -320,7 +341,8 @@ jobs: PUSH=true PROD=<< parameters.production >> PLATFORMS=linux/amd64 TAG=$TAG make images - save-buildx-cache deploy-images: - executor: image-ubuntu + executor: machine-ubuntu + resource_class: small parameters: ssh-fingerprint: description: "SSH-key fingerprint" @@ -612,16 +634,16 @@ workflows: ci: jobs: - workspace - - check-standalone: + - test-standalone: name: << matrix.path >> matrix: parameters: path: - resources/aws-rds + - resources/metadata - resources/persist - resources/secrets - resources/static-folder - - resources/metadata - resources/turso - services/shuttle-actix-web - services/shuttle-axum @@ -635,40 +657,70 @@ workflows: - services/shuttle-tide - services/shuttle-tower - services/shuttle-warp - - check-standalone: + - test-standalone: # shuttle-shared-db has mutually exclusive features # so we run checks for each feature separately name: "resources/shared-db: << matrix.features >>" matrix: - alias: check-standalone-shared-db + alias: test-standalone-shared-db parameters: - path: [resources/shared-db] + path: + - resources/shared-db features: - "-F mongodb" - "-F postgres" - "-F postgres-rustls" - - platform-test: + ############ This crate has no tests, therefore excluded. + # - test-standalone: + # # Has mutually exclusive features, so we run checks for each feature separately + # name: "resources/aws-rds: << matrix.features >>" + # matrix: + # alias: test-standalone-aws-rds + # parameters: + # path: + # - resources/aws-rds + # features: + # - "-F postgres" + # - "-F postgres-rustls" + # - "-F mysql" + # - "-F mysql-rustls" + # - "-F mariadb" + # - "-F mariadb-rustls" + - test-workspace-member: name: << matrix.crate >> matrix: parameters: crate: - [ - "shuttle-auth", - "cargo-shuttle", - "shuttle-codegen", - "shuttle-common", - "shuttle-deployer", - "shuttle-proto", - "shuttle-provisioner", - "shuttle-resource-recorder", - "shuttle-runtime", - "shuttle-service", - ] + # - shuttle-admin # no tests + - shuttle-common + # - shuttle-common-tests # no tests + - test-workspace-member-integration: + name: << matrix.crate >> + matrix: + parameters: + crate: + - shuttle-auth + - shuttle-codegen + - shuttle-deployer + - shuttle-proto + - shuttle-provisioner + - shuttle-resource-recorder + - shuttle-runtime + - shuttle-service + - test-workspace-member-integration-machine: + name: << matrix.crate >> + matrix: + parameters: + crate: + # needs to spawn docker containers, therefore in a machine + - cargo-shuttle - e2e-test: requires: - - platform-test - - check-standalone - - check-standalone-shared-db + - test-standalone + - test-standalone-shared-db + # - test-standalone-aws-rds + - test-workspace-member + - test-workspace-member-integration-machine filters: branches: only: production From 3462118455883003852bd3c1fc6b64d81075dd72 Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:41:46 +0200 Subject: [PATCH 3/8] cargo update --- Cargo.lock | 370 ++++++++++++++++++++++++++++------------------------- 1 file changed, 199 insertions(+), 171 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b8653c5cb..eceba5377 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,9 +52,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -146,9 +146,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "anymap2" @@ -245,9 +245,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] @@ -292,18 +292,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -642,9 +642,9 @@ dependencies = [ [[package]] name = "axum" -version = "0.6.19" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", @@ -670,7 +670,7 @@ dependencies = [ "sha1", "sync_wrapper", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.20.0", "tower", "tower-layer", "tower-service", @@ -715,9 +715,9 @@ dependencies = [ [[package]] name = "axum-extra" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cebbcd90f811f93fc2a993024caecc1e8270d9d1eb9d3359edb3069c2096ea6f" +checksum = "a93e433be9382c737320af3924f7d5fc6f89c155cf2bf88949d8f5126fab283f" dependencies = [ "axum", "axum-core", @@ -731,7 +731,6 @@ dependencies = [ "serde", "tokio", "tower", - "tower-http 0.4.3", "tower-layer", "tower-service", ] @@ -862,9 +861,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" dependencies = [ "serde", ] @@ -981,7 +980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", - "regex-automata 0.3.4", + "regex-automata 0.3.6", "serde", ] @@ -1180,13 +1179,12 @@ dependencies = [ "shuttle-common-tests", "shuttle-proto", "shuttle-service", - "sqlx", "strum", "tar", "tempfile", "test-context", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.19.0", "tokiotest-httpserver", "toml 0.5.11", "toml_edit 0.16.2", @@ -1214,9 +1212,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.80" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f1226cd9da55587234753d1245dd5b132343ea240f26b6a9003d68706141ba" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", "libc", @@ -1295,7 +1293,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -1364,9 +1362,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "const-random" @@ -1774,9 +1772,9 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "pem-rfc7468", @@ -1799,9 +1797,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8810e7e2cf385b1e9b50d68264908ec367ba642c96d02edfe61c39e88e2a3c01" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" dependencies = [ "serde", ] @@ -1946,7 +1944,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2088,7 +2086,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.6", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -2104,13 +2102,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -2128,9 +2126,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -2202,15 +2200,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" dependencies = [ "io-lifetimes 1.0.11", - "rustix 0.38.6", + "rustix 0.38.8", "windows-sys 0.48.0", ] [[package]] name = "fs_at" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15550ecca96ea332ec143fb450701074143b70d358e50b32b1f847ccff2e1cf7" +checksum = "13865faf9bae9729a623b591520adb9c5b1b0ecbec8a48394f47f6801a458f9f" dependencies = [ "aligned", "cfg-if 1.0.0", @@ -2293,7 +2291,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -2627,9 +2625,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aca8bbd8e0707c1887a8bbb7e6b40e228f251ff5d62c8220a4a7a53c73aff006" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ "aho-corasick", "bstr", @@ -2815,9 +2813,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "http-serde" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e272971f774ba29341db2f686255ff8a979365a26fb9e4277f6b6d9ec0cdd5e" +checksum = "6f560b665ad9f1572cfcaf034f7fb84338a7ce945216d64a90fd81f046a3caee" dependencies = [ "http", "serde", @@ -2831,9 +2829,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -3124,7 +3122,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.6", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -3368,7 +3366,7 @@ checksum = "fc2fb41a9bb4257a3803154bdf7e2df7d45197d1941c9b1a90ad815231630721" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3398,9 +3396,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru-cache" @@ -3452,9 +3450,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67827e6ea8ee8a7c4a72227ef4fc08957040acffdb5f122733b24fa12daff41b" +checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" [[package]] name = "maybe-owned" @@ -3567,9 +3565,9 @@ dependencies = [ [[package]] name = "mongodb" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcd85ec209a5b84fd9f54b9e381f6fa17462bc74160d018fc94fd8b9f61faa8" +checksum = "16928502631c0db72214720aa479c722397fe5aed6bf1c740a3830b3fe4bfcfe" dependencies = [ "async-trait", "base64 0.13.1", @@ -3834,9 +3832,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ "bitflags 1.3.2", "cfg-if 1.0.0", @@ -3855,7 +3853,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3875,9 +3873,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" dependencies = [ "cc", "libc", @@ -4050,7 +4048,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -4140,7 +4138,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -4156,39 +4154,39 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap 2.0.0", ] [[package]] name = "pin-project" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -4448,9 +4446,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -4603,9 +4601,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" [[package]] name = "regex-syntax" @@ -4677,9 +4675,9 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4531c89d50effe1fac90d095c8b133c20c5c714204feee0bfc3fd158e784209d" +checksum = "ff44108c7925d082f2861e683a88618b68235ad9cdc60d64d9d1188efc951cdb" dependencies = [ "anyhow", "async-trait", @@ -4853,7 +4851,7 @@ dependencies = [ "quote", "rust-embed-utils", "shellexpand", - "syn 2.0.28", + "syn 2.0.29", "walkdir", ] @@ -4948,11 +4946,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.6" +version = "0.38.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee020b1716f0a80e2ace9b03441a749e402e86712f15f16fe8a8f75afac732f" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", "linux-raw-sys 0.4.5", @@ -4979,7 +4977,7 @@ checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" dependencies = [ "log", "ring", - "rustls-webpki 0.101.2", + "rustls-webpki 0.101.3", "sct", ] @@ -5016,9 +5014,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.2" +version = "0.101.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +checksum = "261e9e0888cba427c3316e6322805653c9425240b6fd96cee7cb671ab70ab8d0" dependencies = [ "ring", "untrusted", @@ -5158,9 +5156,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.180" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] @@ -5176,20 +5174,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "indexmap 2.0.0", "itoa", @@ -5215,7 +5213,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -5376,7 +5374,7 @@ dependencies = [ "anyhow", "async-trait", "axum", - "axum-extra 0.7.5", + "axum-extra 0.7.7", "axum-sessions", "clap", "http", @@ -5410,7 +5408,7 @@ dependencies = [ "serde", "serde_json", "shuttle-common-tests", - "syn 2.0.28", + "syn 2.0.29", "tokio", "trybuild", ] @@ -5960,7 +5958,7 @@ checksum = "8ca69bf415b93b60b80dc8fda3cb4ef52b2336614d8da2de5456cc942a110482" dependencies = [ "atoi", "base64 0.21.2", - "bitflags 2.3.3", + "bitflags 2.4.0", "byteorder", "bytes", "chrono", @@ -6004,7 +6002,7 @@ checksum = "a0db2df1b8731c3651e204629dd55e52adbae0462fa1bdcbed56a2302c18181e" dependencies = [ "atoi", "base64 0.21.2", - "bitflags 2.3.3", + "bitflags 2.4.0", "byteorder", "chrono", "crc", @@ -6136,9 +6134,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -6169,12 +6167,12 @@ version = "0.25.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10081a99cbecbc363d381b9503563785f0b02735fccbb0d4c1a2cb3d39f7e7fe" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "cap-fs-ext", "cap-std", "fd-lock", "io-lifetimes 2.0.2", - "rustix 0.38.6", + "rustix 0.38.8", "windows-sys 0.48.0", "winx 0.36.1", ] @@ -6193,9 +6191,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96d2ffad078296368d46ff1cb309be1c23c513b4ab0e22a45de0185275ac96" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -6268,22 +6266,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -6298,9 +6296,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b79eabcd964882a646b3584543ccabeae7869e9ac32a46f6f22b7a5bd405308b" +checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" dependencies = [ "deranged", "itoa", @@ -6319,9 +6317,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451" dependencies = [ "time-core", ] @@ -6352,11 +6350,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -6365,7 +6362,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] @@ -6388,7 +6385,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -6447,10 +6444,22 @@ dependencies = [ "rustls 0.21.6", "tokio", "tokio-rustls 0.24.1", - "tungstenite", + "tungstenite 0.19.0", "webpki-roots 0.23.1", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.20.0", +] + [[package]] name = "tokio-util" version = "0.7.8" @@ -6652,7 +6661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ "base64 0.21.2", - "bitflags 2.3.3", + "bitflags 2.4.0", "bytes", "futures-core", "futures-util", @@ -6711,7 +6720,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -6841,9 +6850,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a84e0202ea606ba5ebee8507ab2bfbe89b98551ed9b8f0be198109275cff284b" +checksum = "6df60d81823ed9c520ee897489573da4b1d79ffbe006b8134f46de1a1aa03555" dependencies = [ "basic-toml", "glob", @@ -6884,6 +6893,25 @@ dependencies = [ "webpki", ] +[[package]] +name = "tungstenite" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "typed-builder" version = "0.10.0" @@ -7029,9 +7057,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "utoipa" -version = "3.4.3" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c624186f22e625eb8faa777cb33d34cd595aa16d1742aa1d8b6cf35d3e4dda9" +checksum = "d82b1bc5417102a73e8464c686eef947bdfb99fcdfc0a4f228e81afa9526470a" dependencies = [ "indexmap 2.0.0", "serde", @@ -7041,22 +7069,22 @@ dependencies = [ [[package]] name = "utoipa-gen" -version = "3.4.4" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ce5f21ca77e010f5283fa791c6ab892c68b3668a1bdc6b7ac6cf978f5d5b30" +checksum = "05d96dcd6fc96f3df9b3280ef480770af1b7c5d14bc55192baa9b067976d920c" dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "uuid", ] [[package]] name = "utoipa-swagger-ui" -version = "3.1.4" +version = "3.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4602d7100d3cfd8a086f30494e68532402ab662fa366c9d201d677e33cee138d" +checksum = "84614caa239fb25b2bb373a52859ffd94605ceb256eeb1d63436325cf81e3653" dependencies = [ "axum", "mime_guess", @@ -7201,7 +7229,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -7235,7 +7263,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7535,9 +7563,9 @@ dependencies = [ [[package]] name = "wast" -version = "62.0.1" +version = "63.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ae06f09dbe377b889fbd620ff8fa21e1d49d1d9d364983c0cdbf9870cb9f1f" +checksum = "2560471f60a48b77fccefaf40796fda61c97ce1e790b59dfcec9dc3995c9f63a" dependencies = [ "leb128", "memchr", @@ -7547,11 +7575,11 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842e15861d203fb4a96d314b0751cdeaf0f6f8b35e8d81d2953af2af5e44e637" +checksum = "3bdc306c2c4c2f2bf2ba69e083731d0d2a77437fc6a350a19db139636e7e416c" dependencies = [ - "wast 62.0.1", + "wast 63.0.0", ] [[package]] @@ -7566,9 +7594,9 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd222aa310eb7532e3fd427a5d7db7e44bc0b0cf1c1e21139c345325511a85b6" +checksum = "b2c79b77f525a2d670cb40619d7d9c673d09e0666f72c591ebd7861f84a87e57" dependencies = [ "core-foundation", "home", @@ -7615,7 +7643,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" dependencies = [ - "rustls-webpki 0.101.2", + "rustls-webpki 0.101.3", ] [[package]] @@ -7735,7 +7763,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -7753,7 +7781,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -7773,17 +7801,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -7794,9 +7822,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -7806,9 +7834,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -7818,9 +7846,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -7830,9 +7858,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -7842,9 +7870,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -7854,9 +7882,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -7866,15 +7894,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.3" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46aab759304e4d7b2075a9aecba26228bb073ee8c50db796b2c72c676b5d807" +checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" dependencies = [ "memchr", ] @@ -7915,7 +7943,7 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4857cedf8371f690bb6782a3e2b065c54d1b6661be068aaf3eac8b45e813fdf8" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "windows-sys 0.48.0", ] @@ -7975,9 +8003,9 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] From 748acaa3214a5e5cb4128720befdba3f4b010d1a Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:46:52 +0200 Subject: [PATCH 4/8] ci fix --- .circleci/config.yml | 156 ++++++++++++++++++++++++------------------- 1 file changed, 89 insertions(+), 67 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ff2957918..5b8eefb9e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,22 +22,28 @@ executors: commands: restore-cargo-cache: steps: - # Restore cargo cache before installing anything with the cargo command (ie cargo install ...) - restore_cache: - name: Restore cargo cache - keys: - - cargo-{{ checksum "Cargo.lock" }} + name: Restore cargo registry cache + key: cargo-{{ checksum "Cargo.lock" }} + # Don't use fallback key to prevent registry cache from growing indefinitely. - run: name: Install sccache + # 500 MB is the recommended soft cap for a cache on circleci. + # Large integration tests override this default. command: | - export SCCACHE_VERSION='v0.5.3' - ls ~/.cargo/bin/sccache || curl -L https://github.com/mozilla/sccache/releases/download/$SCCACHE_VERSION/sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl.tar.gz | tar -xOz sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl/sccache > ~/.cargo/bin/sccache && chmod +x ~/.cargo/bin/sccache - # This configures Rust to use sccache. - echo 'export "RUSTC_WRAPPER"="sccache"' >> $BASH_ENV - sccache --version + SCCACHE_VERSION='v0.5.4' + ls ~/.cargo/bin/sccache \ + || curl -L https://github.com/mozilla/sccache/releases/download/$SCCACHE_VERSION/sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl.tar.gz \ + | tar -xOz sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl/sccache \ + > ~/.cargo/bin/sccache \ + && chmod +x ~/.cargo/bin/sccache + echo 'export RUSTC_WRAPPER=~/.cargo/bin/sccache' >> $BASH_ENV + echo 'export SCCACHE_CACHE_SIZE=500M' >> $BASH_ENV - restore_cache: name: Restore sccache cache - key: sccache-cache-{{ .Environment.CIRCLE_JOB }} + keys: # This can use fallback due to size limit. + - sccache-cache-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}- + - sccache-cache-{{ .Environment.CIRCLE_JOB }}- save-cargo-cache: steps: - run: @@ -45,18 +51,17 @@ commands: command: sccache --show-stats - save_cache: name: Save sccache cache - # We use {{ epoch }} to always upload a fresh cache: - # Of course, restore_cache will not find this exact key, - # but it will fall back to the closest key (aka the most recent). - # See https://discuss.circleci.com/t/add-mechanism-to-update-existing-cache-key/9014/13 - key: sccache-cache-{{ .Environment.CIRCLE_JOB }}-{{ epoch }} + # We use {{ .Branch }}-{{ .Revision }} to upload a fresh cache for each commit on a branch. + # If a new commit is built, it will fall back on the most recent cache from the same branch. + key: sccache-cache-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .Revision }} paths: - "~/.cache/sccache" - save_cache: name: Save cargo cache - key: cargo-{{ checksum "Cargo.lock" }}-{{ epoch }} + key: cargo-{{ checksum "Cargo.lock" }} paths: - - ~/.cargo + - ~/.cargo/registry + - ~/.cargo/git restore-buildx-cache: steps: - docker-buildx/install: @@ -66,11 +71,9 @@ commands: name: Restore buildx cache keys: # Try lock cache first - - docker-buildx-{{ checksum "./Cargo.lock" }} + - docker-buildx-{{ checksum "Cargo.lock" }} # Try branch cache next - docker-buildx-{{ .Branch }} - # Fallback to main cache - - docker-buildx-main - run: name: Configure buildx cache command: export BUILDX_CACHE=/tmp/cache/buildx @@ -80,7 +83,7 @@ commands: name: Save buildx cache paths: - "/tmp/cache/buildx" - key: docker-buildx-{{ checksum "./Cargo.lock" }}-{{ epoch }} + key: docker-buildx-{{ checksum "Cargo.lock" }}-{{ epoch }} when: always apply-patches: steps: @@ -121,8 +124,9 @@ commands: - run: name: Install Rust command: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.70.0 --target add wasm32-wasi - sudo apt update && sudo apt install -y libssl1.1 + which cargo || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.70.0 + # sudo apt update && sudo apt install -y libssl1.1 + - run: rustup target add wasm32-wasi install-protoc: steps: - run: @@ -132,7 +136,7 @@ commands: VERSION: "22.2" command: | curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v$VERSION/protoc-$VERSION-$ARCH.zip" && \ - unzip -o "protoc-$VERSION-$ARCH.zip" bin/protoc "include/*" -d /usr/local && \ + sudo unzip -o "protoc-$VERSION-$ARCH.zip" bin/protoc "include/*" -d /usr/local && \ rm -f "protoc-$VERSION-$ARCH.zip" make-artifact: parameters: @@ -170,24 +174,6 @@ commands: paths: - << parameters.target >>/* - << parameters.target >>.env - do-integration: - steps: - - install-rust - - checkout - - run: git submodule sync - - run: git submodule update --init - - restore-cargo-cache - - apply-patches - - run: - name: Run unit tests - command: cargo test --package << parameters.crate >> --all-features --lib -- --nocapture - - run: - name: Run integration tests - # Only run integration tests if there are any - command: | - set +o pipefail - (cargo test --package << parameters.crate >> --all-features --test '*' -- --list 2>&1 | grep -q "no test target matches pattern") && echo "nothing to test" || cargo test --package << parameters.crate >> --all-features --test '*' -- --nocapture - - save-cargo-cache jobs: workspace: @@ -198,22 +184,19 @@ jobs: - restore-cargo-cache # Check this to make sure we do not include patched dependencies in # the Cargo.lock. - - run: - command: | - [ -z $(grep "\[\[patch.unused\]\]" Cargo.lock) ] + - run: '[ -z $(grep "\[\[patch.unused\]\]" Cargo.lock) ]' - run: cargo fmt --all --check # TODO: this is incompatible with workspace inheritance, uncomment when # https://github.com/DevinR528/cargo-sort/pull/29 is merged - # - run: cargo install cargo-sort + # - run: # install binstall with script + # - run: cargo binstall cargo-sort # - run: cargo sort --check --workspace - run: | cargo clippy --tests \ --all-targets \ --all-features \ --no-deps -- \ - --D warnings \ - -A clippy::let-unit-value \ - -A clippy::format-push-string + --D warnings - save-cargo-cache test-standalone: parameters: @@ -232,7 +215,8 @@ jobs: - run: cargo fmt --all --check --manifest-path << parameters.path >>/Cargo.toml # TODO: this is incompatible with workspace inheritance, uncomment when # https://github.com/DevinR528/cargo-sort/pull/29 is merged - # - run: cargo install cargo-sort + # - run: # install binstall with script + # - run: cargo binstall cargo-sort # - run: cargo sort --check << parameters.path >> - run: | cargo clippy --tests \ @@ -241,7 +225,11 @@ jobs: --manifest-path << parameters.path >>/Cargo.toml \ --no-deps -- \ --D warnings - - run: cargo test << parameters.features >> --manifest-path << parameters.path >>/Cargo.toml -- --nocapture + - run: | + cargo test << parameters.features >> \ + --manifest-path << parameters.path >>/Cargo.toml \ + -- \ + --nocapture - save-cargo-cache test-workspace-member: parameters: @@ -249,8 +237,8 @@ jobs: description: "Crate in workspace to test" type: string executor: docker-rust - resource_class: medium+ steps: + - run: rustup target add wasm32-wasi - checkout - restore-cargo-cache - run: cargo test --package << parameters.crate >> --all-features -- --nocapture @@ -261,9 +249,26 @@ jobs: description: "Crate in workspace to test" type: string executor: docker-rust - resource_class: medium+ + resource_class: large steps: - - do-integration + - install-rust + - install-protoc + - checkout + - run: git submodule update --init + - restore-cargo-cache + - apply-patches + - run: + name: Run unit tests + command: cargo test --package << parameters.crate >> --all-features --lib -- --nocapture + - run: + name: Run integration tests + # Only run integration tests if there are any + command: | + set +o pipefail + (cargo test --package << parameters.crate >> --all-features --test '*' -- --list 2>&1 | grep -q "no test target matches pattern") \ + && echo "nothing to test" \ + || cargo test --package << parameters.crate >> --all-features --test '*' -- --nocapture + - save-cargo-cache test-workspace-member-integration-machine: parameters: crate: @@ -272,13 +277,32 @@ jobs: # Using a machine image since tests will start a docker container executor: machine-ubuntu steps: - - do-integration + - install-rust + - install-protoc + - checkout + - run: git submodule update --init + - restore-cargo-cache + - apply-patches + - run: + name: Run unit tests + command: | + SCCACHE_CACHE_SIZE=2G + cargo test --package << parameters.crate >> --all-features --lib -- --nocapture + - run: + name: Run integration tests + # Only run integration tests if there are any + command: | + SCCACHE_CACHE_SIZE=2G + set +o pipefail + (cargo test --package << parameters.crate >> --all-features --test '*' -- --list 2>&1 | grep -q "no test target matches pattern") \ + && echo "nothing to test" \ + || cargo test --package << parameters.crate >> --all-features --test '*' -- --nocapture + - save-cargo-cache e2e-test: executor: machine-ubuntu steps: - install-rust - checkout - - run: git submodule sync - run: git submodule update --init - restore-buildx-cache - run: @@ -298,11 +322,13 @@ jobs: SHUTTLE_TESTS_NETWORK=shuttle-dev_user-net SHUTTLE_TESTS_RUNTIME_IMAGE=public.ecr.aws/shuttle-dev/deployer:latest cargo test --package shuttle-gateway --all-features --lib -- --nocapture + # runs tests in e2e crate BUILDX_CACHE=/tmp/cache/buildx make test - save_cache: + name: Save buildx cache paths: - "/tmp/cache/buildx" - key: docker-buildx-{{ .Branch }} + key: docker-buildx-{{ .Branch }}-{{ .Revision }} when: always build-and-push: executor: machine-ubuntu @@ -497,8 +523,8 @@ jobs: name: "Set tag in environment" command: | for file in artifacts/*.env; do - cat artifacts/${file##*/} >> "$BASH_ENV"; - rm artifacts/${file##*/}; + cat artifacts/${file##*/} >> $BASH_ENV + rm artifacts/${file##*/} done - run: name: "Publish Release on GitHub" @@ -531,7 +557,6 @@ jobs: command: ./.circleci/qa.sh linux environment: SHUTTLE_API: https://api.unstable.shuttle.rs - - run: git submodule sync - run: git submodule update --init - run: name: Test WASM @@ -562,7 +587,6 @@ jobs: command: ./.circleci/qa.sh mac environment: SHUTTLE_API: https://api.unstable.shuttle.rs - - run: git submodule sync - run: git submodule update --init - run: name: Test WASM @@ -607,7 +631,6 @@ jobs: command: ./.circleci/qa.ps1 environment: SHUTTLE_API: https://api.unstable.shuttle.rs - - run: git submodule sync - run: git submodule update --init # - run: # name: Test WASM @@ -658,8 +681,7 @@ workflows: - services/shuttle-tower - services/shuttle-warp - test-standalone: - # shuttle-shared-db has mutually exclusive features - # so we run checks for each feature separately + # Has mutually exclusive features, so we run checks for each feature separately name: "resources/shared-db: << matrix.features >>" matrix: alias: test-standalone-shared-db @@ -672,7 +694,7 @@ workflows: - "-F postgres-rustls" ############ This crate has no tests, therefore excluded. # - test-standalone: - # # Has mutually exclusive features, so we run checks for each feature separately + # # Has mutually exclusive features, so we run checks for each feature separately # name: "resources/aws-rds: << matrix.features >>" # matrix: # alias: test-standalone-aws-rds @@ -703,7 +725,6 @@ workflows: - shuttle-codegen - shuttle-deployer - shuttle-proto - - shuttle-provisioner - shuttle-resource-recorder - shuttle-runtime - shuttle-service @@ -712,8 +733,9 @@ workflows: matrix: parameters: crate: - # needs to spawn docker containers, therefore in a machine + # need to spawn docker containers, therefore in a machine - cargo-shuttle + - shuttle-provisioner - e2e-test: requires: - test-standalone From 0b3c73010357efce9661032b65a62bfc4ac215f7 Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Tue, 22 Aug 2023 01:36:07 +0200 Subject: [PATCH 5/8] cargo update --- Cargo.lock | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eceba5377..55759610a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2638,9 +2638,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -3106,7 +3106,7 @@ dependencies = [ "socket2 0.5.3", "widestring", "windows-sys 0.48.0", - "winreg 0.50.0", + "winreg", ] [[package]] @@ -4635,9 +4635,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "20b9b67e2ca7dd9e9f9285b759de30ff538aab981abaaf7bc9bd90b84a0126c3" dependencies = [ "base64 0.21.2", "bytes", @@ -4669,8 +4669,8 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.22.6", - "winreg 0.10.1", + "webpki-roots 0.25.2", + "winreg", ] [[package]] @@ -6953,9 +6953,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -7646,6 +7646,12 @@ dependencies = [ "rustls-webpki 0.101.3", ] +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + [[package]] name = "which" version = "4.4.0" @@ -7907,15 +7913,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.50.0" From 404bc0d7dd8f7377ed4bbc50fb0ef972043ff1e0 Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Tue, 22 Aug 2023 15:32:16 +0200 Subject: [PATCH 6/8] aws-rds macro use full paths --- resources/aws-rds/src/lib.rs | 48 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/resources/aws-rds/src/lib.rs b/resources/aws-rds/src/lib.rs index 7087fbf37..08eb72223 100644 --- a/resources/aws-rds/src/lib.rs +++ b/resources/aws-rds/src/lib.rs @@ -1,33 +1,27 @@ #![doc = include_str!("../README.md")] -#![allow(unused_imports)] - -use async_trait::async_trait; -use paste::paste; -use serde::Serialize; -use shuttle_service::{ - database::{self, AwsRdsEngine}, - error::CustomError, - DbInput, DbOutput, Factory, ResourceBuilder, Type, -}; macro_rules! aws_engine { ($feature:expr, $pool_path:path, $options_path:path, $struct_ident:ident) => { - paste! { - #[derive(Serialize)] + paste::paste! { + #[derive(serde::Serialize)] #[cfg(feature = $feature)] #[doc = "A resource connected to an AWS RDS " $struct_ident " instance"] pub struct $struct_ident{ - config: DbInput, + config: shuttle_service::DbInput, } #[cfg(feature = $feature)] #[doc = "Gets a `sqlx::Pool` connected to an AWS RDS " $struct_ident " instance"] - #[async_trait] - impl ResourceBuilder<$pool_path> for $struct_ident { - const TYPE: Type = Type::Database(database::Type::AwsRds(AwsRdsEngine::$struct_ident)); + #[async_trait::async_trait] + impl shuttle_service::ResourceBuilder<$pool_path> for $struct_ident { + const TYPE: shuttle_service::Type = shuttle_service::Type::Database( + shuttle_service::database::Type::AwsRds( + shuttle_service::database::AwsRdsEngine::$struct_ident + ) + ); - type Config = DbInput; - type Output = DbOutput; + type Config = shuttle_service::DbInput; + type Output = shuttle_service::DbOutput; fn new() -> Self { Self { config: Default::default() } @@ -37,20 +31,20 @@ macro_rules! aws_engine { &self.config } - async fn output(self, factory: &mut dyn Factory) -> Result { + async fn output(self, factory: &mut dyn shuttle_service::Factory) -> Result { let info = match factory.get_environment() { - shuttle_service::Environment::Production => DbOutput::Info( + shuttle_service::Environment::Production => shuttle_service::DbOutput::Info( factory - .get_db_connection(database::Type::AwsRds(AwsRdsEngine::$struct_ident)) + .get_db_connection(shuttle_service::database::Type::AwsRds(shuttle_service::database::AwsRdsEngine::$struct_ident)) .await? ), shuttle_service::Environment::Local => { if let Some(local_uri) = self.config.local_uri { - DbOutput::Local(local_uri) + shuttle_service::DbOutput::Local(local_uri) } else { - DbOutput::Info( + shuttle_service::DbOutput::Info( factory - .get_db_connection(database::Type::AwsRds(AwsRdsEngine::$struct_ident)) + .get_db_connection(shuttle_service::database::Type::AwsRds(shuttle_service::database::AwsRdsEngine::$struct_ident)) .await? ) } @@ -62,8 +56,8 @@ macro_rules! aws_engine { async fn build(build_data: &Self::Output) -> Result<$pool_path, shuttle_service::Error> { let connection_string = match build_data { - DbOutput::Local(local_uri) => local_uri.clone(), - DbOutput::Info(info) => info.connection_string_private(), + shuttle_service::DbOutput::Local(local_uri) => local_uri.clone(), + shuttle_service::DbOutput::Info(info) => info.connection_string_private(), }; let pool = $options_path::new() @@ -71,7 +65,7 @@ macro_rules! aws_engine { .max_connections(5) .connect(&connection_string) .await - .map_err(CustomError::new)?; + .map_err(shuttle_service::error::CustomError::new)?; Ok(pool) } From 8c3a20c9a5271971300b6034cf4c238e98c6fc69 Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:16:24 +0200 Subject: [PATCH 7/8] remove comments --- .circleci/config.yml | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b8eefb9e..ea9e75156 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -182,15 +182,9 @@ jobs: steps: - checkout - restore-cargo-cache - # Check this to make sure we do not include patched dependencies in - # the Cargo.lock. + # Check this to make sure we do not include patched dependencies in the Cargo.lock - run: '[ -z $(grep "\[\[patch.unused\]\]" Cargo.lock) ]' - run: cargo fmt --all --check - # TODO: this is incompatible with workspace inheritance, uncomment when - # https://github.com/DevinR528/cargo-sort/pull/29 is merged - # - run: # install binstall with script - # - run: cargo binstall cargo-sort - # - run: cargo sort --check --workspace - run: | cargo clippy --tests \ --all-targets \ @@ -213,11 +207,6 @@ jobs: - restore-cargo-cache - apply-patches - run: cargo fmt --all --check --manifest-path << parameters.path >>/Cargo.toml - # TODO: this is incompatible with workspace inheritance, uncomment when - # https://github.com/DevinR528/cargo-sort/pull/29 is merged - # - run: # install binstall with script - # - run: cargo binstall cargo-sort - # - run: cargo sort --check << parameters.path >> - run: | cargo clippy --tests \ --all-targets \ @@ -692,22 +681,6 @@ workflows: - "-F mongodb" - "-F postgres" - "-F postgres-rustls" - ############ This crate has no tests, therefore excluded. - # - test-standalone: - # # Has mutually exclusive features, so we run checks for each feature separately - # name: "resources/aws-rds: << matrix.features >>" - # matrix: - # alias: test-standalone-aws-rds - # parameters: - # path: - # - resources/aws-rds - # features: - # - "-F postgres" - # - "-F postgres-rustls" - # - "-F mysql" - # - "-F mysql-rustls" - # - "-F mariadb" - # - "-F mariadb-rustls" - test-workspace-member: name: << matrix.crate >> matrix: @@ -740,7 +713,6 @@ workflows: requires: - test-standalone - test-standalone-shared-db - # - test-standalone-aws-rds - test-workspace-member - test-workspace-member-integration-machine filters: From 42dba07ca4df8d32c6a62abf92ab15ddd758cda1 Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:17:53 +0200 Subject: [PATCH 8/8] clarify flags --- resources/aws-rds/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/aws-rds/README.md b/resources/aws-rds/README.md index d42078797..d62c5e194 100644 --- a/resources/aws-rds/README.md +++ b/resources/aws-rds/README.md @@ -8,7 +8,10 @@ This plugin provisions databases on AWS RDS using [shuttle](https://www.shuttle. ## Usage -Add `shuttle-aws-rds` to the dependencies for your service. Every engine is behind the following feature flags and attribute paths: +Add `shuttle-aws-rds` to the dependencies for your service. +Every engine is behind the following feature flags and attribute paths. +The default is to use native TLS. +You can also add `-rustls` after the feature flag, for example `postgres-rustls`. | Engine | Feature flag | Attribute path | |----------|--------------|---------------------------| @@ -16,8 +19,6 @@ Add `shuttle-aws-rds` to the dependencies for your service. Every engine is behi | MySql | mysql | shuttle_aws_rds::MySql | | MariaDB | mariadb | shuttle_aws_rds::MariaDB | -Note: You can also add `-rustls` after the feature flag, `postgres-rustls` etc - An example using the Tide framework can be found on [GitHub](https://github.com/shuttle-hq/shuttle-examples/tree/main/tide/postgres) ### Options