chore: update pgwire and rustls libraries (#1380)

* feat: update pgwire to 0.13 and fix grafana compatibility

* chore: update pgwire and rustls

* chore: remove unsued imports

* style: format toml
This commit is contained in:
Ning Sun
2023-04-14 11:06:01 +08:00
committed by GitHub
parent 3e7f7e3e8d
commit 43391e0162
3 changed files with 224 additions and 69 deletions

279
Cargo.lock generated
View File

@@ -2479,6 +2479,16 @@ dependencies = [
"zeroize",
]
[[package]]
name = "der"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82b10af9f9f9f2134a42d3f8aa74658660f2e0234b0eb81bd171df8aa32779ed"
dependencies = [
"const-oid",
"zeroize",
]
[[package]]
name = "derive-new"
version = "0.5.9"
@@ -2958,7 +2968,6 @@ dependencies = [
"query",
"rstest",
"rstest_reuse",
"rustls",
"script",
"serde",
"serde_json",
@@ -3466,9 +3475,9 @@ checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
dependencies = [
"http",
"hyper",
"rustls",
"rustls 0.20.8",
"tokio",
"tokio-rustls",
"tokio-rustls 0.23.4",
]
[[package]]
@@ -3679,7 +3688,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378"
dependencies = [
"base64 0.21.0",
"pem",
"pem 1.1.1",
"ring",
"serde",
"serde_json",
@@ -3817,9 +3826,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.140"
version = "0.2.141"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
[[package]]
name = "libloading"
@@ -3966,18 +3975,18 @@ dependencies = [
[[package]]
name = "lru"
version = "0.8.1"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909"
checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17"
dependencies = [
"hashbrown 0.12.3",
"hashbrown 0.13.2",
]
[[package]]
name = "lru"
version = "0.9.0"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17"
checksum = "03f1160296536f10c833a82dca22267d5486734230d47bf00bf435885814ba1e"
dependencies = [
"hashbrown 0.13.2",
]
@@ -4365,10 +4374,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
[[package]]
name = "mysql_async"
version = "0.31.3"
name = "mysql-common-derive"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2975442c70450b8f3a0400216321f6ab7b8bda177579f533d312ac511f913655"
checksum = "8c3c1f30203977ce6134381bd895ba82892f967578442a0894484858594de992"
dependencies = [
"darling",
"heck 0.4.1",
"num-bigint",
"proc-macro-crate 1.3.1",
"proc-macro-error",
"proc-macro2",
"quote",
"syn 1.0.109",
"termcolor",
"thiserror",
]
[[package]]
name = "mysql_async"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7089295150273e5d211a11222dcae3974c9aa4f7691c288e10e2e8aa43b3b1e9"
dependencies = [
"bytes",
"crossbeam",
@@ -4377,39 +4404,39 @@ dependencies = [
"futures-sink",
"futures-util",
"lazy_static",
"lru 0.8.1",
"lru 0.10.0",
"mio",
"mysql_common",
"once_cell",
"pem",
"pem 2.0.1",
"percent-encoding",
"pin-project",
"priority-queue",
"rustls",
"rustls 0.21.0",
"rustls-pemfile",
"serde",
"serde_json",
"socket2 0.4.9",
"socket2 0.5.2",
"thiserror",
"tokio",
"tokio-rustls",
"tokio-rustls 0.24.0",
"tokio-util",
"twox-hash",
"url",
"webpki",
"webpki-roots",
"webpki-roots 0.23.0",
]
[[package]]
name = "mysql_common"
version = "0.29.2"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9006c95034ccf7b903d955f210469119f6c3477fc9c9e7a7845ce38a3e665c2a"
checksum = "92439c97246ac4c7b3172e6adc45a75205a45e805979319e25a75a376a3f910d"
dependencies = [
"base64 0.13.1",
"base64 0.21.0",
"bigdecimal",
"bindgen",
"bitflags 1.3.2",
"bitflags 2.0.2",
"bitvec",
"byteorder",
"bytes",
@@ -4421,6 +4448,7 @@ dependencies = [
"frunk",
"lazy_static",
"lexical",
"mysql-common-derive",
"num-bigint",
"num-traits",
"rand",
@@ -4791,8 +4819,9 @@ dependencies = [
[[package]]
name = "opensrv-mysql"
version = "0.3.0"
source = "git+https://github.com/sunng87/opensrv?branch=fix/buffer-overread#d5c24b25543ba48b69c3c4fe97f71e499819bd99"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e34be5f325aa2d88f9770cea96539b58297b83cc7f80b2b317711af787f6c5a7"
dependencies = [
"async-trait",
"byteorder",
@@ -4801,7 +4830,7 @@ dependencies = [
"nom",
"pin-project-lite",
"tokio",
"tokio-rustls",
"tokio-rustls 0.24.0",
]
[[package]]
@@ -5059,6 +5088,16 @@ dependencies = [
"base64 0.13.1",
]
[[package]]
name = "pem"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a"
dependencies = [
"base64 0.21.0",
"serde",
]
[[package]]
name = "pem-rfc7468"
version = "0.6.0"
@@ -5130,9 +5169,9 @@ dependencies = [
[[package]]
name = "pgwire"
version = "0.12.0"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7384deed2eb0a2372259f454f1071561b3fc9ec6742fe3a8a2d2a72e8b28d9ff"
checksum = "3da58f2d096a2b20ee96420524c6156425575b64409a25acdf638bff450cf53a"
dependencies = [
"async-trait",
"base64 0.21.0",
@@ -5151,7 +5190,7 @@ dependencies = [
"thiserror",
"time 0.3.17",
"tokio",
"tokio-rustls",
"tokio-rustls 0.24.0",
"tokio-util",
"x509-certificate",
]
@@ -5277,9 +5316,9 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eff33bdbdfc54cc98a2eca766ebdec3e1b8fb7387523d5c9c9a2891da856f719"
dependencies = [
"der",
"der 0.6.1",
"pkcs8",
"spki",
"spki 0.6.0",
"zeroize",
]
@@ -5289,8 +5328,8 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"
dependencies = [
"der",
"spki",
"der 0.6.1",
"spki 0.6.0",
]
[[package]]
@@ -6106,14 +6145,14 @@ dependencies = [
"once_cell",
"percent-encoding",
"pin-project-lite",
"rustls",
"rustls 0.20.8",
"rustls-native-certs",
"rustls-pemfile",
"serde",
"serde_json",
"serde_urlencoded",
"tokio",
"tokio-rustls",
"tokio-rustls 0.23.4",
"tokio-util",
"tower-service",
"url",
@@ -6400,6 +6439,18 @@ dependencies = [
"webpki",
]
[[package]]
name = "rustls"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d"
dependencies = [
"log",
"ring",
"rustls-webpki",
"sct",
]
[[package]]
name = "rustls-native-certs"
version = "0.6.2"
@@ -6421,6 +6472,16 @@ dependencies = [
"base64 0.21.0",
]
[[package]]
name = "rustls-webpki"
version = "0.100.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b"
dependencies = [
"ring",
"untrusted",
]
[[package]]
name = "rustpython-ast"
version = "0.1.0"
@@ -7163,7 +7224,7 @@ dependencies = [
"rand",
"regex",
"rust-embed",
"rustls",
"rustls 0.21.0",
"rustls-pemfile",
"schemars",
"script",
@@ -7179,7 +7240,7 @@ dependencies = [
"tokio",
"tokio-postgres",
"tokio-postgres-rustls",
"tokio-rustls",
"tokio-rustls 0.24.0",
"tokio-stream",
"tokio-test",
"tonic",
@@ -7399,12 +7460,12 @@ dependencies = [
[[package]]
name = "socket2"
version = "0.5.1"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc8d618c6641ae355025c449427f9e96b98abf99a772be3cef6708d15c77147a"
checksum = "6d283f86695ae989d1e18440a943880967156325ba025f05049946bff47bcc2b"
dependencies = [
"libc",
"windows-sys 0.45.0",
"windows-sys 0.48.0",
]
[[package]]
@@ -7432,7 +7493,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"
dependencies = [
"base64ct",
"der",
"der 0.6.1",
]
[[package]]
name = "spki"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37a5be806ab6f127c3da44b7378837ebf01dadca8510a0e572460216b228bd0e"
dependencies = [
"base64ct",
"der 0.7.3",
]
[[package]]
@@ -8252,7 +8323,7 @@ dependencies = [
"pin-project-lite",
"postgres-protocol",
"postgres-types",
"socket2 0.5.1",
"socket2 0.5.2",
"tokio",
"tokio-util",
]
@@ -8260,15 +8331,14 @@ dependencies = [
[[package]]
name = "tokio-postgres-rustls"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "606f2b73660439474394432239c82249c0d45eb5f23d91f401be1e33590444a7"
source = "git+https://github.com/sunng87/tokio-postgres-rustls.git?branch=patch-1#9f6e8a1c11e33c43a80618acd6b5135a7fb9a4be"
dependencies = [
"futures",
"ring",
"rustls",
"rustls 0.21.0",
"tokio",
"tokio-postgres",
"tokio-rustls",
"tokio-rustls 0.24.0",
]
[[package]]
@@ -8277,11 +8347,21 @@ version = "0.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
dependencies = [
"rustls",
"rustls 0.20.8",
"tokio",
"webpki",
]
[[package]]
name = "tokio-rustls"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5"
dependencies = [
"rustls 0.21.0",
"tokio",
]
[[package]]
name = "tokio-stream"
version = "0.1.12"
@@ -8371,7 +8451,7 @@ dependencies = [
"prost-derive",
"rustls-pemfile",
"tokio",
"tokio-rustls",
"tokio-rustls 0.23.4",
"tokio-stream",
"tokio-util",
"tower",
@@ -8912,11 +8992,11 @@ dependencies = [
"base64 0.13.1",
"log",
"once_cell",
"rustls",
"rustls 0.20.8",
"rustls-native-certs",
"url",
"webpki",
"webpki-roots",
"webpki-roots 0.22.6",
]
[[package]]
@@ -9162,6 +9242,15 @@ dependencies = [
"webpki",
]
[[package]]
name = "webpki-roots"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa54963694b65584e170cf5dc46aeb4dcaa5584e652ff5f3952e56d66aff0125"
dependencies = [
"rustls-webpki",
]
[[package]]
name = "which"
version = "4.4.0"
@@ -9239,7 +9328,7 @@ version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25"
dependencies = [
"windows-targets",
"windows-targets 0.42.2",
]
[[package]]
@@ -9248,12 +9337,12 @@ version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_gnullvm 0.42.2",
"windows_aarch64_msvc 0.42.2",
"windows_i686_gnu 0.42.2",
"windows_i686_msvc 0.42.2",
"windows_x86_64_gnu 0.42.2",
"windows_x86_64_gnullvm",
"windows_x86_64_gnullvm 0.42.2",
"windows_x86_64_msvc 0.42.2",
]
@@ -9263,7 +9352,16 @@ version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
dependencies = [
"windows-targets",
"windows-targets 0.42.2",
]
[[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.0",
]
[[package]]
@@ -9272,21 +9370,42 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_gnullvm 0.42.2",
"windows_aarch64_msvc 0.42.2",
"windows_i686_gnu 0.42.2",
"windows_i686_msvc 0.42.2",
"windows_x86_64_gnu 0.42.2",
"windows_x86_64_gnullvm",
"windows_x86_64_gnullvm 0.42.2",
"windows_x86_64_msvc 0.42.2",
]
[[package]]
name = "windows-targets"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
dependencies = [
"windows_aarch64_gnullvm 0.48.0",
"windows_aarch64_msvc 0.48.0",
"windows_i686_gnu 0.48.0",
"windows_i686_msvc 0.48.0",
"windows_x86_64_gnu 0.48.0",
"windows_x86_64_gnullvm 0.48.0",
"windows_x86_64_msvc 0.48.0",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.39.0"
@@ -9299,6 +9418,12 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
[[package]]
name = "windows_i686_gnu"
version = "0.39.0"
@@ -9311,6 +9436,12 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
[[package]]
name = "windows_i686_gnu"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
[[package]]
name = "windows_i686_msvc"
version = "0.39.0"
@@ -9323,6 +9454,12 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
[[package]]
name = "windows_i686_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
[[package]]
name = "windows_x86_64_gnu"
version = "0.39.0"
@@ -9335,12 +9472,24 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
[[package]]
name = "windows_x86_64_msvc"
version = "0.39.0"
@@ -9353,6 +9502,12 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
[[package]]
name = "winnow"
version = "0.4.1"
@@ -9382,19 +9537,19 @@ dependencies = [
[[package]]
name = "x509-certificate"
version = "0.18.0"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6ae06cd45e681e1ae216e2e668e30ce1c4f02db026374bde8c0644684af1721"
checksum = "bf14059fbc1dce14de1d08535c411ba0b18749c2550a12550300da90b7ba350b"
dependencies = [
"bcder",
"bytes",
"chrono",
"der",
"der 0.7.3",
"hex",
"pem",
"pem 1.1.1",
"ring",
"signature",
"spki",
"spki 0.7.1",
"thiserror",
]

View File

@@ -40,7 +40,6 @@ openmetrics-parser = "0.4"
partition = { path = "../partition" }
prost.workspace = true
query = { path = "../query" }
rustls = "0.20"
script = { path = "../script", features = ["python"], optional = true }
serde = "1.0"
serde_json = "1.0"

View File

@@ -44,9 +44,9 @@ mime_guess = "2.0"
num_cpus = "1.13"
once_cell = "1.16"
openmetrics-parser = "0.4"
opensrv-mysql = { git = "https://github.com/sunng87/opensrv", branch = "fix/buffer-overread" }
opensrv-mysql = "0.4"
parking_lot = "0.12"
pgwire = "0.12"
pgwire = "0.13"
pin-project = "1.0"
postgres-types = { version = "0.2", features = ["with-chrono-0_4"] }
promql-parser = "0.1.0"
@@ -54,7 +54,7 @@ prost.workspace = true
query = { path = "../query" }
rand.workspace = true
regex = "1.6"
rustls = "0.20"
rustls = "0.21"
rustls-pemfile = "1.0"
rust-embed = { version = "6.6", features = ["debug-embed"] }
schemars = "0.8"
@@ -67,7 +67,7 @@ snap = "1"
sql = { path = "../sql" }
strum = { version = "0.24", features = ["derive"] }
table = { path = "../table" }
tokio-rustls = "0.23"
tokio-rustls = "0.24"
tokio-stream = { version = "0.1", features = ["net"] }
tokio.workspace = true
tonic.workspace = true
@@ -81,13 +81,14 @@ axum-test-helper = { git = "https://github.com/sunng87/axum-test-helper.git", br
client = { path = "../client" }
common-base = { path = "../common/base" }
common-test-util = { path = "../common/test-util" }
mysql_async = { version = "0.31", default-features = false, features = [
mysql_async = { version = "0.32", default-features = false, features = [
"default-rustls",
] }
rand.workspace = true
rustls = { version = "0.21", features = ["dangerous_configuration"] }
script = { path = "../script", features = ["python"] }
serde_json = "1.0"
table = { path = "../table" }
tokio-postgres = "0.7"
tokio-postgres-rustls = "0.9"
tokio-postgres-rustls = { git = "https://github.com/sunng87/tokio-postgres-rustls.git", branch = "patch-1" }
tokio-test = "0.4"