Skip to content

Commit 13d6537

Browse files
committed
Update dependencies and Rust Docker image
1 parent 59475ec commit 13d6537

File tree

15 files changed

+1918
-1231
lines changed

15 files changed

+1918
-1231
lines changed

Cargo.lock

Lines changed: 1847 additions & 1161 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
"auth-service",
45
"planets-service",

auth-service/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ edition = "2021"
66

77
[dependencies]
88
common-utils = { path = "../common-utils" }
9-
async-graphql = "6.0.7"
10-
async-graphql-actix-web = "6.0.7"
11-
actix-web = "4.4.0"
9+
async-graphql = "7.0.5"
10+
async-graphql-actix-web = "7.0.5"
11+
actix-web = "4.5.1"
1212
actix-rt = "2.9.0"
13-
serde = { version = "1.0.188", features = ["derive"] }
14-
diesel = { version = "2.1.1", features = ["postgres", "r2d2"] }
13+
serde = { version = "1.0.202", features = ["derive"] }
14+
diesel = { version = "2.1.6", features = ["postgres", "r2d2"] }
1515
diesel_migrations = "2.1.0"
1616
dotenv = "0.15.0"
17-
jsonwebtoken = "8.3.0"
18-
argon2 = "0.5.2"
19-
chrono = "0.4.31"
17+
jsonwebtoken = "9.3.0"
18+
argon2 = "0.5.3"
19+
chrono = "0.4.38"
2020
lazy_static = "1.4.0"
21-
strum = "0.25.0"
22-
strum_macros = "0.25.2"
21+
strum = "0.26.2"
22+
strum_macros = "0.26.2"
2323

2424
[dev-dependencies]
25-
serde_json = "1.0.107"
25+
serde_json = "1.0.117"
2626
jsonpath_lib = "0.3.0"
27-
base64 = "0.21.4"
28-
testcontainers = "0.14.0"
27+
base64 = "0.22.1"
28+
testcontainers = "0.16.7"

auth-service/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.72.1 as builder
1+
FROM rust:1.78.0 as builder
22

33
ENV CARGO_TERM_COLOR always
44
RUN apt-get update && apt-get install -y libpq-dev

auth-service/src/graphql.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ impl RoleGuard {
105105
}
106106
}
107107

