From fb456a57328ca89219dc600498f8de7eec8a3445 Mon Sep 17 00:00:00 2001 From: Robert Debug Date: Fri, 11 Dec 2020 23:17:24 +0100 Subject: [PATCH] upgrade influxdb --- rust/Cargo.lock | 408 +++++++++++++++++++++++++++++++- rust/e2e/Cargo.toml | 2 +- rust/e2e/src/test_env/influx.rs | 6 +- rust/e2e/src/test_env/utils.rs | 2 +- 4 files changed, 409 insertions(+), 9 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 80f5a53d5..6b1f5af8d 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1,5 +1,21 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "adler" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" + [[package]] name = "aead" version = "0.3.2" @@ -54,6 +70,15 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "ahash" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" +dependencies = [ + "const-random", +] + [[package]] name = "aho-corasick" version = "0.7.15" @@ -93,6 +118,12 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" +[[package]] +name = "array_tool" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f8cb5d814eb646a863c4f24978cff2880c4be96ad8cde2c0f0678732902e271" + [[package]] name = "arrayref" version = "0.3.6" @@ -116,6 +147,19 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-compression" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1ff21a63d3262af46b9f33a826a8d134e2d0d9b2179c86034948b732ea8b2a" +dependencies = [ + "bytes", + "flate2", + "futures-core", + "memchr", + "pin-project-lite 0.1.11", +] + [[package]] name = "async-executor" version = "1.4.0" @@ -531,6 +575,22 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "console" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a50aab2529019abfabfa93f1e6c41ef392f91fbf179b347a7e96abb524884a08" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "regex", + "terminal_size", + "unicode-width", + "winapi 0.3.9", + "winapi-util", +] + [[package]] name = "console_error_panic_hook" version = "0.1.6" @@ -541,6 +601,28 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "const-random" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f590d95d011aa80b063ffe3253422ed5aa462af4e9867d43ce8337562bac77c4" +dependencies = [ + "const-random-macro", + "proc-macro-hack", +] + +[[package]] +name = "const-random-macro" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "615f6e27d000a2bffbc7f2f6a8669179378fa27ee4d0a509e985dfc0a7defb40" +dependencies = [ + "getrandom 0.2.0", + "lazy_static", + "proc-macro-hack", + "tiny-keccak", +] + [[package]] name = "const_fn" version = "0.4.3" @@ -683,6 +765,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-mac" version = "0.8.0" @@ -734,6 +822,17 @@ dependencies = [ "cipher", ] +[[package]] +name = "dashmap" +version = "3.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" +dependencies = [ + "ahash", + "cfg-if 0.1.10", + "num_cpus", +] + [[package]] name = "data-encoding" version = "2.3.1" @@ -796,6 +895,15 @@ dependencies = [ "dirs-sys", ] +[[package]] +name = "dirs" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142995ed02755914747cc6ca76fc7e4583cd18578746716d0508ea6ed558b9ff" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-sys" version = "0.3.5" @@ -824,6 +932,12 @@ dependencies = [ "syn", ] +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + [[package]] name = "downcast" version = "0.10.0" @@ -836,12 +950,47 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" +[[package]] +name = "e2e" +version = "0.0.0" +dependencies = [ + "anyhow", + "async-trait", + "chrono", + "config", + "console", + "examples", + "futures", + "indicatif", + "influxdb", + "k8s-openapi", + "kube", + "kube-runtime", + "reqwest", + "serde 1.0.117", + "serde_json", + "serde_yaml", + "tokio", + "toml", + "tracing", + "tracing-subscriber", + "xaynet-core", + "xaynet-sdk", + "xaynet-server", +] + [[package]] name = "either" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encoding_rs" version = "0.8.26" @@ -851,6 +1000,19 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "event-listener" version = "2.5.1" @@ -907,6 +1069,18 @@ dependencies = [ "log", ] +[[package]] +name = "flate2" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129" +dependencies = [ + "cfg-if 1.0.0", + "crc32fast", + "libc", + "miniz_oxide", +] + [[package]] name = "float-cmp" version = "0.8.0" @@ -1128,6 +1302,17 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "ghash" version = "0.3.0" @@ -1331,6 +1516,15 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + [[package]] name = "hyper" version = "0.13.9" @@ -1411,6 +1605,18 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "indicatif" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" +dependencies = [ + "console", + "lazy_static", + "number_prefix", + "regex", +] + [[package]] name = "infer" version = "0.2.3" @@ -1490,6 +1696,36 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonpath_lib" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8727f6987896c010ec9add275f59de2ae418b672fafa77bc3673b4cee1f09ca" +dependencies = [ + "array_tool", + "env_logger", + "log", + "serde 1.0.117", + "serde_json", +] + +[[package]] +name = "k8s-openapi" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57f95fd36c08ce592e67400a0f1a66f432196997d5a7e9a97e8743c33d8a9312" +dependencies = [ + "base64 0.12.3", + "bytes", + "chrono", + "http", + "percent-encoding", + "serde 1.0.117", + "serde-value", + "serde_json", + "url", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -1500,6 +1736,55 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "kube" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3787d41d01ff816f93f1a73d20252f8a65887682206cfbf2d0f7d2d2b1b73fa" +dependencies = [ + "Inflector", + "base64 0.12.3", + "bytes", + "chrono", + "dirs 3.0.1", + "either", + "futures", + "futures-util", + "http", + "jsonpath_lib", + "k8s-openapi", + "log", + "openssl", + "pem", + "reqwest", + "serde 1.0.117", + "serde_json", + "serde_yaml", + "static_assertions", + "thiserror", + "time 0.2.23", + "tokio", + "url", +] + +[[package]] +name = "kube-runtime" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9abc7b19889353e501e6bc7b2b9d7062b2e008ec256f11e9428ed8e56d046d2f" +dependencies = [ + "dashmap", + "derivative", + "futures", + "k8s-openapi", + "kube", + "pin-project 0.4.27", + "serde 1.0.117", + "smallvec", + "snafu", + "tokio", +] + [[package]] name = "kv-log-macro" version = "1.0.7" @@ -1644,6 +1929,16 @@ dependencies = [ "unicase", ] +[[package]] +name = "miniz_oxide" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" +dependencies = [ + "adler", + "autocfg 1.0.1", +] + [[package]] name = "mio" version = "0.6.23" @@ -1929,6 +2224,12 @@ dependencies = [ "syn", ] +[[package]] +name = "number_prefix" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" + [[package]] name = "once_cell" version = "1.5.2" @@ -1986,6 +2287,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "ordered-float" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dacdec97876ef3ede8c50efc429220641a0b11ba0048b4b0c357bccbc47c5204" +dependencies = [ + "num-traits 0.2.14", +] + [[package]] name = "parking" version = "2.0.0" @@ -2024,6 +2334,17 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7151b083b0664ed58ed669fcdd92f01c3d2fdbf10af4931a301474950b52bfa9" +[[package]] +name = "pem" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c220d01f863d13d96ca82359d1e81e64a7c6bf0637bcde7b2349630addf0c6" +dependencies = [ + "base64 0.13.0", + "once_cell", + "regex", +] + [[package]] name = "percent-encoding" version = "2.1.0" @@ -2258,7 +2579,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.15", "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", @@ -2306,7 +2627,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.15", ] [[package]] @@ -2448,7 +2769,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ - "getrandom", + "getrandom 0.1.15", "redox_syscall", "rust-argon2", ] @@ -2496,6 +2817,7 @@ version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb15d6255c792356a0f578d8a645c677904dc02e862bebe2ecc18e0c01b9a0ce" dependencies = [ + "async-compression", "base64 0.13.0", "bytes", "encoding_rs", @@ -2505,19 +2827,23 @@ dependencies = [ "http-body", "hyper", "hyper-rustls", + "hyper-tls", "ipnet", "js-sys", "lazy_static", "log", "mime", "mime_guess", + "native-tls", "percent-encoding", "pin-project-lite 0.2.0", "rustls", "serde 1.0.117", + "serde_json", "serde_urlencoded", "tokio", "tokio-rustls", + "tokio-tls", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -2578,7 +2904,7 @@ checksum = "09ac05563f83489b19b4d413607a30821ab08bbd9007d14fa05618da3ef09d8b" dependencies = [ "async-trait", "chrono", - "dirs", + "dirs 2.0.2", "futures", "hyper", "pin-project 0.4.27", @@ -2787,6 +3113,16 @@ dependencies = [ "serde 0.8.23", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde 1.0.117", +] + [[package]] name = "serde_cbor" version = "0.11.1" @@ -2814,6 +3150,7 @@ version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" dependencies = [ + "indexmap", "itoa", "ryu", "serde 1.0.117", @@ -2852,6 +3189,18 @@ dependencies = [ "serde 1.0.117", ] +[[package]] +name = "serde_yaml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7" +dependencies = [ + "dtoa", + "linked-hash-map 0.5.3", + "serde 1.0.117", + "yaml-rust", +] + [[package]] name = "serial_test" version = "0.5.1" @@ -2955,6 +3304,29 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" +[[package]] +name = "snafu" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" +dependencies = [ + "doc-comment", + "futures-core", + "pin-project 0.4.27", + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "socket2" version = "0.3.17" @@ -3129,6 +3501,25 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "terminal_size" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd2d183bd3fac5f5fe38ddbeb4dc9aec4a39a9d7d59e7491d900302da01cbe1" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -3216,6 +3607,15 @@ dependencies = [ "syn", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinytemplate" version = "1.1.0" diff --git a/rust/e2e/Cargo.toml b/rust/e2e/Cargo.toml index 374207ebb..7d0f04f69 100644 --- a/rust/e2e/Cargo.toml +++ b/rust/e2e/Cargo.toml @@ -31,7 +31,7 @@ tracing = "0.1.19" tracing-subscriber = "0.2.12" config = "0.10.1" indicatif = "0.15.0" -influxdb = { version = "0.1.0", features = ["derive"] } +influxdb = "0.3.0" chrono = { version = "0.4.15" } toml = "0.5" kube = { version = "0.43.0" } diff --git a/rust/e2e/src/test_env/influx.rs b/rust/e2e/src/test_env/influx.rs index 38260b753..8e7388f50 100644 --- a/rust/e2e/src/test_env/influx.rs +++ b/rust/e2e/src/test_env/influx.rs @@ -35,14 +35,14 @@ impl InfluxClient { fn deserialize_phase(mut read_result: DatabaseQueryResult) -> anyhow::Result { let phase = read_result .deserialize_next::() - .map_err(|_| anyhow::anyhow!("no phase"))? + .map_err(|err| anyhow::anyhow!("no phase: {}", err))? .series .first() .ok_or_else(|| anyhow::anyhow!("no phase"))? .values .first() .ok_or_else(|| anyhow::anyhow!("no phase"))? - .value; + .last; Ok(from_u8(phase)?) } @@ -63,5 +63,5 @@ fn from_u8(phase: u8) -> anyhow::Result { #[derive(Debug, serde::Deserialize)] pub struct PhaseReading { time: DateTime, - value: u8, + last: u8, } diff --git a/rust/e2e/src/test_env/utils.rs b/rust/e2e/src/test_env/utils.rs index 566bf1375..ad199d0b4 100644 --- a/rust/e2e/src/test_env/utils.rs +++ b/rust/e2e/src/test_env/utils.rs @@ -31,7 +31,7 @@ pub async fn wait_until_phase(client: &InfluxClient, phase: PhaseName) { spinner.set_message(&format!("current phase: {:?}", current_phase)); } } - Err(_) => spinner.set_message("No phase metrics available"), + Err(err) => spinner.set_message(&format!("No phase metrics available: {:?}", err)), } interval.tick().await; }