From 2e38147a29dd7c98da228d5940919421f1c3826d Mon Sep 17 00:00:00 2001 From: chesedo Date: Fri, 21 Oct 2022 19:31:47 +0200 Subject: [PATCH 01/10] chore: v0.7.1 --- Cargo.lock | 12 ++++++++++++ cargo-shuttle/Cargo.toml | 6 +++--- codegen/Cargo.toml | 2 +- common/Cargo.toml | 2 +- deployer/Cargo.toml | 8 ++++---- docker-compose.yml | 1 + gateway/Cargo.toml | 4 ++-- proto/Cargo.toml | 4 ++-- provisioner/Cargo.toml | 4 ++-- service/Cargo.toml | 6 +++--- shell.nix | 2 ++ 11 files changed, 33 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3dbbf2dd1..4355ec161 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7376,3 +7376,15 @@ name = "zeroize" version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94693807d016b2f2d2e14420eb3bfcca689311ff775dcf113d74ea624b7cdf07" + +[[patch.unused]] +name = "shuttle-aws-rds" +version = "0.7.0" + +[[patch.unused]] +name = "shuttle-persist" +version = "0.7.0" + +[[patch.unused]] +name = "shuttle-shared-db" +version = "0.7.0" diff --git a/cargo-shuttle/Cargo.toml b/cargo-shuttle/Cargo.toml index 00ed551af..0c0e8c7ef 100644 --- a/cargo-shuttle/Cargo.toml +++ b/cargo-shuttle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-shuttle" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "Apache-2.0" description = "A cargo command for the shuttle platform (https://www.shuttle.rs/)" @@ -40,7 +40,7 @@ uuid = { version = "1.1.2", features = ["v4"] } webbrowser = "0.7.1" [dependencies.shuttle-common] -version = "0.7.0" +version = "0.7.1" path = "../common" [dependencies.shuttle-secrets] @@ -48,7 +48,7 @@ version = "0.7.0" path = "../resources/secrets" [dependencies.shuttle-service] -version = "0.7.0" +version = "0.7.1" path = "../service" features = ["loader"] diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index df1bb4d26..9c74dab95 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-codegen" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "Apache-2.0" description = "Proc-macro code generator for the shuttle.rs service" diff --git a/common/Cargo.toml b/common/Cargo.toml index 8b10d111a..8f125094b 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-common" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "Apache-2.0" description = "Common library for the shuttle platform (https://www.shuttle.rs/)" diff --git a/deployer/Cargo.toml b/deployer/Cargo.toml index 2e6ea3cb8..6b3201bea 100644 --- a/deployer/Cargo.toml +++ b/deployer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-deployer" -version = "0.7.0" +version = "0.7.1" edition = "2021" description = "Service with instances created per project for handling the compilation, loading, and execution of Shuttle services" @@ -42,15 +42,15 @@ tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } uuid = { version = "1.1.2", features = ["v4"] } [dependencies.shuttle-common] -version = "0.7.0" +version = "0.7.1" path = "../common" [dependencies.shuttle-proto] -version = "0.7.0" +version = "0.7.1" path = "../proto" [dependencies.shuttle-service] -version = "0.7.0" +version = "0.7.1" path = "../service" features = ["loader"] diff --git a/docker-compose.yml b/docker-compose.yml index 63960ad78..689ad2c47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -131,6 +131,7 @@ services: - DD_APM_NON_LOCAL_TRAFFIC=true - DD_SITE=datadoghq.eu - DD_API_KEY=${DD_API_KEY} + - DD_ENV=unstable deploy: placement: constraints: diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index 034d66282..be224349c 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-gateway" -version = "0.7.0" +version = "0.7.1" edition = "2021" publish = false @@ -33,7 +33,7 @@ tracing-opentelemetry = "0.17.4" tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } [dependencies.shuttle-common] -version = "0.7.0" +version = "0.7.1" path = "../common" [dev-dependencies] diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 0ae1a34d9..30be7f732 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-proto" -version = "0.7.0" +version = "0.7.1" edition = "2021" publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -10,7 +10,7 @@ prost = "0.11.0" tonic = "0.8.0" [dependencies.shuttle-common] -version = "0.7.0" +version = "0.7.1" path = "../common" [build-dependencies] diff --git a/provisioner/Cargo.toml b/provisioner/Cargo.toml index 69954ecc2..7e0e3531f 100644 --- a/provisioner/Cargo.toml +++ b/provisioner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-provisioner" -version = "0.7.0" +version = "0.7.1" edition = "2021" description = "Service responsible for provisioning and managing resources for services" publish = false @@ -23,7 +23,7 @@ tracing = "0.1.36" tracing-subscriber = "0.3.15" [dependencies.shuttle-proto] -version = "0.7.0" +version = "0.7.1" path = "../proto" [dev-dependencies] diff --git a/service/Cargo.toml b/service/Cargo.toml index 5b1695b93..c782f5183 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-service" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "Apache-2.0" description = "Service traits and macros to deploy on the shuttle platform (https://www.shuttle.rs/)" @@ -46,7 +46,7 @@ optional = true features = ["tokio1"] [dependencies.shuttle-codegen] -version = "0.7.0" +version = "0.7.1" path = "../codegen" optional = true @@ -57,7 +57,7 @@ tokio = { version = "1.20.1", features = ["macros"] } uuid = { version = "1.1.2", features = ["v4"] } [dependencies.shuttle-common] -version = "0.7.0" +version = "0.7.1" default-features = false path = "../common" diff --git a/shell.nix b/shell.nix index ab73c0578..a4e8e5e3f 100644 --- a/shell.nix +++ b/shell.nix @@ -14,6 +14,8 @@ in (rustChannelOf{ channel = "1.63.0"; }).rust rust-analyzer cargo-watch + gdb + nodejs terraform awscli2 websocat From 7a1f9cd304f43734a1bf4524b816caeea140bd6e Mon Sep 17 00:00:00 2001 From: chesedo Date: Fri, 21 Oct 2022 19:35:30 +0200 Subject: [PATCH 02/10] chore: resources v0.7.1 --- Cargo.lock | 30 +++++++++--------------------- resources/aws-rds/Cargo.toml | 4 ++-- resources/persist/Cargo.toml | 6 +++--- resources/secrets/Cargo.toml | 4 ++-- resources/shared-db/Cargo.toml | 4 ++-- 5 files changed, 18 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4355ec161..f7dbde22f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1181,7 +1181,7 @@ dependencies = [ [[package]] name = "cargo-shuttle" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "async-trait", @@ -5252,7 +5252,7 @@ checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" [[package]] name = "shuttle-codegen" -version = "0.7.0" +version = "0.7.1" dependencies = [ "pretty_assertions", "proc-macro-error", @@ -5264,7 +5264,7 @@ dependencies = [ [[package]] name = "shuttle-common" -version = "0.7.0" +version = "0.7.1" dependencies = [ "chrono", "comfy-table", @@ -5281,7 +5281,7 @@ dependencies = [ [[package]] name = "shuttle-deployer" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "async-trait", @@ -5328,7 +5328,7 @@ dependencies = [ [[package]] name = "shuttle-gateway" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "async-trait", @@ -5365,7 +5365,7 @@ dependencies = [ [[package]] name = "shuttle-proto" -version = "0.7.0" +version = "0.7.1" dependencies = [ "prost", "shuttle-common", @@ -5375,7 +5375,7 @@ dependencies = [ [[package]] name = "shuttle-provisioner" -version = "0.7.0" +version = "0.7.1" dependencies = [ "aws-config", "aws-sdk-rds", @@ -5401,7 +5401,7 @@ dependencies = [ [[package]] name = "shuttle-secrets" -version = "0.7.0" +version = "0.7.1" dependencies = [ "async-trait", "shuttle-service", @@ -5410,7 +5410,7 @@ dependencies = [ [[package]] name = "shuttle-service" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "async-std", @@ -7376,15 +7376,3 @@ name = "zeroize" version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94693807d016b2f2d2e14420eb3bfcca689311ff775dcf113d74ea624b7cdf07" - -[[patch.unused]] -name = "shuttle-aws-rds" -version = "0.7.0" - -[[patch.unused]] -name = "shuttle-persist" -version = "0.7.0" - -[[patch.unused]] -name = "shuttle-shared-db" -version = "0.7.0" diff --git a/resources/aws-rds/Cargo.toml b/resources/aws-rds/Cargo.toml index 1b17ac11a..89ea8fa5d 100644 --- a/resources/aws-rds/Cargo.toml +++ b/resources/aws-rds/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-aws-rds" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "Apache-2.0" description = "Plugin to provision AWS RDS resources" @@ -10,7 +10,7 @@ keywords = ["shuttle-service", "rds"] [dependencies] async-trait = "0.1.56" paste = "1.0.7" -shuttle-service = { path = "../../service", version = "0.7.0", default-features = false } +shuttle-service = { path = "../../service", version = "0.7.1", default-features = false } sqlx = { version = "0.6.0", features = ["runtime-tokio-native-tls"] } tokio = { version = "1.19.2", features = ["rt"] } diff --git a/resources/persist/Cargo.toml b/resources/persist/Cargo.toml index ee13d37f3..200d8ee11 100644 --- a/resources/persist/Cargo.toml +++ b/resources/persist/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-persist" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "Apache-2.0" description = "Plugin for persist objects" @@ -11,7 +11,7 @@ keywords = ["shuttle-service", "persistence"] async-trait = "0.1.56" bincode = "1.2.1" serde = { version = "1.0.0", features = ["derive"] } -shuttle-common = { path = "../../common", version = "0.7.0" } -shuttle-service = { path = "../../service", version = "0.7.0", default-features = false } +shuttle-common = { path = "../../common", version = "0.7.1" } +shuttle-service = { path = "../../service", version = "0.7.1", default-features = false } thiserror = "1.0.32" tokio = { version = "1.19.2", features = ["rt"] } diff --git a/resources/secrets/Cargo.toml b/resources/secrets/Cargo.toml index 0bbecd62c..4b6b033c9 100644 --- a/resources/secrets/Cargo.toml +++ b/resources/secrets/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-secrets" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "Apache-2.0" description = "Plugin to for managing secrets on shuttle" @@ -9,5 +9,5 @@ keywords = ["shuttle-service", "secrets"] [dependencies] async-trait = "0.1.56" -shuttle-service = { path = "../../service", version = "0.7.0", default-features = false } +shuttle-service = { path = "../../service", version = "0.7.1", default-features = false } tokio = { version = "1.19.2", features = ["rt"] } diff --git a/resources/shared-db/Cargo.toml b/resources/shared-db/Cargo.toml index fce73e2cf..0023938c5 100644 --- a/resources/shared-db/Cargo.toml +++ b/resources/shared-db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle-shared-db" -version = "0.7.0" +version = "0.7.1" edition = "2021" license = "Apache-2.0" description = "Plugin for managing shared databases on shuttle" @@ -10,7 +10,7 @@ keywords = ["shuttle-service", "database"] [dependencies] async-trait = "0.1.56" mongodb = { version = "2.3.0", optional = true } -shuttle-service = { path = "../../service", version = "0.7.0", default-features = false } +shuttle-service = { path = "../../service", version = "0.7.1", default-features = false } sqlx = { version = "0.6.1", features = ["runtime-tokio-native-tls"], optional = true } tokio = { version = "1.19.2", features = ["rt"] } From 8facdcb6798da62182a037a7ad47fb8882585ec3 Mon Sep 17 00:00:00 2001 From: chesedo Date: Fri, 21 Oct 2022 19:42:24 +0200 Subject: [PATCH 03/10] docs: v0.7.1 --- cargo-shuttle/Cargo.toml | 2 +- cargo-shuttle/README.md | 2 +- examples/axum/hello-world/Cargo.toml | 2 +- examples/axum/websocket/Cargo.toml | 2 +- examples/poem/hello-world/Cargo.toml | 2 +- examples/poem/mongodb/Cargo.toml | 4 ++-- examples/poem/postgres/Cargo.toml | 4 ++-- examples/rocket/authentication/Cargo.toml | 2 +- examples/rocket/hello-world/Cargo.toml | 2 +- examples/rocket/persist/Cargo.toml | 4 ++-- examples/rocket/postgres/Cargo.toml | 4 ++-- examples/rocket/secrets/Cargo.toml | 4 ++-- examples/rocket/url-shortener/Cargo.toml | 4 ++-- examples/salvo/hello-world/Cargo.toml | 2 +- examples/serenity/hello-world/Cargo.toml | 4 ++-- examples/serenity/postgres/Cargo.toml | 6 +++--- examples/thruster/hello-world/Cargo.toml | 2 +- examples/thruster/postgres/Cargo.toml | 4 ++-- examples/tide/hello-world/Cargo.toml | 2 +- examples/tide/postgres/Cargo.toml | 4 ++-- examples/tower/hello-world/Cargo.toml | 2 +- examples/warp/hello-world/Cargo.toml | 2 +- service/src/lib.rs | 4 ++-- 23 files changed, 35 insertions(+), 35 deletions(-) diff --git a/cargo-shuttle/Cargo.toml b/cargo-shuttle/Cargo.toml index 0c0e8c7ef..4cf1ff9fb 100644 --- a/cargo-shuttle/Cargo.toml +++ b/cargo-shuttle/Cargo.toml @@ -44,7 +44,7 @@ version = "0.7.1" path = "../common" [dependencies.shuttle-secrets] -version = "0.7.0" +version = "0.7.1" path = "../resources/secrets" [dependencies.shuttle-service] diff --git a/cargo-shuttle/README.md b/cargo-shuttle/README.md index 691b861d9..3abb20977 100644 --- a/cargo-shuttle/README.md +++ b/cargo-shuttle/README.md @@ -90,7 +90,7 @@ $ cargo shuttle init --rocket my-rocket-app This should generate the following dependency in `Cargo.toml`: ```toml -shuttle-service = { version = "0.7.0", features = ["web-rocket"] } +shuttle-service = { version = "0.7.1", features = ["web-rocket"] } ``` The following boilerplate code should be generated into `src/lib.rs`: diff --git a/examples/axum/hello-world/Cargo.toml b/examples/axum/hello-world/Cargo.toml index 2ed0f8c58..ee22baad8 100644 --- a/examples/axum/hello-world/Cargo.toml +++ b/examples/axum/hello-world/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [dependencies] axum = "0.5" -shuttle-service = { version = "0.7.0", features = ["web-axum"] } +shuttle-service = { version = "0.7.1", features = ["web-axum"] } sync_wrapper = "0.1" diff --git a/examples/axum/websocket/Cargo.toml b/examples/axum/websocket/Cargo.toml index be6492154..3aebb9efd 100644 --- a/examples/axum/websocket/Cargo.toml +++ b/examples/axum/websocket/Cargo.toml @@ -13,6 +13,6 @@ hyper = { version = "0.14", features = ["client", "http2"] } hyper-tls = "0.5" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -shuttle-service = { version = "0.7.0", features = ["web-axum"] } +shuttle-service = { version = "0.7.1", features = ["web-axum"] } sync_wrapper = "0.1" tokio = { version = "1", features = ["full"] } diff --git a/examples/poem/hello-world/Cargo.toml b/examples/poem/hello-world/Cargo.toml index 74a34fded..bc905ee44 100644 --- a/examples/poem/hello-world/Cargo.toml +++ b/examples/poem/hello-world/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" [dependencies] poem = "1.3.35" -shuttle-service = { version = "0.7.0", features = ["web-poem"] } +shuttle-service = { version = "0.7.1", features = ["web-poem"] } diff --git a/examples/poem/mongodb/Cargo.toml b/examples/poem/mongodb/Cargo.toml index 41f6389b2..e079f6413 100644 --- a/examples/poem/mongodb/Cargo.toml +++ b/examples/poem/mongodb/Cargo.toml @@ -8,5 +8,5 @@ mongodb = "2.3.0" poem = "1.3.35" serde = { version = "1", features = ["derive"] } serde_json = "1" -shuttle-service = { version = "0.7.0", features = ["web-poem"] } -shuttle-shared-db = { version = "0.7.0", features = ["mongodb"] } +shuttle-service = { version = "0.7.1", features = ["web-poem"] } +shuttle-shared-db = { version = "0.7.1", features = ["mongodb"] } diff --git a/examples/poem/postgres/Cargo.toml b/examples/poem/postgres/Cargo.toml index 5eb3e6b6e..6557282e2 100644 --- a/examples/poem/postgres/Cargo.toml +++ b/examples/poem/postgres/Cargo.toml @@ -8,6 +8,6 @@ edition = "2021" [dependencies] poem = "1.3.35" serde = "1.0" -shuttle-service = { version = "0.7.0", features = ["web-poem"] } -shuttle-shared-db = { version = "0.7.0", features = ["postgres"] } +shuttle-service = { version = "0.7.1", features = ["web-poem"] } +shuttle-shared-db = { version = "0.7.1", features = ["postgres"] } sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] } diff --git a/examples/rocket/authentication/Cargo.toml b/examples/rocket/authentication/Cargo.toml index 1b7fb7a03..e7eef860a 100644 --- a/examples/rocket/authentication/Cargo.toml +++ b/examples/rocket/authentication/Cargo.toml @@ -11,4 +11,4 @@ jsonwebtoken = { version = "8", default-features = false } lazy_static = "1.4" rocket = { version = "0.5.0-rc.2", features = ["json"] } serde = { version = "1.0", features = ["derive"] } -shuttle-service = { version = "0.7.0", features = ["web-rocket"] } +shuttle-service = { version = "0.7.1", features = ["web-rocket"] } diff --git a/examples/rocket/hello-world/Cargo.toml b/examples/rocket/hello-world/Cargo.toml index 0c179d821..94887289d 100644 --- a/examples/rocket/hello-world/Cargo.toml +++ b/examples/rocket/hello-world/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" [dependencies] rocket = "0.5.0-rc.2" -shuttle-service = { version = "0.7.0", features = ["web-rocket"] } +shuttle-service = { version = "0.7.1", features = ["web-rocket"] } diff --git a/examples/rocket/persist/Cargo.toml b/examples/rocket/persist/Cargo.toml index 1d893c6b6..285dce46e 100644 --- a/examples/rocket/persist/Cargo.toml +++ b/examples/rocket/persist/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" [dependencies] rocket = { version = "0.5.0-rc.1", features = ["json"] } serde = { version = "1.0", features = ["derive"] } -shuttle-persist = "0.7.0" -shuttle-service = { version = "0.7.0", features = ["web-rocket"] } +shuttle-persist = "0.7.1" +shuttle-service = { version = "0.7.1", features = ["web-rocket"] } diff --git a/examples/rocket/postgres/Cargo.toml b/examples/rocket/postgres/Cargo.toml index aca7ced72..edda36e71 100644 --- a/examples/rocket/postgres/Cargo.toml +++ b/examples/rocket/postgres/Cargo.toml @@ -8,6 +8,6 @@ edition = "2021" [dependencies] rocket = { version = "0.5.0-rc.1", features = ["json"] } serde = "1.0" -shuttle-service = { version = "0.7.0", features = ["web-rocket"] } -shuttle-shared-db = { version = "0.7.0", features = ["postgres"] } +shuttle-service = { version = "0.7.1", features = ["web-rocket"] } +shuttle-shared-db = { version = "0.7.1", features = ["postgres"] } sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] } diff --git a/examples/rocket/secrets/Cargo.toml b/examples/rocket/secrets/Cargo.toml index 9526d6a60..78b4f135d 100644 --- a/examples/rocket/secrets/Cargo.toml +++ b/examples/rocket/secrets/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" [dependencies] anyhow = "1.0.62" rocket = { version = "0.5.0-rc.1", features = ["json"] } -shuttle-secrets = "0.7.0" -shuttle-service = { version = "0.7.0", features = ["web-rocket"] } +shuttle-secrets = "0.7.1" +shuttle-service = { version = "0.7.1", features = ["web-rocket"] } diff --git a/examples/rocket/url-shortener/Cargo.toml b/examples/rocket/url-shortener/Cargo.toml index d33cba841..17ff48d46 100644 --- a/examples/rocket/url-shortener/Cargo.toml +++ b/examples/rocket/url-shortener/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" nanoid = "0.4" rocket = { version = "0.5.0-rc.2", features = ["json"] } serde = "1.0" -shuttle-service = { version = "0.7.0", features = ["web-rocket"] } -shuttle-shared-db = { version = "0.7.0", features = ["postgres"] } +shuttle-service = { version = "0.7.1", features = ["web-rocket"] } +shuttle-shared-db = { version = "0.7.1", features = ["postgres"] } sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] } url = "2.2" diff --git a/examples/salvo/hello-world/Cargo.toml b/examples/salvo/hello-world/Cargo.toml index 951a529c1..884bef74b 100644 --- a/examples/salvo/hello-world/Cargo.toml +++ b/examples/salvo/hello-world/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" [dependencies] salvo = "0.34.3" -shuttle-service = { version = "0.7.0", features = ["web-salvo"] } +shuttle-service = { version = "0.7.1", features = ["web-salvo"] } diff --git a/examples/serenity/hello-world/Cargo.toml b/examples/serenity/hello-world/Cargo.toml index 741dc89d0..85ed52698 100644 --- a/examples/serenity/hello-world/Cargo.toml +++ b/examples/serenity/hello-world/Cargo.toml @@ -8,6 +8,6 @@ edition = "2021" [dependencies] anyhow = "1.0.62" serenity = { version = "0.11.5", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] } -shuttle-secrets = "0.7.0" -shuttle-service = { version = "0.7.0", features = ["bot-serenity"] } +shuttle-secrets = "0.7.1" +shuttle-service = { version = "0.7.1", features = ["bot-serenity"] } tracing = "0.1.35" diff --git a/examples/serenity/postgres/Cargo.toml b/examples/serenity/postgres/Cargo.toml index 8310116f2..b0b10c2f1 100644 --- a/examples/serenity/postgres/Cargo.toml +++ b/examples/serenity/postgres/Cargo.toml @@ -9,8 +9,8 @@ edition = "2021" anyhow = "1.0.62" serde = "1.0" serenity = { version = "0.11.5", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] } -shuttle-secrets = "0.7.0" -shuttle-service = { version = "0.7.0", features = ["bot-serenity"] } -shuttle-shared-db = { version = "0.7.0", features = ["postgres"] } +shuttle-secrets = "0.7.1" +shuttle-service = { version = "0.7.1", features = ["bot-serenity"] } +shuttle-shared-db = { version = "0.7.1", features = ["postgres"] } sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] } tracing = "0.1.35" diff --git a/examples/thruster/hello-world/Cargo.toml b/examples/thruster/hello-world/Cargo.toml index ed56f40b7..c53b6e6d8 100644 --- a/examples/thruster/hello-world/Cargo.toml +++ b/examples/thruster/hello-world/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" [lib] [dependencies] -shuttle-service = { version = "0.7.0", features = ["web-thruster"] } +shuttle-service = { version = "0.7.1", features = ["web-thruster"] } thruster = { version = "1.2.6", features = ["hyper_server"] } diff --git a/examples/thruster/postgres/Cargo.toml b/examples/thruster/postgres/Cargo.toml index 34f22dcbf..7e2c72f30 100644 --- a/examples/thruster/postgres/Cargo.toml +++ b/examples/thruster/postgres/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] hyper = "0.14.20" serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } -shuttle-aws-rds = { version = "0.7.0", features = ["postgres"] } -shuttle-service = { version = "0.7.0", features = ["web-thruster"] } +shuttle-aws-rds = { version = "0.7.1", features = ["postgres"] } +shuttle-service = { version = "0.7.1", features = ["web-thruster"] } sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] } thruster = { version = "1.2.6", features = ["hyper_server"] } diff --git a/examples/tide/hello-world/Cargo.toml b/examples/tide/hello-world/Cargo.toml index e331caaf4..c6b883551 100644 --- a/examples/tide/hello-world/Cargo.toml +++ b/examples/tide/hello-world/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" [lib] [dependencies] -shuttle-service = { version = "0.7.0", features = ["web-tide"] } +shuttle-service = { version = "0.7.1", features = ["web-tide"] } tide = "0.16.0" diff --git a/examples/tide/postgres/Cargo.toml b/examples/tide/postgres/Cargo.toml index 1c46c424a..fe3954528 100644 --- a/examples/tide/postgres/Cargo.toml +++ b/examples/tide/postgres/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["cdylib"] [dependencies] serde = { version = "1.0", features = ["derive"] } -shuttle-aws-rds = { version = "0.7.0", features = ["postgres"] } -shuttle-service = { version = "0.7.0", features = ["web-tide"] } +shuttle-aws-rds = { version = "0.7.1", features = ["postgres"] } +shuttle-service = { version = "0.7.1", features = ["web-tide"] } sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] } tide = "0.16.0" diff --git a/examples/tower/hello-world/Cargo.toml b/examples/tower/hello-world/Cargo.toml index 45fc5516c..342ce0ff9 100644 --- a/examples/tower/hello-world/Cargo.toml +++ b/examples/tower/hello-world/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [dependencies] hyper = { version = "0.14", features = ["full"] } -shuttle-service = { version = "0.7.0", features = ["web-tower"] } +shuttle-service = { version = "0.7.1", features = ["web-tower"] } tower = { version = "0.4", features = ["full"] } diff --git a/examples/warp/hello-world/Cargo.toml b/examples/warp/hello-world/Cargo.toml index 9bfc17ab5..8c7573928 100644 --- a/examples/warp/hello-world/Cargo.toml +++ b/examples/warp/hello-world/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" [lib] [dependencies] -shuttle-service = { version = "0.7.0", features = ["web-warp"] } +shuttle-service = { version = "0.7.1", features = ["web-warp"] } warp = "0.3.2" diff --git a/service/src/lib.rs b/service/src/lib.rs index ce39ce9f0..4367f65bf 100644 --- a/service/src/lib.rs +++ b/service/src/lib.rs @@ -27,7 +27,7 @@ //! be a library crate with a `shuttle-service` dependency with the `web-rocket` feature on the `shuttle-service` dependency. //! //! ```toml -//! shuttle-service = { version = "0.7.0", features = ["web-rocket"] } +//! shuttle-service = { version = "0.7.1", features = ["web-rocket"] } //! ``` //! //! A boilerplate code for your rocket project can also be found in `src/lib.rs`: @@ -108,7 +108,7 @@ //! Add `shuttle-shared-db` as a dependency with the `postgres` feature, and add `sqlx` as a dependency with the `runtime-tokio-native-tls` and `postgres` features inside `Cargo.toml`: //! //! ```toml -//! shuttle-shared-db = { version = "0.7.0", features = ["postgres"] } +//! shuttle-shared-db = { version = "0.7.1", features = ["postgres"] } //! sqlx = { version = "0.6.1", features = ["runtime-tokio-native-tls", "postgres"] } //! ``` //! From f22c02c32f3136e949e936ddb63c56e9cce31446 Mon Sep 17 00:00:00 2001 From: chesedo Date: Fri, 21 Oct 2022 19:45:59 +0200 Subject: [PATCH 04/10] tests: v0.7.1 --- deployer/tests/deploy_layer/bind-panic/Cargo.toml | 2 +- deployer/tests/deploy_layer/main-panic/Cargo.toml | 2 +- deployer/tests/deploy_layer/self-stop/Cargo.toml | 2 +- deployer/tests/deploy_layer/sleep-async/Cargo.toml | 2 +- service/tests/resources/not-shuttle/Cargo.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deployer/tests/deploy_layer/bind-panic/Cargo.toml b/deployer/tests/deploy_layer/bind-panic/Cargo.toml index 156d730a6..ef267b08c 100644 --- a/deployer/tests/deploy_layer/bind-panic/Cargo.toml +++ b/deployer/tests/deploy_layer/bind-panic/Cargo.toml @@ -11,4 +11,4 @@ crate-type = ["cdylib"] [workspace] [dependencies] -shuttle-service = "0.7.0" +shuttle-service = "0.7.1" diff --git a/deployer/tests/deploy_layer/main-panic/Cargo.toml b/deployer/tests/deploy_layer/main-panic/Cargo.toml index 27c1c18cb..5356c02c1 100644 --- a/deployer/tests/deploy_layer/main-panic/Cargo.toml +++ b/deployer/tests/deploy_layer/main-panic/Cargo.toml @@ -11,4 +11,4 @@ crate-type = ["cdylib"] [workspace] [dependencies] -shuttle-service = "0.7.0" +shuttle-service = "0.7.1" diff --git a/deployer/tests/deploy_layer/self-stop/Cargo.toml b/deployer/tests/deploy_layer/self-stop/Cargo.toml index 4a05ac9ba..656142fcf 100644 --- a/deployer/tests/deploy_layer/self-stop/Cargo.toml +++ b/deployer/tests/deploy_layer/self-stop/Cargo.toml @@ -11,4 +11,4 @@ crate-type = ["cdylib"] [workspace] [dependencies] -shuttle-service = "0.7.0" +shuttle-service = "0.7.1" diff --git a/deployer/tests/deploy_layer/sleep-async/Cargo.toml b/deployer/tests/deploy_layer/sleep-async/Cargo.toml index b83c654da..54effeb5a 100644 --- a/deployer/tests/deploy_layer/sleep-async/Cargo.toml +++ b/deployer/tests/deploy_layer/sleep-async/Cargo.toml @@ -12,4 +12,4 @@ crate-type = ["cdylib"] [dependencies] tokio = { version = "1.0", features = ["time"]} -shuttle-service = "0.7.0" +shuttle-service = "0.7.1" diff --git a/service/tests/resources/not-shuttle/Cargo.toml b/service/tests/resources/not-shuttle/Cargo.toml index 99bfa8a3c..458fcb13b 100644 --- a/service/tests/resources/not-shuttle/Cargo.toml +++ b/service/tests/resources/not-shuttle/Cargo.toml @@ -9,4 +9,4 @@ crate-type = ["cdylib"] [workspace] [dependencies] -shuttle-service = "0.7.0" +shuttle-service = "0.7.1" From 51a2614dbdf5792fe1242ef892110d30756b7f69 Mon Sep 17 00:00:00 2001 From: chesedo Date: Mon, 24 Oct 2022 07:54:18 +0200 Subject: [PATCH 05/10] tests: fix warp test --- cargo-shuttle/tests/integration/run.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cargo-shuttle/tests/integration/run.rs b/cargo-shuttle/tests/integration/run.rs index d9975d6ed..fa925f2de 100644 --- a/cargo-shuttle/tests/integration/run.rs +++ b/cargo-shuttle/tests/integration/run.rs @@ -229,7 +229,7 @@ async fn warp_hello_world() { .await .unwrap(); - assert_eq!(request_text, "Hello, World"); + assert_eq!(request_text, "Hello, World!"); } #[tokio::test(flavor = "multi_thread")] From 05707bf6df0759f9ecf3a984cfd5b70c62e4eb40 Mon Sep 17 00:00:00 2001 From: chesedo Date: Mon, 24 Oct 2022 09:19:50 +0200 Subject: [PATCH 06/10] tests: fix warp test --- e2e/tests/integration/warp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/tests/integration/warp.rs b/e2e/tests/integration/warp.rs index 36aef9535..e47a4b58d 100644 --- a/e2e/tests/integration/warp.rs +++ b/e2e/tests/integration/warp.rs @@ -1,4 +1,4 @@ -use colored::Color; +use crossterm::style::Color; use crate::helpers::{self, APPS_FQDN}; @@ -15,5 +15,5 @@ fn hello_world_warp() { .text() .unwrap(); - assert_eq!(request_text, "Hello, world!"); + assert_eq!(request_text, "Hello, World!"); } From 058d2d3763744bc3345c2a7c08733c1408eb18ce Mon Sep 17 00:00:00 2001 From: chesedo Date: Mon, 24 Oct 2022 09:27:39 +0200 Subject: [PATCH 07/10] tests: fix secrets e2e test --- e2e/tests/integration/helpers/mod.rs | 30 +++++++++++++--------------- e2e/tests/integration/rocket.rs | 6 ++++++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/e2e/tests/integration/helpers/mod.rs b/e2e/tests/integration/helpers/mod.rs index f839373d1..8704b296d 100644 --- a/e2e/tests/integration/helpers/mod.rs +++ b/e2e/tests/integration/helpers/mod.rs @@ -341,7 +341,7 @@ impl Services { run.env("CARGO_HOME", CARGO_HOME.path()); run.args(["project", "status"]) - .current_dir(WORKSPACE_ROOT.join("examples").join(project_path)); + .current_dir(Self::get_project_path(project_path)); let stdout = run.output().unwrap().stdout; let stdout = String::from_utf8(stdout).unwrap(); @@ -358,9 +358,8 @@ impl Services { panic!("timed out while waiting for deployer to be ready"); } - pub fn run_client<'s, I, P>(&self, args: I, path: P) -> Child + pub fn run_client<'s, I>(&self, args: I, project_path: &str) -> Child where - P: AsRef, I: IntoIterator, { let mut run = Command::new(WORKSPACE_ROOT.join("target/debug/cargo-shuttle")); @@ -371,26 +370,21 @@ impl Services { run.env("CARGO_HOME", CARGO_HOME.path()); - run.args(args).current_dir(path); + run.args(args) + .current_dir(Self::get_project_path(project_path)); spawn_and_log(&mut run, &self.target, self.color) } pub fn deploy(&self, project_path: &str) { - self.run_client( - ["project", "new"], - WORKSPACE_ROOT.join("examples").join(project_path), - ) - .wait() - .ensure_success("failed to run deploy"); + self.run_client(["project", "new"], project_path) + .wait() + .ensure_success("failed to run deploy"); self.wait_deployer_ready(project_path, Duration::from_secs(120)); - self.run_client( - ["deploy", "--allow-dirty"], - WORKSPACE_ROOT.join("examples").join(project_path), - ) - .wait() - .ensure_success("failed to run deploy"); + self.run_client(["deploy", "--allow-dirty"], project_path) + .wait() + .ensure_success("failed to run deploy"); } pub fn get(&self, sub_path: &str) -> RequestBuilder { @@ -401,4 +395,8 @@ impl Services { pub fn post(&self, sub_path: &str) -> RequestBuilder { reqwest::blocking::Client::new().post(format!("http://{}/{}", self.proxy_addr, sub_path)) } + + pub fn get_project_path(project_path: &str) -> PathBuf { + WORKSPACE_ROOT.join("examples").join(project_path) + } } diff --git a/e2e/tests/integration/rocket.rs b/e2e/tests/integration/rocket.rs index e0f67cc79..4893813d2 100644 --- a/e2e/tests/integration/rocket.rs +++ b/e2e/tests/integration/rocket.rs @@ -48,6 +48,12 @@ fn postgres_rocket() { #[test] fn secrets_rocket() { let client = helpers::Services::new_docker("secrets (rocket)", Color::Red); + let project_path = helpers::Services::get_project_path("rocket/secrets"); + std::fs::copy( + project_path.join("Secrets.toml.example"), + project_path.join("Secrets.toml"), + ); + client.deploy("rocket/secrets"); let secret_response: String = client .get("secret") From ae35d206f322121c7c10137fc62c542b1f22082d Mon Sep 17 00:00:00 2001 From: chesedo Date: Mon, 24 Oct 2022 09:29:04 +0200 Subject: [PATCH 08/10] ci: remove hard coded DD env --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 689ad2c47..63960ad78 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -131,7 +131,6 @@ services: - DD_APM_NON_LOCAL_TRAFFIC=true - DD_SITE=datadoghq.eu - DD_API_KEY=${DD_API_KEY} - - DD_ENV=unstable deploy: placement: constraints: From 78ad0118b5d047d05ff9d6a07a7c1cecd9090c71 Mon Sep 17 00:00:00 2001 From: chesedo Date: Mon, 24 Oct 2022 09:31:51 +0200 Subject: [PATCH 09/10] misc: unintended shell changes --- shell.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/shell.nix b/shell.nix index a4e8e5e3f..ab73c0578 100644 --- a/shell.nix +++ b/shell.nix @@ -14,8 +14,6 @@ in (rustChannelOf{ channel = "1.63.0"; }).rust rust-analyzer cargo-watch - gdb - nodejs terraform awscli2 websocat From 7421d5b7186fbbf05c58dec8be8ea07fcb122be7 Mon Sep 17 00:00:00 2001 From: chesedo Date: Mon, 24 Oct 2022 09:33:47 +0200 Subject: [PATCH 10/10] refactor: cargo check suggestion --- e2e/tests/integration/rocket.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/tests/integration/rocket.rs b/e2e/tests/integration/rocket.rs index 4893813d2..e508af62c 100644 --- a/e2e/tests/integration/rocket.rs +++ b/e2e/tests/integration/rocket.rs @@ -52,7 +52,8 @@ fn secrets_rocket() { std::fs::copy( project_path.join("Secrets.toml.example"), project_path.join("Secrets.toml"), - ); + ) + .unwrap(); client.deploy("rocket/secrets"); let secret_response: String = client