108-
#[async_trait::async_trait]
109108
impl Guard for RoleGuard {
110109
async fn check(&self, ctx: &Context<'_>) -> Result<()> {
111110
let maybe_getting_role_result = ctx.data_opt::<Result<Option<AuthRole>, CustomError>>();

common-utils/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Roman Kudryashov <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
actix-web = "4.4.0"
9-
serde = { version = "1.0.188", features = ["derive"] }
10-
strum = "0.25.0"
11-
strum_macros = "0.25.2"
8+
actix-web = "4.5.1"
9+
serde = { version = "1.0.202", features = ["derive"] }
10+
strum = "0.26.2"
11+
strum_macros = "0.26.2"

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
ports:
2222
- "8001:8080"
2323
planets-db:
24-
image: postgres:15.1-alpine
24+
image: postgres:16.3
2525
container_name: planets-db
2626
restart: always
2727
environment:
@@ -53,7 +53,7 @@ services:
5353
ports:
5454
- "8002:8080"
5555
satellites-db:
56-
image: postgres:15.1-alpine
56+
image: postgres:16.3
5757
container_name: satellites-db
5858
restart: always
5959
environment:
@@ -86,7 +86,7 @@ services:
8686
ports:
8787
- "8003:8080"
8888
users-db:
89-
image: postgres:15.1-alpine
89+
image: postgres:16.3
9090
container_name: users-db
9191
restart: always
9292
environment:

gateway/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ edition = "2021"
66

77
[dependencies]
88
common-utils = { path = "../common-utils" }
9-
apollo-router = "1.30.1"
10-
anyhow = "1.0.75"
11-
async-trait = "0.1.73"
12-
futures = "0.3.28"
13-
schemars = "0.8.15"
14-
jsonwebtoken = "8.3.0"
15-
serde = "1.0.188"
16-
serde_json = "1.0.107"
17-
tokio = { version = "1.32.0", features = ["full"] }
9+
apollo-router = "1.46.0"
10+
anyhow = "1.0.85"
11+
async-trait = "0.1.80"
12+
futures = "0.3.30"
13+
schemars = "0.8.19"
14+
jsonwebtoken = "9.3.0"
15+
serde = "1.0.202"
16+
serde_json = "1.0.117"
17+
tokio = { version = "1.37.0", features = ["full"] }
1818
tower = { version = "0.4.13", features = ["full"] }
19-
tracing = "0.1.37"
20-
http = "0.2.9"
19+
tracing = "0.1.40"
20+
http = "1.1.0"
2121
dotenv = "0.15.0"

gateway/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.72.1 as builder
1+
FROM rust:1.76.0 as builder
22

33
ENV CARGO_TERM_COLOR always
44
RUN apt-get update && apt-get install -y protobuf-compiler cmake

gateway/src/jwt_validation.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,24 @@ impl Plugin for JwtValidation {
5757
.extension_code("AUTH_ERROR")
5858
.build(),
5959
)
60-
.status_code(status)
60+
// TODO: don't know why by the commented line doesn't compile
61+
// .status_code(Some(status))
6162
.context(context)
6263
.build()?;
6364
Ok(ControlFlow::Break(response))
6465
}
6566

6667
let handler = move |request: supergraph::Request| {
67-
let auth_header_value_result =
68-
match request.supergraph_request.headers().get(AUTHORIZATION) {
69-
Some(auth_header_value) => auth_header_value.to_str(),
70-
// in this project, I decided to allow the passage of requests without the AUTHORIZATION header. then each subgraph performs authorization based on the ROLE header
71-
// your case may be different. be careful
72-
None => return Ok(ControlFlow::Continue(request)),
73-
};
68+
let auth_header_value_result = match request
69+
.supergraph_request
70+
.headers()
71+
.get(AUTHORIZATION.as_str())
72+
{
73+
Some(auth_header_value) => auth_header_value.to_str(),
74+
// in this project, I decided to allow the passage of requests without the AUTHORIZATION header. then each subgraph performs authorization based on the ROLE header
75+
// your case may be different. be careful
76+
None => return Ok(ControlFlow::Continue(request)),
77+
};
7478

7579
let auth_header_value_untrimmed = match auth_header_value_result {
7680
Ok(auth_header_value) => auth_header_value,

planets-service/Cargo.toml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,24 @@ edition = "2021"
66

77
[dependencies]
88
common-utils = { path = "../common-utils" }
9-
async-graphql = { version = "6.0.7", features = ["dataloader"] }
10-
async-graphql-actix-web = "6.0.7"
11-
actix-web = "4.4.0"
9+
async-graphql = { version = "7.0.5", features = ["dataloader"] }
10+
async-graphql-actix-web = "7.0.5"
11+
actix-web = "4.5.1"
1212
actix-rt = "2.9.0"
13-
actix-web-actors = "4.2.0"
14-
futures = "0.3.28"
15-
async-trait = "0.1.73"
16-
bigdecimal = { version = "0.4.1", features = ["serde"] }
17-
serde = { version = "1.0.188", features = ["derive"] }
18-
serde_json = "1.0.107"
19-
diesel = { version = "2.1.1", features = ["postgres", "r2d2", "numeric"] }
13+
actix-web-actors = "4.3.0"
14+
futures = "0.3.30"
15+
bigdecimal = { version = "0.4.3", features = ["serde"] }
16+
serde = { version = "1.0.202", features = ["derive"] }
17+
serde_json = "1.0.117"
18+
diesel = { version = "2.1.6", features = ["postgres", "r2d2", "numeric"] }
2019
diesel_migrations = "2.1.0"
2120
dotenv = "0.15.0"
22-
strum = "0.25.0"
23-
strum_macros = "0.25.2"
24-
rdkafka = { version = "0.34.0", features = ["cmake-build"] }
21+
strum = "0.26.2"
22+
strum_macros = "0.26.2"
23+
rdkafka = { version = "0.36.2", features = ["cmake-build"] }
2524
async-stream = "0.3.5"
2625
lazy_static = "1.4.0"
2726

2827
[dev-dependencies]
2928
jsonpath_lib = "0.3.0"
30-
testcontainers = "0.14.0"
29+
testcontainers = "0.16.7"

planets-service/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.72.1 as builder
1+
FROM rust:1.78.0 as builder
22

33
ENV CARGO_TERM_COLOR always
44
RUN apt-get update && apt-get install -y libpq-dev cmake

planets-service/src/graphql.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ pub struct DetailsLoader {
303303
pub pool: Arc<PgPool>,
304304
}
305305

306-
#[async_trait::async_trait]
307306
impl Loader<i32> for DetailsLoader {
308307
type Value = Details;
309308
type Error = Error;
@@ -329,7 +328,6 @@ impl RoleGuard {
329328
}
330329
}
331330

332-
#[async_trait::async_trait]
333331
impl Guard for RoleGuard {
334332
async fn check(&self, ctx: &Context<'_>) -> Result<()> {
335333
// TODO: auth disabling is needed for tests. try to reimplement when https://github.com/rust-lang/rust/issues/45599 will be resolved (using cfg(test))

satellites-service/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ authors = ["Roman Kudryashov <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
async-graphql = { version = "6.0.7", features = ["chrono"] }
9-
async-graphql-actix-web = "6.0.7"
10-
actix-web = "4.4.0"
8+
async-graphql = { version = "7.0.5", features = ["chrono"] }
9+
async-graphql-actix-web = "7.0.5"
10+
actix-web = "4.5.1"
1111
actix-rt = "2.9.0"
12-
serde = { version = "1.0.188", features = ["derive"] }
13-
diesel = { version = "2.1.1", features = ["postgres", "r2d2", "chrono"] }
12+
serde = { version = "1.0.202", features = ["derive"] }
13+
diesel = { version = "2.1.6", features = ["postgres", "r2d2", "chrono"] }
1414
diesel_migrations = "2.1.0"
15-
chrono = { version = "0.4.31", features = ["serde"] }
15+
chrono = { version = "0.4.38", features = ["serde"] }
1616
dotenv = "0.15.0"
17-
strum = "0.25.0"
18-
strum_macros = "0.25.2"
17+
strum = "0.26.2"
18+
strum_macros = "0.26.2"
1919

2020
[dev-dependencies]
21-
serde_json = "1.0.107"
21+
serde_json = "1.0.117"
2222
jsonpath_lib = "0.3.0"
23-
testcontainers = "0.14.0"
23+
testcontainers = "0.16.7"

satellites-service/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.72.1 as builder
1+
FROM rust:1.78.0 as builder
22

33
ENV CARGO_TERM_COLOR always
44
RUN apt-get update && apt-get install -y libpq-dev

0 commit comments

Comments
 (0)