diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fd1328..f21f64e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Changed + +- Switch from the older `prusto` crate to the forked `trino-rust-client` ([#116]). + ### Fixed - Handle Redis connection errors (e.g. broken pipe during master failover) gracefully instead of panicking. @@ -11,6 +15,7 @@ All notable changes to this project will be documented in this file. the metrics `RwLock`, cascading into further panics and leaving pods unresponsive ([#111]). [#111]: https://github.com/stackabletech/trino-lb/pull/111 +[#116]: https://github.com/stackabletech/trino-lb/pull/116 ## [0.6.0] - 2026-02-17 diff --git a/Cargo.lock b/Cargo.lock index 2840c98..199ece0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -322,10 +322,10 @@ dependencies = [ "bytes", "form_urlencoded", "futures-util", - "http 1.4.2", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.10.1", + "hyper", "hyper-util", "itoa", "matchit", @@ -337,7 +337,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower", "tower-layer", @@ -353,12 +353,12 @@ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", - "http 1.4.2", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -376,8 +376,8 @@ dependencies = [ "futures-core", "futures-util", "headers", - "http 1.4.2", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -396,15 +396,15 @@ dependencies = [ "bytes", "either", "fs-err", - "http 1.4.2", - "http-body 1.0.1", - "hyper 1.10.1", + "http", + "http-body", + "hyper", "hyper-util", "pin-project-lite", - "rustls 0.23.41", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.4", + "tokio-rustls", "tower-service", ] @@ -419,12 +419,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -442,10 +436,12 @@ dependencies = [ [[package]] name = "bigdecimal" -version = "0.3.1" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" +checksum = "4d6867f1565b3aad85681f1015055b087fcfd840d6aeee6eee7f2da317603695" dependencies = [ + "autocfg", + "libm", "num-bigint", "num-integer", "num-traits", @@ -593,24 +589,12 @@ dependencies = [ [[package]] name = "chrono-tz" -version = "0.8.6" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" +checksum = "a6139a8597ed92cf816dfb33f5dd6cf0bb93a6adc938f11039f371bc5bcd26c3" dependencies = [ "chrono", - "chrono-tz-build", - "phf", -] - -[[package]] -name = "chrono-tz-build" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" -dependencies = [ - "parse-zoneinfo", "phf", - "phf_codegen", ] [[package]] @@ -731,9 +715,12 @@ dependencies = [ [[package]] name = "convert_case" -version = "0.4.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "cookie" @@ -764,16 +751,6 @@ dependencies = [ "url", ] -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation" version = "0.10.1" @@ -919,19 +896,6 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" -[[package]] -name = "derive_more" -version = "0.99.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn", -] - [[package]] name = "derive_more" version = "2.1.1" @@ -947,10 +911,12 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ + "convert_case", "proc-macro2", "quote", "rustc_version", "syn", + "unicode-xid", ] [[package]] @@ -1382,25 +1348,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "h2" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.15" @@ -1412,7 +1359,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.4.2", + "http", "indexmap", "slab", "tokio", @@ -1452,10 +1399,10 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "headers-core", - "http 1.4.2", + "http", "httpdate", "mime", "sha1 0.10.6", @@ -1467,7 +1414,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.4.2", + "http", ] [[package]] @@ -1517,17 +1464,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.4.2" @@ -1538,17 +1474,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -1556,7 +1481,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.4.2", + "http", ] [[package]] @@ -1567,8 +1492,8 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.4.2", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -1578,7 +1503,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f056c8559e3757392c8d091e796416e4649d8e49e88b8d76df6c002f05027fd" dependencies = [ - "http 1.4.2", + "http", "serde", ] @@ -1619,30 +1544,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.10", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.10.1" @@ -1653,9 +1554,9 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.15", - "http 1.4.2", - "http-body 1.0.1", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -1665,34 +1566,20 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.32", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", -] - [[package]] name = "hyper-rustls" version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "http 1.4.2", - "hyper 1.10.1", + "http", + "hyper", "hyper-util", "log", - "rustls 0.23.41", + "rustls", "rustls-native-certs", "tokio", - "tokio-rustls 0.26.4", + "tokio-rustls", "tower-service", ] @@ -1702,7 +1589,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.10.1", + "hyper", "hyper-util", "pin-project-lite", "tokio", @@ -1715,18 +1602,18 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-channel", "futures-util", - "http 1.4.2", - "http-body 1.0.1", - "hyper 1.10.1", + "http", + "http-body", + "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.4", + "socket2", "tokio", "tower-service", "tracing", @@ -1871,9 +1758,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.18.4" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" +checksum = "993f007684f2e9727160da8b960ec161264703bfd1af084fd2e34d040c9a0dd4" dependencies = [ "console", "portable-atomic", @@ -1938,9 +1825,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jiff" -version = "0.2.29" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f877a98676d2fb664698d74cc6a51ce6c484ce8c770f05d0108ec9090aeb46" +checksum = "ccfe6121cbe750cf81efa362d85c0bde7ea298ec43092d3a193baca59cdbd634" dependencies = [ "defmt", "jiff-static", @@ -1952,9 +1839,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.29" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0666b5ab5ecaca213fc2a85b8c0083d9004e84ee2d5f9a7e0017aaf50986f25f" +checksum = "e165e897f662d428f3cd3828a919dbe067c2d42bb1031eede74ef9d27ecdedd2" dependencies = [ "proc-macro2", "quote", @@ -2072,7 +1959,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c6922f6afe80418dd6019818af5d0d34584c371780ff09b9752370c25b4abb" dependencies = [ - "base64 0.22.1", + "base64", "jiff", "serde", "serde_json", @@ -2096,15 +1983,15 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0f628e05bc2264c21fe10d3d675117dc9b43ea3bf4fb07262a222679757537b" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "either", "futures", - "http 1.4.2", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.10.1", - "hyper-rustls 0.27.9", + "hyper", + "hyper-rustls", "hyper-timeout", "hyper-util", "jiff", @@ -2112,7 +1999,7 @@ dependencies = [ "k8s-openapi", "kube-core", "pem", - "rustls 0.23.41", + "rustls", "secrecy", "serde", "serde-saphyr", @@ -2131,9 +2018,9 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b02f5933ba06140d58c7d6727f6c319f0962ec6a344aa5e21e475e891deaa8" dependencies = [ - "derive_more 2.1.1", + "derive_more", "form_urlencoded", - "http 1.4.2", + "http", "jiff", "json-patch", "k8s-openapi", @@ -2182,6 +2069,12 @@ version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + [[package]] name = "libsqlite3-sys" version = "0.37.0" @@ -2394,7 +2287,7 @@ checksum = "5683015d09e2df236ef005b17f6f196f0d5f6313c4fa43a7b6a53b52776e4331" dependencies = [ "async-trait", "bytes", - "http 1.4.2", + "http", "opentelemetry", ] @@ -2404,7 +2297,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9966929966d17620d7c316c643ba62631826e10021409357772d5eea84f62c35" dependencies = [ - "http 1.4.2", + "http", "opentelemetry", "opentelemetry-proto", "opentelemetry_sdk", @@ -2497,15 +2390,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "parse-zoneinfo" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" -dependencies = [ - "regex", -] - [[package]] name = "paste" version = "1.0.15" @@ -2518,7 +2402,7 @@ version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" dependencies = [ - "base64 0.22.1", + "base64", "serde_core", ] @@ -2573,38 +2457,18 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" dependencies = [ "phf_shared", - "rand 0.8.6", ] [[package]] name = "phf_shared" -version = "0.11.3" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981" dependencies = [ "siphasher", ] @@ -2787,43 +2651,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "prusto" -version = "0.5.2" -source = "git+https://github.com/sbernauer/prusto.git?branch=feat%2Fderive-name-attribute-2#5752bc9a591127dab277ea1b41397b775789a565" -dependencies = [ - "bigdecimal", - "chrono", - "chrono-tz", - "derive_more 0.99.20", - "futures", - "http 0.2.12", - "iterable", - "lazy_static", - "log", - "paste", - "prusto-macros", - "regex", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", - "urlencoding", - "uuid", -] - -[[package]] -name = "prusto-macros" -version = "0.2.1" -source = "git+https://github.com/sbernauer/prusto.git?branch=feat%2Fderive-name-attribute-2#5752bc9a591127dab277ea1b41397b775789a565" -dependencies = [ - "proc-macro2", - "quote", - "structmeta", - "syn", -] - [[package]] name = "psl-types" version = "2.0.11" @@ -2909,8 +2736,8 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.41", - "socket2 0.6.4", + "rustls", + "socket2", "thiserror 2.0.18", "tokio", "tracing", @@ -2930,7 +2757,7 @@ dependencies = [ "rand 0.9.4", "ring", "rustc-hash", - "rustls 0.23.41", + "rustls", "rustls-pki-types", "slab", "thiserror 2.0.18", @@ -2948,7 +2775,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.4", + "socket2", "tracing", "windows-sys 0.60.2", ] @@ -2974,15 +2801,6 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "rand" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" -dependencies = [ - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.4" @@ -3014,12 +2832,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - [[package]] name = "rand_core" version = "0.9.5" @@ -3056,13 +2868,13 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rand 0.10.1", - "rustls 0.23.41", + "rustls", "rustls-native-certs", "ryu", "sha1_smol", - "socket2 0.6.4", + "socket2", "tokio", - "tokio-rustls 0.26.4", + "tokio-rustls", "tokio-util", "url", "xxhash-rust", @@ -3112,77 +2924,36 @@ version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-rustls 0.24.2", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-rustls 0.24.1", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.25.4", - "winreg", -] - [[package]] name = "reqwest" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "cookie", "cookie_store", "futures-core", - "http 1.4.2", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.10.1", - "hyper-rustls 0.27.9", + "hyper", + "hyper-rustls", "hyper-util", "js-sys", "log", "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.41", + "rustls", "rustls-pki-types", "rustls-platform-verifier", "serde", "serde_json", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", - "tokio-rustls 0.26.4", + "tokio-rustls", "tower", "tower-http", "tower-service", @@ -3250,18 +3021,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - [[package]] name = "rustls" version = "0.23.41" @@ -3273,7 +3032,7 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.13", + "rustls-webpki", "subtle", "zeroize", ] @@ -3290,15 +3049,6 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - [[package]] name = "rustls-pki-types" version = "1.14.1" @@ -3315,15 +3065,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", "jni", "log", "once_cell", - "rustls 0.23.41", + "rustls", "rustls-native-certs", "rustls-platform-verifier-android", - "rustls-webpki 0.103.13", + "rustls-webpki", "security-framework", "security-framework-sys", "webpki-root-certs", @@ -3336,16 +3086,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustls-webpki" version = "0.103.13" @@ -3394,16 +3134,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "secrecy" version = "0.10.3" @@ -3420,7 +3150,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ "bitflags 2.13.0", - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -3460,7 +3190,7 @@ checksum = "5897b4c3faadadd35fdb6689f015641f3bc481d5adaaac56231ea15aeb243db3" dependencies = [ "ahash", "annotate-snippets", - "base64 0.22.1", + "base64", "encoding_rs_io", "getrandom 0.3.4", "granit-parser", @@ -3689,16 +3419,6 @@ dependencies = [ "syn", ] -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.4" @@ -3737,7 +3457,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b44e85bf579a8eeb4ceaa77a3a523baf2bf0e9bac7e40f405d537b5d2d5ccb" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "cfg-if", "chrono", @@ -3755,7 +3475,7 @@ dependencies = [ "log", "memchr", "percent-encoding", - "rustls 0.23.41", + "rustls", "serde", "serde_json", "sha2 0.10.9", @@ -3765,7 +3485,7 @@ dependencies = [ "tokio-stream", "tracing", "url", - "webpki-roots 1.0.8", + "webpki-roots", ] [[package]] @@ -3841,7 +3561,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87a2bdd6e83f6b3ea525ca9fee568030508b58355a43d0b2c1674d5f79dcd65e" dependencies = [ "atoi", - "base64 0.22.1", + "base64", "bitflags 2.13.0", "byteorder", "chrono", @@ -3920,9 +3640,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "structmeta" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ad9e09554f0456d67a69c1584c9798ba733a5b50349a6c0d0948710523922d" +checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329" dependencies = [ "proc-macro2", "quote", @@ -3932,9 +3652,9 @@ dependencies = [ [[package]] name = "structmeta-derive" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" +checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", @@ -3979,12 +3699,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -4005,27 +3719,6 @@ dependencies = [ "syn", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "target-lexicon" version = "0.13.5" @@ -4148,7 +3841,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.4", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] @@ -4164,23 +3857,13 @@ dependencies = [ "syn", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.41", + "rustls", "tokio", ] @@ -4246,18 +3929,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ "async-trait", - "base64 0.22.1", + "base64", "bytes", "flate2", - "http 1.4.2", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.10.1", + "hyper", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tokio-stream", "tower", @@ -4299,7 +3982,7 @@ dependencies = [ "indexmap", "pin-project-lite", "slab", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tokio-util", "tower-layer", @@ -4314,13 +3997,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ "async-compression", - "base64 0.22.1", + "base64", "bitflags 2.13.0", "bytes", "futures-core", "futures-util", - "http 1.4.2", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -4446,7 +4129,7 @@ dependencies = [ "clap", "enum_dispatch", "futures", - "http 1.4.2", + "http", "indoc", "k8s-openapi", "kube", @@ -4459,14 +4142,13 @@ dependencies = [ "opentelemetry-prometheus", "opentelemetry_sdk", "prometheus", - "prusto", "pyo3", "rand 0.10.1", "redis", "regex", - "reqwest 0.13.4", + "reqwest", "rstest", - "rustls 0.23.41", + "rustls", "serde", "serde_json", "serde_yaml", @@ -4480,6 +4162,7 @@ dependencies = [ "tracing-subscriber", "trino-lb-core", "trino-lb-persistence", + "trino-rust-client", "url", "urlencoding", ] @@ -4491,8 +4174,8 @@ dependencies = [ "clap", "futures", "indicatif", - "prusto", "tokio", + "trino-rust-client", "url", ] @@ -4501,14 +4184,13 @@ name = "trino-lb-core" version = "0.6.0" dependencies = [ "chrono", - "http 1.4.2", + "http", "http-serde", "humantime-serde", "number_prefix", "opentelemetry-otlp", - "prusto", "rand 0.10.1", - "reqwest 0.13.4", + "reqwest", "rstest", "serde", "serde_json", @@ -4516,6 +4198,7 @@ dependencies = [ "snafu", "strum", "tracing", + "trino-rust-client", "url", ] @@ -4526,7 +4209,7 @@ dependencies = [ "bincode", "enum_dispatch", "futures", - "http 1.4.2", + "http", "http-serde", "redis", "serde", @@ -4540,6 +4223,44 @@ dependencies = [ "url", ] +[[package]] +name = "trino-rust-client" +version = "0.9.3" +source = "git+https://github.com/stackabletech/trino-rust-client.git?branch=trino-lb#3e76b33b1e1124ee96104210557ddc8e80e739b4" +dependencies = [ + "backon", + "bigdecimal", + "chrono", + "chrono-tz", + "derive_more", + "futures", + "http", + "iterable", + "lazy_static", + "log", + "paste", + "regex", + "reqwest", + "serde", + "serde_json", + "thiserror 2.0.18", + "tokio", + "trino-rust-client-macros", + "url", + "uuid", +] + +[[package]] +name = "trino-rust-client-macros" +version = "0.7.1" +source = "git+https://github.com/stackabletech/trino-rust-client.git?branch=trino-lb#3e76b33b1e1124ee96104210557ddc8e80e739b4" +dependencies = [ + "proc-macro2", + "quote", + "structmeta", + "syn", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -4585,12 +4306,24 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + [[package]] name = "unicode-width" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unit-prefix" version = "0.5.2" @@ -4800,12 +4533,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "1.0.8" @@ -4889,15 +4616,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -4925,21 +4643,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "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]] name = "windows-targets" version = "0.52.6" @@ -4973,12 +4676,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -4991,12 +4688,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -5009,12 +4700,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -5039,12 +4724,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -5057,12 +4736,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -5075,12 +4748,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -5093,12 +4760,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -5120,16 +4781,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wit-bindgen" version = "0.57.1" diff --git a/Cargo.toml b/Cargo.toml index eb50dac..bf9f45f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,7 +57,6 @@ opentelemetry-otlp = { version = "0.32", default-features = false, features = [ ] } opentelemetry-prometheus = "0.32" prometheus = "0.14" -prusto = "0.5" pyo3 = { version = "0.29", features = ["auto-initialize"] } rand = "0.10" redis = { version = "1.2", default-features = false, features = [ @@ -98,6 +97,7 @@ tracing = "0.1" tracing-opentelemetry = "0.33" tracing-subscriber = { version = "0.3", features = ["env-filter"] } trait-variant = "0.1" +trino-rust-client = "0.9" url = { version = "2.5", features = ["serde"] } urlencoding = "2.1" @@ -105,4 +105,5 @@ urlencoding = "2.1" indicatif = "0.18" [patch.crates-io] -prusto = { git = "https://github.com/sbernauer/prusto.git", branch = "feat/derive-name-attribute-2" } +# We raised a bunch of PRs, which aren't merged yet +trino-rust-client = { git = "https://github.com/stackabletech/trino-rust-client.git", branch = "trino-lb" } diff --git a/trino-lb-bench/Cargo.toml b/trino-lb-bench/Cargo.toml index 29f1865..050b1b9 100644 --- a/trino-lb-bench/Cargo.toml +++ b/trino-lb-bench/Cargo.toml @@ -12,6 +12,6 @@ publish = false clap.workspace = true futures.workspace = true indicatif.workspace = true -prusto.workspace = true +trino-rust-client.workspace = true tokio.workspace = true url.workspace = true diff --git a/trino-lb-bench/src/main.rs b/trino-lb-bench/src/main.rs index fa06f54..44b6299 100644 --- a/trino-lb-bench/src/main.rs +++ b/trino-lb-bench/src/main.rs @@ -3,8 +3,8 @@ use std::{sync::Arc, time::Duration}; use args::Args; use clap::Parser; use indicatif::{MultiProgress, ProgressBar}; -use prusto::{ClientBuilder, Row, auth::Auth}; use tokio::time; +use trino_rust_client::{ClientBuilder, Row, auth::Auth}; mod args; @@ -41,19 +41,21 @@ async fn main() { while count < args.queries { interval.tick().await; - let client_clone = Arc::clone(&client); - let finished_bar_clone = Arc::clone(&finished_bar); - handles.push(tokio::spawn(async move { - let result = client_clone - .get_all::("select count(*) from tpch.sf2.lineitem".to_owned()) - .await; - if let Err(err) = result { - println!("[WARN] Query failed: {err}") - } - finished_bar_clone.inc(1); - })); - started_bar.inc(1); - count += 1; + { + let client = client.clone(); + let finished_bar = finished_bar.clone(); + handles.push(tokio::spawn(async move { + let result = client + .get_all::("select count(*) from tpch.sf2.lineitem".to_owned()) + .await; + if let Err(err) = result { + println!("[WARN] Query failed: {err}") + } + finished_bar.inc(1); + })); + started_bar.inc(1); + count += 1; + } } futures::future::join_all(handles).await; diff --git a/trino-lb-core/Cargo.toml b/trino-lb-core/Cargo.toml index ab61ed7..db16a8d 100644 --- a/trino-lb-core/Cargo.toml +++ b/trino-lb-core/Cargo.toml @@ -15,7 +15,6 @@ http.workspace = true humantime-serde.workspace = true number_prefix.workspace = true opentelemetry-otlp.workspace = true -prusto.workspace = true rand.workspace = true reqwest.workspace = true serde_json.workspace = true @@ -24,6 +23,7 @@ serde.workspace = true snafu.workspace = true strum.workspace = true tracing.workspace = true +trino-rust-client.workspace = true url.workspace = true [dev-dependencies] diff --git a/trino-lb-core/src/trino_api.rs b/trino-lb-core/src/trino_api.rs index 645f38d..afca496 100644 --- a/trino-lb-core/src/trino_api.rs +++ b/trino-lb-core/src/trino_api.rs @@ -3,11 +3,11 @@ use std::{ time::{Duration, SystemTimeError}, }; -use prusto::{QueryError, Warning}; use serde::{Deserialize, Serialize}; use serde_json::{Value, value::RawValue}; use snafu::{ResultExt, Snafu}; use tracing::instrument; +use trino_rust_client::{QueryError, Warning}; use url::Url; use crate::{TrinoQueryId, trino_query::QueuedQuery}; @@ -62,7 +62,7 @@ pub struct TrinoQueryApiResponse { pub update_count: Option, } -/// Copied from [`prusto::Stat`], but with `root_stage` +/// Copied from [`trino_rust_client::Stat`], but with `root_stage` #[derive(Deserialize, Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct Stat { diff --git a/trino-lb-core/src/trino_query_plan.rs b/trino-lb-core/src/trino_query_plan.rs index ecaa52e..f7e5e2e 100644 --- a/trino-lb-core/src/trino_query_plan.rs +++ b/trino-lb-core/src/trino_query_plan.rs @@ -1,12 +1,12 @@ use std::{collections::BTreeMap, fmt::Display, iter::Sum, ops::Add}; use number_prefix::NumberPrefix; -use prusto::Presto; use serde::{Deserialize, Deserializer, Serialize}; +use trino_rust_client::Trino; -#[derive(Clone, Debug, Presto)] +#[derive(Clone, Debug, Deserialize, Serialize, Trino)] pub struct ExplainQueryResult { - #[presto(rename = "Query Plan")] + #[trino(rename = "Query Plan")] pub query_plan: String, } diff --git a/trino-lb/Cargo.toml b/trino-lb/Cargo.toml index 8d0391e..fb0cb47 100644 --- a/trino-lb/Cargo.toml +++ b/trino-lb/Cargo.toml @@ -36,7 +36,6 @@ opentelemetry-otlp.workspace = true opentelemetry-prometheus.workspace = true opentelemetry.workspace = true prometheus.workspace = true -prusto.workspace = true pyo3.workspace = true rand.workspace = true redis.workspace = true @@ -54,6 +53,7 @@ tower-http.workspace = true tracing-opentelemetry.workspace = true tracing-subscriber.workspace = true tracing.workspace = true +trino-rust-client.workspace = true url.workspace = true urlencoding.workspace = true diff --git a/trino-lb/src/trino_client/mod.rs b/trino-lb/src/trino_client/mod.rs index 5bb5bb8..badb527 100644 --- a/trino-lb/src/trino_client/mod.rs +++ b/trino-lb/src/trino_client/mod.rs @@ -1,11 +1,11 @@ use http::HeaderMap; -use prusto::{Client, ClientBuilder, DataSet, auth::Auth}; use snafu::{OptionExt, ResultExt, Snafu}; use tracing::instrument; use trino_lb_core::{ sanitization::Sanitize, trino_query_plan::{ExplainQueryResult, QueryPlan, QueryPlanEstimation}, }; +use trino_rust_client::{Client, ClientBuilder, DataSet, auth::Auth}; use url::Url; pub use crate::trino_client::cluster_info::{ClusterInfo, get_cluster_info}; @@ -24,8 +24,8 @@ pub enum Error { #[snafu(display("Failed to create Trino client"))] CreateTrinoClient { - #[snafu(source(from(prusto::error::Error, Box::new)))] - source: Box, + #[snafu(source(from(trino_rust_client::error::Error, Box::new)))] + source: Box, }, #[snafu(display("Failed to create HTTP client"))] @@ -33,8 +33,8 @@ pub enum Error { #[snafu(display("Failed to execute explain query {explain_query:?}"))] ExecuteExplainQuery { - #[snafu(source(from(prusto::error::Error, Box::new)))] - source: Box, + #[snafu(source(from(trino_rust_client::error::Error, Box::new)))] + source: Box, explain_query: String, },