From ecfd0c08dd39d01857ac018ee7a47cf9040a78a8 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Wed, 25 Oct 2023 08:36:25 -0700 Subject: [PATCH 1/5] routes peer checks to api --- flow/connectors/bigquery/bigquery.go | 5 + flow/connectors/core.go | 7 +- flow/connectors/eventhub/eventhub.go | 2 +- flow/connectors/external_metadata/store.go | 10 + flow/connectors/s3/s3.go | 5 +- nexus/Cargo.lock | 834 +++++++++++---------- nexus/server/src/main.rs | 5 +- 7 files changed, 485 insertions(+), 383 deletions(-) diff --git a/flow/connectors/bigquery/bigquery.go b/flow/connectors/bigquery/bigquery.go index 895bc8843f..3e33dd3853 100644 --- a/flow/connectors/bigquery/bigquery.go +++ b/flow/connectors/bigquery/bigquery.go @@ -205,6 +205,11 @@ func (c *BigQueryConnector) Close() error { // ConnectionActive returns true if the connection is active. func (c *BigQueryConnector) ConnectionActive() bool { + _, err := c.client.Dataset(c.datasetID).Metadata(c.ctx) + if err != nil { + return false + } + return c.client != nil } diff --git a/flow/connectors/core.go b/flow/connectors/core.go index 4c393ca48d..bd460247bc 100644 --- a/flow/connectors/core.go +++ b/flow/connectors/core.go @@ -223,7 +223,12 @@ func GetConnector(ctx context.Context, peer *protos.Peer) (Connector, error) { return nil, fmt.Errorf("missing snowflake config for %s peer %s", peer.Type.String(), peer.Name) } return connsnowflake.NewSnowflakeConnector(ctx, sfConfig) - + case protos.DBType_S3: + s3Config := peer.GetS3Config() + if s3Config == nil { + return nil, fmt.Errorf("missing s3 config for %s peer %s", peer.Type.String(), peer.Name) + } + return conns3.NewS3Connector(ctx, s3Config) case protos.DBType_SQLSERVER: sqlServerConfig := peer.GetSqlserverConfig() if sqlServerConfig == nil { diff --git a/flow/connectors/eventhub/eventhub.go b/flow/connectors/eventhub/eventhub.go index 73c8ed528c..fb8c3b948f 100644 --- a/flow/connectors/eventhub/eventhub.go +++ b/flow/connectors/eventhub/eventhub.go @@ -66,7 +66,7 @@ func (c *EventHubConnector) Close() error { } func (c *EventHubConnector) ConnectionActive() bool { - return true + return c.pgMetadata.Ping() } func (c *EventHubConnector) InitializeTableSchema(req map[string]*protos.TableSchema) error { diff --git a/flow/connectors/external_metadata/store.go b/flow/connectors/external_metadata/store.go index f1b8c25079..743803a940 100644 --- a/flow/connectors/external_metadata/store.go +++ b/flow/connectors/external_metadata/store.go @@ -52,6 +52,16 @@ func NewPostgresMetadataStore(ctx context.Context, pgConfig *protos.PostgresConf }, nil } +func (p *PostgresMetadataStore) Ping() bool { + err := p.pool.Ping(p.ctx) + if err != nil { + log.Errorf("failed to connect to metadata db: %v", err) + return false + } + + return true +} + func (p *PostgresMetadataStore) Close() error { if p.pool != nil { p.pool.Close() diff --git a/flow/connectors/s3/s3.go b/flow/connectors/s3/s3.go index 5c5ed1a188..fac8a607de 100644 --- a/flow/connectors/s3/s3.go +++ b/flow/connectors/s3/s3.go @@ -141,8 +141,9 @@ func ValidCheck(s3Client *s3.S3, bucketURL string, metadataDB *metadataStore.Pos } func (c *S3Connector) ConnectionActive() bool { - _, err := c.client.ListBuckets(nil) - return err == nil + _, listErr := c.client.ListBuckets(nil) + pinged := c.pgMetadata.Ping() + return listErr == nil && pinged } func (c *S3Connector) NeedsSetupMetadataTables() bool { diff --git a/nexus/Cargo.lock b/nexus/Cargo.lock index e82f078039..bdc2341f07 100644 --- a/nexus/Cargo.lock +++ b/nexus/Cargo.lock @@ -30,20 +30,31 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ "getrandom", "once_cell", "version_check", ] +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -79,9 +90,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", @@ -93,15 +104,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -112,17 +123,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -151,9 +162,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-compression" -version = "0.4.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" +checksum = "bb42b2197bf15ccb092b62c74515dbd8b86d0effd934795f6687c93b6e679a2c" dependencies = [ "flate2", "futures-core", @@ -170,7 +181,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -192,18 +203,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -280,9 +291,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -322,9 +333,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "bitvec" @@ -358,26 +369,47 @@ dependencies = [ [[package]] name = "borsh" -version = "1.2.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf617fabf5cdbdc92f774bfe5062d870f228b80056d41180797abf48bed4056e" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" dependencies = [ "borsh-derive", - "cfg_aliases", + "hashbrown 0.13.2", ] [[package]] name = "borsh-derive" -version = "1.2.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f404657a7ea7b5249e36808dff544bc88a28f26e0ac40009f674b7a009d14be3" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" dependencies = [ - "once_cell", + "borsh-derive-internal", + "borsh-schema-derive-internal", "proc-macro-crate", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", - "syn_derive", + "syn 1.0.109", ] [[package]] @@ -410,9 +442,9 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.5.0" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" @@ -500,17 +532,11 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" dependencies = [ "android-tzdata", "iana-time-zone", @@ -533,9 +559,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.8" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" +checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" dependencies = [ "clap_builder", "clap_derive", @@ -543,9 +569,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.8" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" dependencies = [ "anstream", "anstyle", @@ -555,21 +581,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "colorchoice" @@ -585,7 +611,7 @@ checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -649,9 +675,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -725,7 +751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown 0.14.0", "lock_api", "once_cell", "parking_lot_core", @@ -757,9 +783,9 @@ dependencies = [ [[package]] name = "deadpool-runtime" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" +checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1" dependencies = [ "tokio", ] @@ -777,11 +803,10 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" dependencies = [ - "powerfmt", "serde", ] @@ -868,12 +893,23 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", "libc", - "windows-sys", ] [[package]] @@ -884,9 +920,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "filetime" @@ -897,7 +933,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall 0.3.5", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -962,9 +998,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -977,9 +1013,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -992,9 +1028,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1002,15 +1038,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1019,38 +1055,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1108,13 +1144,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -1131,9 +1169,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -1143,9 +1181,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.22" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1153,7 +1191,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -1166,22 +1204,31 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", ] [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] name = "hdrhistogram" -version = "7.5.4" +version = "7.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" +checksum = "7f19b9f54f7c7f55e31401bb647626ce0cf0f67b0004982ce815b3ee72a02aa8" dependencies = [ - "base64 0.21.5", + "base64 0.13.1", "byteorder", "flate2", "nom", @@ -1196,9 +1243,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1221,14 +1268,14 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "http" -version = "0.2.11" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -1281,7 +1328,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1290,9 +1337,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", "http", @@ -1331,16 +1378,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows", ] [[package]] @@ -1354,9 +1401,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1374,12 +1421,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.0", ] [[package]] @@ -1394,9 +1441,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" @@ -1406,7 +1453,7 @@ checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1444,22 +1491,23 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonwebtoken" -version = "9.1.0" +version = "9.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155c4d7e39ad04c172c5e3a99c434ea3b4a7ba7960b38ecd562b270b097cce09" +checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" dependencies = [ - "base64 0.21.5", + "base64 0.21.4", + "js-sys", "pem 3.0.2", - "ring 0.17.5", + "ring 0.17.6", "serde", "serde_json", "simple_asn1", @@ -1476,27 +1524,27 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.150" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -1536,17 +1584,16 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.7.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" [[package]] name = "md-5" -version = "0.10.6" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" dependencies = [ - "cfg-if", "digest", ] @@ -1558,9 +1605,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.6.4" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memoffset" @@ -1594,13 +1641,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1698,9 +1745,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", "libm", @@ -1742,11 +1789,11 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.60" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -1763,7 +1810,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -1774,18 +1821,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.1.6+3.1.4" +version = "300.1.3+3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085" +checksum = "cd2c101a165fff9935e34def4669595ab1c7847943c42be86e21503e482be107" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.96" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -1812,13 +1859,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.3.5", "smallvec", "windows-targets", ] @@ -1829,7 +1876,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" dependencies = [ - "base64 0.21.5", + "base64 0.21.4", "serde", ] @@ -1959,7 +2006,7 @@ dependencies = [ "anyhow", "async-recursion", "async-trait", - "base64 0.21.5", + "base64 0.21.4", "catalog", "chrono", "dashmap", @@ -2047,7 +2094,7 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" dependencies = [ - "base64 0.21.5", + "base64 0.21.4", "serde", ] @@ -2057,7 +2104,7 @@ version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923" dependencies = [ - "base64 0.21.5", + "base64 0.21.4", "serde", ] @@ -2072,9 +2119,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "petgraph" @@ -2083,7 +2130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.0.0", ] [[package]] @@ -2100,7 +2147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06d04982366efd653d4365175426acbabd55efb07231869e92b9e1f5b3faf7df" dependencies = [ "async-trait", - "base64 0.21.5", + "base64 0.21.4", "bytes", "chrono", "derive-new", @@ -2156,7 +2203,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -2272,7 +2319,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64 0.21.5", + "base64 0.21.4", "byteorder", "bytes", "fallible-iterator", @@ -2300,12 +2347,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2329,16 +2370,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml_edit 0.20.7", + "toml 0.5.11", ] [[package]] @@ -2367,9 +2408,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -2392,7 +2433,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes", "heck", - "itertools 0.11.0", + "itertools 0.10.5", "log", "multimap", "once_cell", @@ -2401,7 +2442,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.39", + "syn 2.0.33", "tempfile", "which", ] @@ -2413,10 +2454,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.10.5", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -2595,7 +2636,7 @@ dependencies = [ "quote", "refinery-core", "regex", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -2644,21 +2685,21 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rend" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" dependencies = [ "bytecheck", ] [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "async-compression", - "base64 0.21.5", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", @@ -2682,7 +2723,6 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls", @@ -2692,7 +2732,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.2", "winreg", ] @@ -2713,16 +2753,16 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" dependencies = [ "cc", "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2755,14 +2795,16 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3211b01eea83d80687da9eef70e39d65144a3894866a5153a2723e425a157f" +checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" dependencies = [ + "byteorder", "const-oid", "digest", "num-bigint-dig", "num-integer", + "num-iter", "num-traits", "pkcs1", "pkcs8", @@ -2775,9 +2817,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.33.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" +checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd" dependencies = [ "arrayvec", "borsh", @@ -2799,26 +2841,26 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.25" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.0", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", - "ring 0.17.5", - "rustls-webpki", + "ring 0.16.20", + "rustls-webpki 0.101.5", "sct", ] @@ -2836,21 +2878,31 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.5", + "base64 0.21.4", ] [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.100.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -2889,7 +2941,7 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2911,12 +2963,12 @@ dependencies = [ [[package]] name = "sct" -version = "0.7.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -2983,7 +3035,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -3020,11 +3072,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.27" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.0.0", "itoa", "ryu", "serde", @@ -3033,9 +3085,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -3057,9 +3109,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.7" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" dependencies = [ "lazy_static", ] @@ -3075,9 +3127,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ "digest", "rand_core", @@ -3109,14 +3161,14 @@ dependencies = [ [[package]] name = "simple_logger" -version = "4.3.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0ca6504625ee1aa5fda33913d2005eab98c7a42dd85f116ecce3ff54c9d3ef" +checksum = "2230cd5c29b815c9b699fb610b49a5ed65588f3509d9f0108be3a885da629333" dependencies = [ "colored", "log", "time", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -3142,9 +3194,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "snafu" @@ -3171,9 +3223,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.10" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -3181,12 +3233,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3270,54 +3322,21 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "9caece70c63bfba29ec2fed841a09851b14a235c60010fa4de58089b6c025668" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.39", -] - [[package]] name = "sync_wrapper" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[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", - "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 = "tap" version = "1.0.1" @@ -3345,36 +3364,36 @@ dependencies = [ "fastrand", "redox_syscall 0.4.1", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.4.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -3389,15 +3408,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ "deranged", "itoa", "libc", "num_threads", - "powerfmt", "serde", "time-core", "time-macros", @@ -3405,15 +3423,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -3435,9 +3453,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ "backtrace", "bytes", @@ -3447,10 +3465,10 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2 0.5.4", "tokio-macros", "tracing", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3465,13 +3483,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] @@ -3516,7 +3534,7 @@ dependencies = [ "postgres-protocol", "postgres-types", "rand", - "socket2 0.5.5", + "socket2 0.5.4", "tokio", "tokio-util", "whoami", @@ -3545,9 +3563,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -3557,6 +3575,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + [[package]] name = "toml" version = "0.7.8" @@ -3596,31 +3623,20 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", "winnow", ] -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - [[package]] name = "toml_edit" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -3636,7 +3652,7 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.5", + "base64 0.21.4", "bytes", "h2", "http", @@ -3714,10 +3730,11 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ + "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3725,32 +3742,31 @@ dependencies = [ [[package]] name = "tracing-appender" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ "crossbeam-channel", - "thiserror", "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -3758,20 +3774,20 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.2.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ + "lazy_static", "log", - "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "matchers", "nu-ansi-term", @@ -3799,9 +3815,9 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "typenum" -version = "1.17.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-bidi" @@ -3826,9 +3842,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unsafe-libyaml" @@ -3850,28 +3866,28 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.1" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" +checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" dependencies = [ - "base64 0.21.5", + "base64 0.21.4", "encoding_rs", "flate2", "log", "once_cell", "rustls", - "rustls-webpki", + "rustls-webpki 0.100.3", "serde", "serde_json", "url", - "webpki-roots", + "webpki-roots 0.23.1", ] [[package]] name = "url" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3892,9 +3908,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.6.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom", "serde", @@ -3910,7 +3926,7 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" name = "value" version = "0.1.0" dependencies = [ - "base64 0.21.5", + "base64 0.21.4", "bytes", "chrono", "hex", @@ -3963,9 +3979,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3973,24 +3989,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -4000,9 +4016,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4010,28 +4026,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.33", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -4039,9 +4055,18 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +dependencies = [ + "rustls-webpki 0.100.3", +] + +[[package]] +name = "webpki-roots" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "which" @@ -4083,9 +4108,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ "winapi", ] @@ -4097,14 +4122,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-core" -version = "0.51.1" +name = "windows" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "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 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -4120,51 +4160,93 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "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_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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[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_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_x86_64_gnu" +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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_msvc" +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.5" @@ -4173,9 +4255,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -4187,7 +4269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -4270,9 +4352,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.7.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" [[package]] name = "zopfli" diff --git a/nexus/server/src/main.rs b/nexus/server/src/main.rs index 8537fb9020..711171c1cc 100644 --- a/nexus/server/src/main.rs +++ b/nexus/server/src/main.rs @@ -157,8 +157,7 @@ impl NexusBackend { fn is_peer_validity_supported(peer_type: i32) -> bool { let unsupported_peer_types = [ 4, // EVENTHUB - 5, // S3 - 7, + 7, // EVENTHUB_GROUP ]; !unsupported_peer_types.contains(&peer_type) } @@ -411,7 +410,7 @@ impl NexusBackend { } => { let peer_type = peer.r#type; if Self::is_peer_validity_supported(peer_type) { - self.validate_peer(peer_type, peer).await.map_err(|e| { + self.validate_peer(peer).await.map_err(|e| { PgWireError::UserError(Box::new(ErrorInfo::new( "ERROR".to_owned(), "internal_error".to_owned(), From 17977ded13e7933e0e9389bd3e09e22894b6e188 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Fri, 1 Dec 2023 18:22:20 +0530 Subject: [PATCH 2/5] fix rebase issues --- flow/connectors/core.go | 6 ------ flow/connectors/eventhub/eventhub.go | 2 +- flow/connectors/external_metadata/store.go | 10 ---------- flow/connectors/s3/s3.go | 3 +-- nexus/server/src/main.rs | 2 +- 5 files changed, 3 insertions(+), 20 deletions(-) diff --git a/flow/connectors/core.go b/flow/connectors/core.go index bd460247bc..f39e8f397f 100644 --- a/flow/connectors/core.go +++ b/flow/connectors/core.go @@ -223,12 +223,6 @@ func GetConnector(ctx context.Context, peer *protos.Peer) (Connector, error) { return nil, fmt.Errorf("missing snowflake config for %s peer %s", peer.Type.String(), peer.Name) } return connsnowflake.NewSnowflakeConnector(ctx, sfConfig) - case protos.DBType_S3: - s3Config := peer.GetS3Config() - if s3Config == nil { - return nil, fmt.Errorf("missing s3 config for %s peer %s", peer.Type.String(), peer.Name) - } - return conns3.NewS3Connector(ctx, s3Config) case protos.DBType_SQLSERVER: sqlServerConfig := peer.GetSqlserverConfig() if sqlServerConfig == nil { diff --git a/flow/connectors/eventhub/eventhub.go b/flow/connectors/eventhub/eventhub.go index fb8c3b948f..73c8ed528c 100644 --- a/flow/connectors/eventhub/eventhub.go +++ b/flow/connectors/eventhub/eventhub.go @@ -66,7 +66,7 @@ func (c *EventHubConnector) Close() error { } func (c *EventHubConnector) ConnectionActive() bool { - return c.pgMetadata.Ping() + return true } func (c *EventHubConnector) InitializeTableSchema(req map[string]*protos.TableSchema) error { diff --git a/flow/connectors/external_metadata/store.go b/flow/connectors/external_metadata/store.go index 743803a940..f1b8c25079 100644 --- a/flow/connectors/external_metadata/store.go +++ b/flow/connectors/external_metadata/store.go @@ -52,16 +52,6 @@ func NewPostgresMetadataStore(ctx context.Context, pgConfig *protos.PostgresConf }, nil } -func (p *PostgresMetadataStore) Ping() bool { - err := p.pool.Ping(p.ctx) - if err != nil { - log.Errorf("failed to connect to metadata db: %v", err) - return false - } - - return true -} - func (p *PostgresMetadataStore) Close() error { if p.pool != nil { p.pool.Close() diff --git a/flow/connectors/s3/s3.go b/flow/connectors/s3/s3.go index fac8a607de..1b81cf17df 100644 --- a/flow/connectors/s3/s3.go +++ b/flow/connectors/s3/s3.go @@ -142,8 +142,7 @@ func ValidCheck(s3Client *s3.S3, bucketURL string, metadataDB *metadataStore.Pos func (c *S3Connector) ConnectionActive() bool { _, listErr := c.client.ListBuckets(nil) - pinged := c.pgMetadata.Ping() - return listErr == nil && pinged + return listErr == nil } func (c *S3Connector) NeedsSetupMetadataTables() bool { diff --git a/nexus/server/src/main.rs b/nexus/server/src/main.rs index 711171c1cc..34e4f029ce 100644 --- a/nexus/server/src/main.rs +++ b/nexus/server/src/main.rs @@ -410,7 +410,7 @@ impl NexusBackend { } => { let peer_type = peer.r#type; if Self::is_peer_validity_supported(peer_type) { - self.validate_peer(peer).await.map_err(|e| { + self.validate_peer(peer_type,peer).await.map_err(|e| { PgWireError::UserError(Box::new(ErrorInfo::new( "ERROR".to_owned(), "internal_error".to_owned(), From c23c9a7fa2fd8adb7da7e70ec72d8b123dde0ad7 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Fri, 1 Dec 2023 18:53:19 +0530 Subject: [PATCH 3/5] lint --- nexus/analyzer/src/qrep.rs | 6 +-- nexus/catalog/src/lib.rs | 3 +- nexus/flow-rs/src/grpc.rs | 1 - nexus/peer-bigquery/src/ast.rs | 89 ++++++++++++++++--------------- nexus/peer-bigquery/src/stream.rs | 10 +++- nexus/peer-snowflake/src/auth.rs | 4 +- nexus/server/src/main.rs | 68 ++++++++++------------- 7 files changed, 86 insertions(+), 95 deletions(-) diff --git a/nexus/analyzer/src/qrep.rs b/nexus/analyzer/src/qrep.rs index 1177dc85dd..b15f36d208 100644 --- a/nexus/analyzer/src/qrep.rs +++ b/nexus/analyzer/src/qrep.rs @@ -86,13 +86,13 @@ const QREP_OPTIONS: &[QRepOptionType] = &[ QRepOptionType::Boolean { name: "setup_watermark_table_on_destination", default_value: false, - required: false + required: false, }, QRepOptionType::Boolean { name: "dst_table_full_resync", default_value: false, - required: false - } + required: false, + }, ]; pub fn process_options( diff --git a/nexus/catalog/src/lib.rs b/nexus/catalog/src/lib.rs index c1851432e0..77467348e3 100644 --- a/nexus/catalog/src/lib.rs +++ b/nexus/catalog/src/lib.rs @@ -426,7 +426,8 @@ impl Catalog { .await?; let job = self.pg.query_opt(&stmt, &[&job_name]).await?.map(|row| { - let flow_opts: HashMap = row.get::<&str, Option>("flow_metadata") + let flow_opts: HashMap = row + .get::<&str, Option>("flow_metadata") .and_then(|flow_opts| serde_json::from_value(flow_opts).ok()) .unwrap_or_default(); diff --git a/nexus/flow-rs/src/grpc.rs b/nexus/flow-rs/src/grpc.rs index df6a642d86..7b11a6a2dd 100644 --- a/nexus/flow-rs/src/grpc.rs +++ b/nexus/flow-rs/src/grpc.rs @@ -1,4 +1,3 @@ - use catalog::WorkflowDetails; use pt::{ flow_model::{FlowJob, QRepFlowJob}, diff --git a/nexus/peer-bigquery/src/ast.rs b/nexus/peer-bigquery/src/ast.rs index 190b6d21be..8429e0ebe1 100644 --- a/nexus/peer-bigquery/src/ast.rs +++ b/nexus/peer-bigquery/src/ast.rs @@ -3,10 +3,9 @@ use std::ops::ControlFlow; use sqlparser::ast::Value::Number; use sqlparser::ast::{ - visit_expressions_mut, visit_function_arg_mut, visit_relations_mut, visit_setexpr_mut, - Array, ArrayElemTypeDef, BinaryOperator, DataType, DateTimeField, Expr, - Function, FunctionArg, FunctionArgExpr, Ident, - ObjectName, Query, SetExpr, SetOperator, SetQuantifier, TimezoneInfo, + visit_expressions_mut, visit_function_arg_mut, visit_relations_mut, visit_setexpr_mut, Array, + ArrayElemTypeDef, BinaryOperator, DataType, DateTimeField, Expr, Function, FunctionArg, + FunctionArgExpr, Ident, ObjectName, Query, SetExpr, SetOperator, SetQuantifier, TimezoneInfo, }; #[derive(Default)] @@ -99,11 +98,7 @@ impl BigqueryAst { visit_expressions_mut(query, |node| { // CAST AS Text to CAST AS String - if let Expr::Cast { - data_type: dt, - .. - } = node - { + if let Expr::Cast { data_type: dt, .. } = node { if let DataType::Text = dt { *dt = DataType::String(None); } @@ -177,7 +172,6 @@ impl BigqueryAst { distinct: false, special: false, order_by: vec![], - }) } else if let BinaryOperator::Plus = op { *node = Expr::Function(Function { @@ -241,7 +235,12 @@ impl BigqueryAst { // flatten ANY to IN operation overall. visit_expressions_mut(query, |node| { - if let Expr::AnyOp { left, compare_op, right } = node { + if let Expr::AnyOp { + left, + compare_op, + right, + } = node + { if matches!(compare_op, BinaryOperator::Eq | BinaryOperator::NotEq) { let list = self .flatten_expr_to_in_list(right) @@ -257,8 +256,6 @@ impl BigqueryAst { ControlFlow::<()>::Continue(()) }); - - Ok(()) } @@ -300,7 +297,10 @@ impl BigqueryAst { fn flatten_expr_to_in_list(&self, expr: &Expr) -> anyhow::Result> { let mut list = vec![]; // check if expr is of type Cast - if let Expr::Cast { expr, data_type, .. } = expr { + if let Expr::Cast { + expr, data_type, .. + } = expr + { // assert that expr is of type SingleQuotedString if let Expr::Value(sqlparser::ast::Value::SingleQuotedString(s)) = expr.as_ref() { // trim the starting and ending curly braces @@ -309,39 +309,40 @@ impl BigqueryAst { let split = s.split(','); // match on data type, and create a vector of Expr::Value match data_type { - DataType::Array(ArrayElemTypeDef::AngleBracket(inner)) | - DataType::Array(ArrayElemTypeDef::SquareBracket(inner)) - => match inner.as_ref() { - DataType::Text | DataType::Char(_) | DataType::Varchar(_) => { - for s in split { - list.push(Expr::Value(sqlparser::ast::Value::SingleQuotedString( - s.to_string(), - ))); + DataType::Array(ArrayElemTypeDef::AngleBracket(inner)) + | DataType::Array(ArrayElemTypeDef::SquareBracket(inner)) => { + match inner.as_ref() { + DataType::Text | DataType::Char(_) | DataType::Varchar(_) => { + for s in split { + list.push(Expr::Value( + sqlparser::ast::Value::SingleQuotedString(s.to_string()), + )); + } } - } - DataType::Integer(_) - | DataType::Float(_) - | DataType::BigInt(_) - | DataType::UnsignedBigInt(_) - | DataType::UnsignedInteger(_) - | DataType::UnsignedSmallInt(_) - | DataType::UnsignedTinyInt(_) - | DataType::TinyInt(_) - | DataType::UnsignedInt(_) => { - for s in split { - list.push(Expr::Value(sqlparser::ast::Value::Number( - s.to_string(), - false, - ))); + DataType::Integer(_) + | DataType::Float(_) + | DataType::BigInt(_) + | DataType::UnsignedBigInt(_) + | DataType::UnsignedInteger(_) + | DataType::UnsignedSmallInt(_) + | DataType::UnsignedTinyInt(_) + | DataType::TinyInt(_) + | DataType::UnsignedInt(_) => { + for s in split { + list.push(Expr::Value(sqlparser::ast::Value::Number( + s.to_string(), + false, + ))); + } + } + _ => { + return Err(anyhow::anyhow!( + "Unsupported inner data type for IN list: {:?}", + data_type + )) } } - _ => { - return Err(anyhow::anyhow!( - "Unsupported inner data type for IN list: {:?}", - data_type - )) - } - }, + } _ => { return Err(anyhow::anyhow!( "Unsupported data type for IN list: {:?}", diff --git a/nexus/peer-bigquery/src/stream.rs b/nexus/peer-bigquery/src/stream.rs index 02851ae2cd..53e85c021a 100644 --- a/nexus/peer-bigquery/src/stream.rs +++ b/nexus/peer-bigquery/src/stream.rs @@ -64,7 +64,10 @@ impl BqSchema { .schema .as_ref() .expect("Schema is not present"); - let fields = bq_schema.fields.as_ref().expect("Schema fields are not present"); + let fields = bq_schema + .fields + .as_ref() + .expect("Schema fields are not present"); let schema = SchemaRef::new(Schema { fields: fields @@ -76,7 +79,10 @@ impl BqSchema { .collect(), }); - Self { schema, fields: fields.clone() } + Self { + schema, + fields: fields.clone(), + } } pub fn schema(&self) -> SchemaRef { diff --git a/nexus/peer-snowflake/src/auth.rs b/nexus/peer-snowflake/src/auth.rs index e379b0f7fd..482272aecf 100644 --- a/nexus/peer-snowflake/src/auth.rs +++ b/nexus/peer-snowflake/src/auth.rs @@ -48,9 +48,7 @@ impl SnowflakeAuth { let pkey = match password { Some(pw) => DecodePrivateKey::from_pkcs8_encrypted_pem(private_key, pw) .context("Invalid private key or decryption failed")?, - None => { - DecodePrivateKey::from_pkcs8_pem(private_key).context("Invalid private key")? - } + None => DecodePrivateKey::from_pkcs8_pem(private_key).context("Invalid private key")?, }; let mut snowflake_auth: SnowflakeAuth = SnowflakeAuth { // moved normalized_account_id above account_id to satisfy the borrow checker. diff --git a/nexus/server/src/main.rs b/nexus/server/src/main.rs index 34e4f029ce..965175b864 100644 --- a/nexus/server/src/main.rs +++ b/nexus/server/src/main.rs @@ -208,50 +208,36 @@ impl NexusBackend { } } - async fn validate_peer<'a>(&self, peer_type: i32, peer: &Peer) -> anyhow::Result<()> { - if peer_type != 6 { - let peer_executor = self.get_peer_executor(peer).await.map_err(|err| { + async fn validate_peer<'a>(&self, peer: &Peer) -> anyhow::Result<()> { + //if flow handler does not exist, skip validation + if self.flow_handler.is_none() { + return Ok(()); + } + let mut flow_handler = self.flow_handler.as_ref().unwrap().lock().await; + let validate_request = pt::peerdb_route::ValidatePeerRequest { + peer: Some(Peer { + name: peer.name.clone(), + r#type: peer.r#type, + config: peer.config.clone(), + }), + }; + let validity = flow_handler + .validate_peer(&validate_request) + .await + .map_err(|err| { PgWireError::ApiError(Box::new(PgError::Internal { - err_msg: format!("unable to get peer executor: {:?}", err), + err_msg: format!("unable to check peer validity: {:?}", err), })) })?; - peer_executor.is_connection_valid().await.map_err(|e| { - self.executors.remove(&peer.name); // Otherwise it will keep returning the earlier configured executor - PgWireError::UserError(Box::new(ErrorInfo::new( - "ERROR".to_owned(), - "internal_error".to_owned(), - format!("[peer]: invalid configuration: {}", e), - ))) - })?; - self.executors.remove(&peer.name); - Ok(()) + if let PeerValidationResult::Invalid(validation_err) = validity { + Err(PgWireError::UserError(Box::new(ErrorInfo::new( + "ERROR".to_owned(), + "internal_error".to_owned(), + format!("[peer]: invalid configuration: {}", validation_err), + ))) + .into()) } else { - let mut flow_handler = self.flow_handler.as_ref().unwrap().lock().await; - let validate_request = pt::peerdb_route::ValidatePeerRequest { - peer: Some(Peer { - name: peer.name.clone(), - r#type: peer.r#type, - config: peer.config.clone(), - }), - }; - let validity = flow_handler - .validate_peer(&validate_request) - .await - .map_err(|err| { - PgWireError::ApiError(Box::new(PgError::Internal { - err_msg: format!("unable to check peer validity: {:?}", err), - })) - })?; - if let PeerValidationResult::Invalid(validation_err) = validity { - Err(PgWireError::UserError(Box::new(ErrorInfo::new( - "ERROR".to_owned(), - "internal_error".to_owned(), - format!("[peer]: invalid configuration: {}", validation_err), - ))) - .into()) - } else { - Ok(()) - } + Ok(()) } } @@ -410,7 +396,7 @@ impl NexusBackend { } => { let peer_type = peer.r#type; if Self::is_peer_validity_supported(peer_type) { - self.validate_peer(peer_type,peer).await.map_err(|e| { + self.validate_peer(peer).await.map_err(|e| { PgWireError::UserError(Box::new(ErrorInfo::new( "ERROR".to_owned(), "internal_error".to_owned(), From 92945d7fb3c5925f526f46462bb89a12a471cdce Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Fri, 1 Dec 2023 21:33:55 +0530 Subject: [PATCH 4/5] refactor connectionactive to include error --- flow/cmd/handler.go | 8 ++++---- flow/connectors/bigquery/bigquery.go | 6 +++--- flow/connectors/core.go | 2 +- flow/connectors/eventhub/eventhub.go | 4 ++-- flow/connectors/postgres/postgres.go | 7 ++++--- flow/connectors/s3/s3.go | 20 ++++++++++++-------- flow/connectors/snowflake/snowflake.go | 7 ++++--- flow/connectors/sql/query_executor.go | 2 +- flow/connectors/sqlserver/sqlserver.go | 6 +++--- flow/e2e/sqlserver/sqlserver_helper.go | 6 +++--- 10 files changed, 37 insertions(+), 31 deletions(-) diff --git a/flow/cmd/handler.go b/flow/cmd/handler.go index 99c25cbd28..cf86e97f57 100644 --- a/flow/cmd/handler.go +++ b/flow/cmd/handler.go @@ -503,12 +503,12 @@ func (h *FlowRequestHandler) ValidatePeer( }, nil } - status := conn.ConnectionActive() - if !status { + _, connErr := conn.ConnectionActive() + if connErr != nil { return &protos.ValidatePeerResponse{ Status: protos.ValidatePeerStatus_INVALID, - Message: fmt.Sprintf("failed to establish active connection to %s peer %s.", - req.Peer.Type, req.Peer.Name), + Message: fmt.Sprintf("failed to establish active connection to %s peer %s: %v", + req.Peer.Type, req.Peer.Name, connErr), }, nil } diff --git a/flow/connectors/bigquery/bigquery.go b/flow/connectors/bigquery/bigquery.go index 3e33dd3853..f1ee54f4f2 100644 --- a/flow/connectors/bigquery/bigquery.go +++ b/flow/connectors/bigquery/bigquery.go @@ -204,13 +204,13 @@ func (c *BigQueryConnector) Close() error { } // ConnectionActive returns true if the connection is active. -func (c *BigQueryConnector) ConnectionActive() bool { +func (c *BigQueryConnector) ConnectionActive() (bool, error) { _, err := c.client.Dataset(c.datasetID).Metadata(c.ctx) if err != nil { - return false + return false, fmt.Errorf("failed to get dataset metadata: %v", err) } - return c.client != nil + return c.client != nil, fmt.Errorf("BigQuery client is nil") } // NeedsSetupMetadataTables returns true if the metadata tables need to be set up. diff --git a/flow/connectors/core.go b/flow/connectors/core.go index f39e8f397f..c87869509e 100644 --- a/flow/connectors/core.go +++ b/flow/connectors/core.go @@ -21,7 +21,7 @@ var ErrUnsupportedFunctionality = errors.New("requested connector does not suppo type Connector interface { Close() error - ConnectionActive() bool + ConnectionActive() (bool, error) } type CDCPullConnector interface { diff --git a/flow/connectors/eventhub/eventhub.go b/flow/connectors/eventhub/eventhub.go index 73c8ed528c..ed91314885 100644 --- a/flow/connectors/eventhub/eventhub.go +++ b/flow/connectors/eventhub/eventhub.go @@ -65,8 +65,8 @@ func (c *EventHubConnector) Close() error { return allErrors } -func (c *EventHubConnector) ConnectionActive() bool { - return true +func (c *EventHubConnector) ConnectionActive() (bool, error) { + return true, nil } func (c *EventHubConnector) InitializeTableSchema(req map[string]*protos.TableSchema) error { diff --git a/flow/connectors/postgres/postgres.go b/flow/connectors/postgres/postgres.go index e46c383d4c..f411f3ca2e 100644 --- a/flow/connectors/postgres/postgres.go +++ b/flow/connectors/postgres/postgres.go @@ -104,11 +104,12 @@ func (c *PostgresConnector) Close() error { } // ConnectionActive returns true if the connection is active. -func (c *PostgresConnector) ConnectionActive() bool { +func (c *PostgresConnector) ConnectionActive() (bool, error) { if c.pool == nil { - return false + return false, fmt.Errorf("connection pool is nil") } - return c.pool.Ping(c.ctx) == nil + pingErr := c.pool.Ping(c.ctx) + return pingErr == nil, pingErr } // NeedsSetupMetadataTables returns true if the metadata tables need to be set up. diff --git a/flow/connectors/s3/s3.go b/flow/connectors/s3/s3.go index 1b81cf17df..277c454669 100644 --- a/flow/connectors/s3/s3.go +++ b/flow/connectors/s3/s3.go @@ -68,12 +68,6 @@ func NewS3Connector(ctx context.Context, return nil, err } - validErr := ValidCheck(s3Client, config.Url, pgMetadata) - if validErr != nil { - log.Errorf("failed to validate s3 connector: %v", validErr) - return nil, validErr - } - return &S3Connector{ ctx: ctx, url: config.Url, @@ -140,9 +134,19 @@ func ValidCheck(s3Client *s3.S3, bucketURL string, metadataDB *metadataStore.Pos return nil } -func (c *S3Connector) ConnectionActive() bool { +func (c *S3Connector) ConnectionActive() (bool, error) { _, listErr := c.client.ListBuckets(nil) - return listErr == nil + if listErr != nil { + return false, listErr + } + + validErr := ValidCheck(&c.client, c.url, c.pgMetadata) + if validErr != nil { + log.Errorf("failed to validate s3 connector: %v", validErr) + return false, validErr + } + + return listErr == nil, listErr } func (c *S3Connector) NeedsSetupMetadataTables() bool { diff --git a/flow/connectors/snowflake/snowflake.go b/flow/connectors/snowflake/snowflake.go index 08ed4b2d35..7d7c0e934d 100644 --- a/flow/connectors/snowflake/snowflake.go +++ b/flow/connectors/snowflake/snowflake.go @@ -168,11 +168,12 @@ func (c *SnowflakeConnector) Close() error { return nil } -func (c *SnowflakeConnector) ConnectionActive() bool { +func (c *SnowflakeConnector) ConnectionActive() (bool, error) { if c == nil || c.database == nil { - return false + return false, fmt.Errorf("SnowflakeConnector is nil") } - return c.database.PingContext(c.ctx) == nil + err := c.database.PingContext(c.ctx) + return err == nil, err } func (c *SnowflakeConnector) NeedsSetupMetadataTables() bool { diff --git a/flow/connectors/sql/query_executor.go b/flow/connectors/sql/query_executor.go index 29291b40ff..02c70c0d22 100644 --- a/flow/connectors/sql/query_executor.go +++ b/flow/connectors/sql/query_executor.go @@ -17,7 +17,7 @@ import ( ) type SQLQueryExecutor interface { - ConnectionActive() bool + ConnectionActive() (bool, error) Close() error CreateSchema(schemaName string) error diff --git a/flow/connectors/sqlserver/sqlserver.go b/flow/connectors/sqlserver/sqlserver.go index 5a529c9408..fe75cb74fc 100644 --- a/flow/connectors/sqlserver/sqlserver.go +++ b/flow/connectors/sqlserver/sqlserver.go @@ -53,9 +53,9 @@ func (c *SQLServerConnector) Close() error { } // ConnectionActive checks if the connection is still active -func (c *SQLServerConnector) ConnectionActive() bool { +func (c *SQLServerConnector) ConnectionActive() (bool, error) { if err := c.db.Ping(); err != nil { - return false + return false, err } - return true + return true, nil } diff --git a/flow/e2e/sqlserver/sqlserver_helper.go b/flow/e2e/sqlserver/sqlserver_helper.go index 1be94fc83e..8c2abba9ec 100644 --- a/flow/e2e/sqlserver/sqlserver_helper.go +++ b/flow/e2e/sqlserver/sqlserver_helper.go @@ -41,9 +41,9 @@ func NewSQLServerHelper(name string) (*SQLServerHelper, error) { return nil, err } - testConn := connector.ConnectionActive() - if !testConn { - return nil, fmt.Errorf("invalid connection configs") + _, connErr := connector.ConnectionActive() + if connErr != nil { + return nil, fmt.Errorf("invalid connection configs: %v", connErr) } rndNum, err := util.RandomUInt64() From 0c445bdd25626ee8fa5035cf31adcdea6e74af71 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Fri, 1 Dec 2023 22:11:12 +0530 Subject: [PATCH 5/5] return value of connectionactive now just error --- flow/cmd/handler.go | 2 +- flow/connectors/bigquery/bigquery.go | 9 ++++++--- flow/connectors/core.go | 2 +- flow/connectors/eventhub/eventhub.go | 4 ++-- flow/connectors/postgres/postgres.go | 6 +++--- flow/connectors/postgres/postgres_repl_test.go | 4 ++-- flow/connectors/postgres/postgres_schema_delta_test.go | 4 ++-- flow/connectors/s3/s3.go | 8 ++++---- flow/connectors/snowflake/snowflake.go | 8 +++++--- flow/connectors/sql/query_executor.go | 2 +- flow/connectors/sqlserver/sqlserver.go | 6 +++--- flow/e2e/sqlserver/sqlserver_helper.go | 2 +- 12 files changed, 31 insertions(+), 26 deletions(-) diff --git a/flow/cmd/handler.go b/flow/cmd/handler.go index cf86e97f57..14a9603125 100644 --- a/flow/cmd/handler.go +++ b/flow/cmd/handler.go @@ -503,7 +503,7 @@ func (h *FlowRequestHandler) ValidatePeer( }, nil } - _, connErr := conn.ConnectionActive() + connErr := conn.ConnectionActive() if connErr != nil { return &protos.ValidatePeerResponse{ Status: protos.ValidatePeerStatus_INVALID, diff --git a/flow/connectors/bigquery/bigquery.go b/flow/connectors/bigquery/bigquery.go index f1ee54f4f2..4d642f402f 100644 --- a/flow/connectors/bigquery/bigquery.go +++ b/flow/connectors/bigquery/bigquery.go @@ -204,13 +204,16 @@ func (c *BigQueryConnector) Close() error { } // ConnectionActive returns true if the connection is active. -func (c *BigQueryConnector) ConnectionActive() (bool, error) { +func (c *BigQueryConnector) ConnectionActive() error { _, err := c.client.Dataset(c.datasetID).Metadata(c.ctx) if err != nil { - return false, fmt.Errorf("failed to get dataset metadata: %v", err) + return fmt.Errorf("failed to get dataset metadata: %v", err) } - return c.client != nil, fmt.Errorf("BigQuery client is nil") + if c.client == nil { + return fmt.Errorf("BigQuery client is nil") + } + return nil } // NeedsSetupMetadataTables returns true if the metadata tables need to be set up. diff --git a/flow/connectors/core.go b/flow/connectors/core.go index c87869509e..6327ed4bb9 100644 --- a/flow/connectors/core.go +++ b/flow/connectors/core.go @@ -21,7 +21,7 @@ var ErrUnsupportedFunctionality = errors.New("requested connector does not suppo type Connector interface { Close() error - ConnectionActive() (bool, error) + ConnectionActive() error } type CDCPullConnector interface { diff --git a/flow/connectors/eventhub/eventhub.go b/flow/connectors/eventhub/eventhub.go index ed91314885..961fb979ff 100644 --- a/flow/connectors/eventhub/eventhub.go +++ b/flow/connectors/eventhub/eventhub.go @@ -65,8 +65,8 @@ func (c *EventHubConnector) Close() error { return allErrors } -func (c *EventHubConnector) ConnectionActive() (bool, error) { - return true, nil +func (c *EventHubConnector) ConnectionActive() error { + return nil } func (c *EventHubConnector) InitializeTableSchema(req map[string]*protos.TableSchema) error { diff --git a/flow/connectors/postgres/postgres.go b/flow/connectors/postgres/postgres.go index f411f3ca2e..469775e49e 100644 --- a/flow/connectors/postgres/postgres.go +++ b/flow/connectors/postgres/postgres.go @@ -104,12 +104,12 @@ func (c *PostgresConnector) Close() error { } // ConnectionActive returns true if the connection is active. -func (c *PostgresConnector) ConnectionActive() (bool, error) { +func (c *PostgresConnector) ConnectionActive() error { if c.pool == nil { - return false, fmt.Errorf("connection pool is nil") + return fmt.Errorf("connection pool is nil") } pingErr := c.pool.Ping(c.ctx) - return pingErr == nil, pingErr + return pingErr } // NeedsSetupMetadataTables returns true if the metadata tables need to be set up. diff --git a/flow/connectors/postgres/postgres_repl_test.go b/flow/connectors/postgres/postgres_repl_test.go index 11ef7e2be8..7e10d9a154 100644 --- a/flow/connectors/postgres/postgres_repl_test.go +++ b/flow/connectors/postgres/postgres_repl_test.go @@ -94,12 +94,12 @@ func (suite *PostgresReplicationSnapshotTestSuite) TearDownSuite() { err = teardownTx.Commit(context.Background()) require.NoError(suite.T(), err) - suite.True(suite.connector.ConnectionActive()) + suite.True(suite.connector.ConnectionActive() == nil) err = suite.connector.Close() require.NoError(suite.T(), err) - suite.False(suite.connector.ConnectionActive()) + suite.False(suite.connector.ConnectionActive() == nil) } func (suite *PostgresReplicationSnapshotTestSuite) TestSimpleSlotCreation() { diff --git a/flow/connectors/postgres/postgres_schema_delta_test.go b/flow/connectors/postgres/postgres_schema_delta_test.go index eec14c915a..98a6a47b99 100644 --- a/flow/connectors/postgres/postgres_schema_delta_test.go +++ b/flow/connectors/postgres/postgres_schema_delta_test.go @@ -67,10 +67,10 @@ func (suite *PostgresSchemaDeltaTestSuite) TearDownSuite() { err = teardownTx.Commit(context.Background()) suite.failTestError(err) - suite.True(suite.connector.ConnectionActive()) + suite.True(suite.connector.ConnectionActive() == nil) err = suite.connector.Close() suite.failTestError(err) - suite.False(suite.connector.ConnectionActive()) + suite.False(suite.connector.ConnectionActive() == nil) } func (suite *PostgresSchemaDeltaTestSuite) TestSimpleAddColumn() { diff --git a/flow/connectors/s3/s3.go b/flow/connectors/s3/s3.go index 277c454669..1650303235 100644 --- a/flow/connectors/s3/s3.go +++ b/flow/connectors/s3/s3.go @@ -134,19 +134,19 @@ func ValidCheck(s3Client *s3.S3, bucketURL string, metadataDB *metadataStore.Pos return nil } -func (c *S3Connector) ConnectionActive() (bool, error) { +func (c *S3Connector) ConnectionActive() error { _, listErr := c.client.ListBuckets(nil) if listErr != nil { - return false, listErr + return listErr } validErr := ValidCheck(&c.client, c.url, c.pgMetadata) if validErr != nil { log.Errorf("failed to validate s3 connector: %v", validErr) - return false, validErr + return validErr } - return listErr == nil, listErr + return nil } func (c *S3Connector) NeedsSetupMetadataTables() bool { diff --git a/flow/connectors/snowflake/snowflake.go b/flow/connectors/snowflake/snowflake.go index 7d7c0e934d..ba78223a42 100644 --- a/flow/connectors/snowflake/snowflake.go +++ b/flow/connectors/snowflake/snowflake.go @@ -168,12 +168,14 @@ func (c *SnowflakeConnector) Close() error { return nil } -func (c *SnowflakeConnector) ConnectionActive() (bool, error) { +func (c *SnowflakeConnector) ConnectionActive() error { if c == nil || c.database == nil { - return false, fmt.Errorf("SnowflakeConnector is nil") + return fmt.Errorf("SnowflakeConnector is nil") } + + // This also checks if database exists err := c.database.PingContext(c.ctx) - return err == nil, err + return err } func (c *SnowflakeConnector) NeedsSetupMetadataTables() bool { diff --git a/flow/connectors/sql/query_executor.go b/flow/connectors/sql/query_executor.go index 02c70c0d22..7600099f88 100644 --- a/flow/connectors/sql/query_executor.go +++ b/flow/connectors/sql/query_executor.go @@ -17,7 +17,7 @@ import ( ) type SQLQueryExecutor interface { - ConnectionActive() (bool, error) + ConnectionActive() error Close() error CreateSchema(schemaName string) error diff --git a/flow/connectors/sqlserver/sqlserver.go b/flow/connectors/sqlserver/sqlserver.go index fe75cb74fc..8e8d402828 100644 --- a/flow/connectors/sqlserver/sqlserver.go +++ b/flow/connectors/sqlserver/sqlserver.go @@ -53,9 +53,9 @@ func (c *SQLServerConnector) Close() error { } // ConnectionActive checks if the connection is still active -func (c *SQLServerConnector) ConnectionActive() (bool, error) { +func (c *SQLServerConnector) ConnectionActive() error { if err := c.db.Ping(); err != nil { - return false, err + return err } - return true, nil + return nil } diff --git a/flow/e2e/sqlserver/sqlserver_helper.go b/flow/e2e/sqlserver/sqlserver_helper.go index 8c2abba9ec..ed6ccfa97e 100644 --- a/flow/e2e/sqlserver/sqlserver_helper.go +++ b/flow/e2e/sqlserver/sqlserver_helper.go @@ -41,7 +41,7 @@ func NewSQLServerHelper(name string) (*SQLServerHelper, error) { return nil, err } - _, connErr := connector.ConnectionActive() + connErr := connector.ConnectionActive() if connErr != nil { return nil, fmt.Errorf("invalid connection configs: %v", connErr) }