Skip to content

Commit 9041e7e

Browse files
authored
Merge pull request #34331 from petrosagg/upgrade-pg-deps
*: update postgres dependencies
2 parents 12d74be + 675e4ce commit 9041e7e

File tree

32 files changed

+183
-119
lines changed

32 files changed

+183
-119
lines changed

Cargo.lock

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

src/adapter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ smallvec = { version = "1.15.1", features = ["union"] }
8989
static_assertions = "1.1"
9090
timely = "0.25.1"
9191
tokio = { version = "1.48.0", features = ["rt", "time"] }
92-
tokio-postgres = { version = "0.7.8" }
92+
tokio-postgres = { version = "0.7.15" }
9393
tokio-stream = "0.1.17"
9494
tracing = "0.1.37"
9595
tracing-core = "0.1.35"

src/balancerd/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ proxy-header = "0.1.2"
4545
semver = "1.0.27"
4646
tokio = { version = "1.48.0", default-features = false }
4747
tokio-openssl = "0.6.5"
48-
tokio-postgres = { version = "0.7.8" }
48+
tokio-postgres = { version = "0.7.15" }
4949
tokio-util = { version = "0.7.17", features = ["codec"] }
5050
tokio-metrics = "0.4.5"
5151
tower = "0.5.2"
@@ -57,7 +57,7 @@ workspace-hack = { version = "0.0.0", path = "../workspace-hack", optional = tru
5757
[dev-dependencies]
5858
mz-environmentd = { path = "../environmentd", default-features = false, features = ["test"] }
5959
mz-frontegg-mock = { path = "../frontegg-mock" }
60-
postgres = "0.19.5"
60+
postgres = "0.19.12"
6161
reqwest = "0.11.24"
6262
tempfile = "3.23.0"
6363

src/balancerd/tests/server.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use mz_frontegg_auth::{
3030
};
3131
use mz_frontegg_mock::{FronteggMockServer, models::ApiToken, models::UserConfig};
3232
use mz_ore::cast::CastFrom;
33+
use mz_ore::error::ErrorExt;
3334
use mz_ore::id_gen::{conn_id_org_uuid, org_id_conn_bits};
3435
use mz_ore::metrics::MetricsRegistry;
3536
use mz_ore::now::SYSTEM_TIME;
@@ -234,7 +235,10 @@ async fn test_balancer() {
234235
.unwrap();
235236
let _ = cancel.cancel_query(tls).await;
236237
let e = pin!(copy).next().await.unwrap().unwrap_err();
237-
assert_contains!(e.to_string(), "canceling statement due to user request");
238+
assert_contains!(
239+
e.to_string_with_causes(),
240+
"canceling statement due to user request"
241+
);
238242

239243
// Various tests about reloading of certs.
240244

src/environmentd/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ openssl-sys = { version = "0.9.108", features = ["vendored"] }
8585
opentelemetry = { version = "0.24.0", features = ["trace"] }
8686
opentelemetry_sdk = { version = "0.24.1", features = ["rt-tokio"] }
8787
pin-project = "1.1.10"
88-
postgres = { version = "0.19.5", optional = true }
89-
postgres-openssl = { version = "0.5.0", optional = true }
88+
postgres = { version = "0.19.12", optional = true }
89+
postgres-openssl = { version = "0.5.2", optional = true }
9090
prometheus = { version = "0.14.0", default-features = false }
9191
rdkafka-sys = { version = "4.3.0", features = [
9292
"cmake-build",
@@ -108,7 +108,7 @@ sysctl = "0.7.1"
108108
tempfile = "3.23.0"
109109
thiserror = "2.0.17"
110110
tokio = { version = "1.48.0", features = ["sync"] }
111-
tokio-postgres = { version = "0.7.8" }
111+
tokio-postgres = { version = "0.7.15" }
112112
tokio-stream = { version = "0.1.17", features = ["net"] }
113113
tokio-metrics = "0.4.5"
114114
tower = { version = "0.5.2", features = ["buffer", "limit", "load-shed"] }
@@ -145,8 +145,8 @@ mz-pgrepr = { path = "../pgrepr" }
145145
mz-pgtest = { path = "../pgtest" }
146146
mz-repr = { path = "../repr" }
147147
mz-sql-parser = { path = "../sql-parser" }
148-
postgres = { version = "0.19.5", features = ["with-chrono-0_4"] }
149-
postgres-protocol = { version = "0.6.5" }
148+
postgres = { version = "0.19.12", features = ["with-chrono-0_4"] }
149+
postgres-protocol = { version = "0.6.9" }
150150
postgres_array = { version = "0.11.0" }
151151
predicates = "3.1.3"
152152
proptest = { version = "1.7.0", default-features = false, features = ["std"] }
@@ -161,7 +161,7 @@ serde_json = "1.0.145"
161161
serde_urlencoded = "0.7.1"
162162
similar-asserts = "1.7"
163163
timely = "0.25.1"
164-
tokio-postgres = { version = "0.7.8", features = ["with-chrono-0_4"] }
164+
tokio-postgres = { version = "0.7.15", features = ["with-chrono-0_4"] }
165165

166166
[build-dependencies]
167167
anyhow = "1.0.100"

src/environmentd/tests/auth.rs

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ use mz_frontegg_auth::{
4545
use mz_frontegg_mock::{
4646
FronteggMockServer, models::ApiToken, models::TenantApiTokenConfig, models::UserConfig,
4747
};
48+
use mz_ore::error::ErrorExt;
4849
use mz_ore::metrics::MetricsRegistry;
4950
use mz_ore::now::{NowFn, SYSTEM_TIME};
5051
use mz_ore::retry::Retry;
@@ -1159,7 +1160,10 @@ async fn test_auth_base_require_tls_frontegg() {
11591160
ssl_mode: SslMode::Require,
11601161
configure: Box::new(|b| Ok(b.set_verify(SslVerifyMode::NONE))),
11611162
assert: Assert::Err(Box::new(|err| {
1162-
assert_contains!(err.to_string(), "unauthorized login to user 'mz_system'");
1163+
assert_contains!(
1164+
err.to_string_with_causes(),
1165+
"unauthorized login to user 'mz_system'"
1166+
);
11631167
})),
11641168
},
11651169
TestCase::Http {
@@ -1192,7 +1196,10 @@ async fn test_auth_base_require_tls_frontegg() {
11921196
ssl_mode: SslMode::Require,
11931197
configure: Box::new(|b| Ok(b.set_verify(SslVerifyMode::NONE))),
11941198
assert: Assert::Err(Box::new(|err| {
1195-
assert_contains!(err.to_string(), "unauthorized login to user 'mz_system'");
1199+
assert_contains!(
1200+
err.to_string_with_causes(),
1201+
"unauthorized login to user 'mz_system'"
1202+
);
11961203
})),
11971204
},
11981205
TestCase::Http {
@@ -1226,7 +1233,10 @@ async fn test_auth_base_require_tls_frontegg() {
12261233
ssl_mode: SslMode::Require,
12271234
configure: Box::new(|b| Ok(b.set_verify(SslVerifyMode::NONE))),
12281235
assert: Assert::Err(Box::new(|err| {
1229-
assert_contains!(err.to_string(), "unauthorized login to user 'PUBLIC'");
1236+
assert_contains!(
1237+
err.to_string_with_causes(),
1238+
"unauthorized login to user 'PUBLIC'"
1239+
);
12301240
})),
12311241
},
12321242
TestCase::Http {
@@ -1304,7 +1314,7 @@ async fn test_auth_base_disable_tls() {
13041314
configure: Box::new(|_| Ok(())),
13051315
assert: Assert::Err(Box::new(|err| {
13061316
assert_eq!(
1307-
err.to_string(),
1317+
err.to_string_with_causes(),
13081318
"error performing TLS handshake: server does not support TLS",
13091319
)
13101320
})),
@@ -1331,7 +1341,10 @@ async fn test_auth_base_disable_tls() {
13311341
ssl_mode: SslMode::Disable,
13321342
configure: Box::new(|_| Ok(())),
13331343
assert: Assert::DbErr(Box::new(|err| {
1334-
assert_contains!(err.to_string(), "unauthorized login to user 'mz_system'");
1344+
assert_contains!(
1345+
err.to_string_with_causes(),
1346+
"unauthorized login to user 'mz_system'"
1347+
);
13351348
})),
13361349
},
13371350
],
@@ -1451,7 +1464,10 @@ async fn test_auth_base_require_tls() {
14511464
ssl_mode: SslMode::Prefer,
14521465
configure: Box::new(|b| Ok(b.set_verify(SslVerifyMode::NONE))),
14531466
assert: Assert::DbErr(Box::new(|err| {
1454-
assert_contains!(err.to_string(), "unauthorized login to user 'mz_system'");
1467+
assert_contains!(
1468+
err.to_string_with_causes(),
1469+
"unauthorized login to user 'mz_system'"
1470+
);
14551471
})),
14561472
},
14571473
],
@@ -1488,7 +1504,10 @@ async fn test_auth_intermediate_ca_no_intermediary() {
14881504
ssl_mode: SslMode::Require,
14891505
configure: Box::new(|b| b.set_ca_file(ca.ca_cert_path())),
14901506
assert: Assert::Err(Box::new(|err| {
1491-
assert_contains!(err.to_string(), "unable to get local issuer certificate");
1507+
assert_contains!(
1508+
err.to_string_with_causes(),
1509+
"unable to get local issuer certificate"
1510+
);
14921511
})),
14931512
},
14941513
TestCase::Http {

src/environmentd/tests/pgwire.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use fallible_iterator::FallibleIterator;
1919
use mz_adapter::session::DEFAULT_DATABASE_NAME;
2020
use mz_environmentd::test_util::{self, PostgresErrorExt};
2121
use mz_ore::collections::CollectionExt;
22+
use mz_ore::error::ErrorExt;
2223
use mz_ore::retry::Retry;
2324
use mz_ore::{assert_err, assert_ok};
2425
use mz_pgrepr::{Numeric, Record};
@@ -40,7 +41,8 @@ fn test_bind_params() {
4041
match client.query("SELECT ROW(1, 2) = $1", &[&"(1,2)"]) {
4142
Ok(_) => panic!("query with invalid parameters executed successfully"),
4243
Err(err) => assert!(
43-
err.to_string().contains("operator does not exist"),
44+
err.to_string_with_causes()
45+
.contains("operator does not exist"),
4446
"unexpected error: {err}"
4547
),
4648
}

0 commit comments

Comments
 (0)