From 3d5c460f9d59ba5f9f8d8280ae9c47a309ca7a78 Mon Sep 17 00:00:00 2001 From: "Jiaxiao (mossaka) Zhou" Date: Wed, 11 Dec 2024 16:42:59 +0000 Subject: [PATCH 1/2] tests: removed unused deps and funcs Signed-off-by: Jiaxiao (mossaka) Zhou --- Cargo.lock | 801 ++++++++++------------------------ tests/Cargo.toml | 13 +- tests/src/integration_test.rs | 51 ++- tests/src/lib.rs | 110 ----- 4 files changed, 284 insertions(+), 691 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25704de3..f6092b40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,7 +50,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", - "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -228,7 +227,7 @@ checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.2.0", + "fastrand 2.3.0", "futures-lite 2.5.0", "slab", ] @@ -293,7 +292,7 @@ dependencies = [ "futures-lite 2.5.0", "parking", "polling 3.7.4", - "rustix 0.38.41", + "rustix 0.38.42", "slab", "tracing", "windows-sys 0.59.0", @@ -332,7 +331,7 @@ dependencies = [ "cfg-if 1.0.0", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.41", + "rustix 0.38.42", "windows-sys 0.48.0", ] @@ -351,7 +350,7 @@ dependencies = [ "cfg-if 1.0.0", "event-listener 5.3.1", "futures-lite 2.5.0", - "rustix 0.38.41", + "rustix 0.38.42", "tracing", ] @@ -378,7 +377,7 @@ dependencies = [ "cfg-if 1.0.0", "futures-core", "futures-io", - "rustix 0.38.41", + "rustix 0.38.42", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -798,7 +797,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustversion", - "serde 1.0.215", + "serde 1.0.216", "sync_wrapper 0.1.2", "tower 0.4.13", "tower-layer", @@ -825,9 +824,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustversion", - "serde 1.0.215", + "serde 1.0.216", "sync_wrapper 1.0.2", - "tower 0.5.1", + "tower 0.5.2", "tower-layer", "tower-service", ] @@ -888,7 +887,7 @@ dependencies = [ "rand 0.8.5", "reqwest 0.12.9", "rustc_version", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha2", "time", @@ -906,7 +905,7 @@ dependencies = [ "azure_core", "bytes", "futures", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "thiserror 1.0.69", "time", @@ -927,7 +926,7 @@ dependencies = [ "futures", "oauth2", "pin-project", - "serde 1.0.215", + "serde 1.0.216", "time", "tracing", "tz-rs", @@ -943,22 +942,11 @@ dependencies = [ "async-trait", "azure_core", "futures", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "time", ] -[[package]] -name = "backoff" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" -dependencies = [ - "getrandom 0.2.15", - "instant", - "rand 0.8.5", -] - [[package]] name = "backtrace" version = "0.3.74" @@ -1021,9 +1009,9 @@ checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" [[package]] name = "bindgen" -version = "0.70.1" +version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ "bitflags 2.6.0", "cexpr", @@ -1032,7 +1020,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash 1.1.0", + "rustc-hash", "shlex", "syn 2.0.90", ] @@ -1116,7 +1104,7 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -1149,7 +1137,7 @@ checksum = "4ac68674a6042af2bcee1adad9f6abd432642cf03444ce3a5b36c3f39f23baf8" dependencies = [ "cap-primitives", "cap-std", - "rustix 0.38.41", + "rustix 0.38.42", "smallvec", ] @@ -1165,7 +1153,7 @@ dependencies = [ "io-lifetimes 2.0.4", "ipnet", "maybe-owned", - "rustix 0.38.41", + "rustix 0.38.42", "windows-sys 0.59.0", "winx", ] @@ -1189,7 +1177,7 @@ dependencies = [ "cap-primitives", "io-extras", "io-lifetimes 2.0.4", - "rustix 0.38.41", + "rustix 0.38.42", ] [[package]] @@ -1202,7 +1190,7 @@ dependencies = [ "cap-primitives", "iana-time-zone", "once_cell", - "rustix 0.38.41", + "rustix 0.38.42", "winx", ] @@ -1227,9 +1215,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d" dependencies = [ "jobserver", "libc", @@ -1284,15 +1272,15 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits 0.2.19", - "serde 1.0.215", + "serde 1.0.216", "wasm-bindgen", "windows-targets 0.52.6", ] @@ -1460,7 +1448,7 @@ dependencies = [ "lazy_static 1.5.0", "nom 5.1.3", "rust-ini", - "serde 1.0.215", + "serde 1.0.216", "serde-hjson", "serde_json", "toml 0.5.11", @@ -1477,7 +1465,7 @@ dependencies = [ "json5", "libtest-mimic", "reqwest 0.12.9", - "serde 1.0.215", + "serde 1.0.216", "tar", "test-environment", ] @@ -1540,7 +1528,7 @@ dependencies = [ "os_pipe", "page_size", "prctl", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "signal-hook", "thiserror 1.0.69", @@ -1565,15 +1553,9 @@ version = "0.17.0" dependencies = [ "anyhow", "curl", - "http 1.2.0", - "hyper 1.5.1", - "k8s-openapi", - "kube", - "rand 0.8.5", "redis 0.25.4", "rumqttc", "tokio", - "tower 0.5.1", ] [[package]] @@ -1589,7 +1571,7 @@ dependencies = [ "log", "oci-spec", "openssl", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "spin-app", "spin-common", @@ -1640,7 +1622,7 @@ dependencies = [ "nix 0.28.0", "oci-spec", "protobuf 3.2.0", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha256", "thiserror 1.0.69", @@ -1702,7 +1684,7 @@ version = "0.112.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38da1eb6f7d8cdfa92f05acfae63c9a1d7a337e49ce7a2d0769c7fa03a2613a5" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", "serde_derive", ] @@ -1724,7 +1706,7 @@ dependencies = [ "hashbrown 0.14.5", "log", "regalloc2", - "rustc-hash 2.1.0", + "rustc-hash", "smallvec", "target-lexicon", ] @@ -1760,7 +1742,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70b85ed43567e13782cd1b25baf42a8167ee57169a60dfd3d7307c6ca3839da0" dependencies = [ "cranelift-bitset", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", ] @@ -2006,12 +1988,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - [[package]] name = "dbus" version = "0.9.7" @@ -2050,7 +2026,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -2259,7 +2235,7 @@ dependencies = [ "pin-project", "regex", "reqwest 0.11.27", - "serde 1.0.215", + "serde 1.0.216", "serde_ignored", "serde_json", "sha2", @@ -2278,7 +2254,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31951f49556e34d90ed28342e1df7e1cb7a229c4cab0aecc627b5d91edd41d07" dependencies = [ "base64 0.21.7", - "serde 1.0.215", + "serde 1.0.216", "serde_json", ] @@ -2368,7 +2344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -2471,9 +2447,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fd-lock" @@ -2482,7 +2458,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.41", + "rustix 0.38.42", "windows-sys 0.52.0", ] @@ -2590,7 +2566,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e2e6123af26f0f2c51cc66869137080199406754903cc926a7690401ce09cb4" dependencies = [ "io-lifetimes 2.0.4", - "rustix 0.38.41", + "rustix 0.38.42", "windows-sys 0.59.0", ] @@ -2674,7 +2650,7 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ - "fastrand 2.2.0", + "fastrand 2.3.0", "futures-core", "futures-io", "parking", @@ -2746,7 +2722,7 @@ dependencies = [ "bitflags 2.6.0", "debugid", "fxhash", - "serde 1.0.215", + "serde 1.0.216", "serde_json", ] @@ -2923,8 +2899,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", - "allocator-api2", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -3087,12 +3062,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - [[package]] name = "http-types" version = "2.12.0" @@ -3106,7 +3075,7 @@ dependencies = [ "infer", "pin-project-lite", "rand 0.7.3", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "serde_qs", "serde_urlencoded", @@ -3186,22 +3155,6 @@ dependencies = [ "webpki-roots 0.22.6", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.31", - "log", - "rustls 0.21.12", - "rustls-native-certs 0.6.3", - "tokio", - "tokio-rustls 0.24.1", -] - [[package]] name = "hyper-rustls" version = "0.25.0" @@ -3230,7 +3183,7 @@ dependencies = [ "http 1.2.0", "hyper 1.5.1", "hyper-util", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pki-types", "tokio", "tokio-rustls 0.26.1", @@ -3507,7 +3460,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -3518,7 +3471,7 @@ checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown 0.15.2", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -3664,25 +3617,14 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ "once_cell", "wasm-bindgen", ] -[[package]] -name = "json-patch" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" -dependencies = [ - "serde 1.0.215", - "serde_json", - "thiserror 1.0.69", -] - [[package]] name = "json5" version = "0.4.1" @@ -3691,20 +3633,7 @@ checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" dependencies = [ "pest", "pest_derive", - "serde 1.0.215", -] - -[[package]] -name = "jsonpath-rust" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06cc127b7c3d270be504572364f9569761a180b981919dd0d87693a7f5fb7829" -dependencies = [ - "pest", - "pest_derive", - "regex", - "serde_json", - "thiserror 1.0.69", + "serde 1.0.216", ] [[package]] @@ -3717,25 +3646,11 @@ dependencies = [ "crypto-common", "digest", "hmac", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha2", ] -[[package]] -name = "k8s-openapi" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc3606fd16aca7989db2f84bb25684d0270c6d6fa1dbcd0025af7b4130523a6" -dependencies = [ - "base64 0.21.7", - "bytes", - "chrono", - "serde 1.0.215", - "serde-value", - "serde_json", -] - [[package]] name = "keyed_priority_queue" version = "0.4.2" @@ -3759,114 +3674,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "kube" -version = "0.87.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3499c8d60c763246c7a213f51caac1e9033f46026904cb89bc8951ae8601f26e" -dependencies = [ - "k8s-openapi", - "kube-client", - "kube-core", - "kube-derive", - "kube-runtime", -] - -[[package]] -name = "kube-client" -version = "0.87.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033450dfa0762130565890dadf2f8835faedf749376ca13345bcd8ecd6b5f29f" -dependencies = [ - "base64 0.21.7", - "bytes", - "chrono", - "either", - "futures", - "home", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", - "hyper-rustls 0.24.2", - "hyper-timeout 0.4.1", - "jsonpath-rust", - "k8s-openapi", - "kube-core", - "pem", - "pin-project", - "rand 0.8.5", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", - "secrecy", - "serde 1.0.215", - "serde_json", - "serde_yaml", - "thiserror 1.0.69", - "tokio", - "tokio-tungstenite", - "tokio-util", - "tower 0.4.13", - "tower-http", - "tracing", -] - -[[package]] -name = "kube-core" -version = "0.87.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bba93d054786eba7994d03ce522f368ef7d48c88a1826faa28478d85fb63ae" -dependencies = [ - "chrono", - "form_urlencoded", - "http 0.2.12", - "json-patch", - "k8s-openapi", - "once_cell", - "schemars", - "serde 1.0.215", - "serde_json", - "thiserror 1.0.69", -] - -[[package]] -name = "kube-derive" -version = "0.87.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e98dd5e5767c7b894c1f0e41fd628b145f808e981feb8b08ed66455d47f1a4" -dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.90", -] - -[[package]] -name = "kube-runtime" -version = "0.87.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d8893eb18fbf6bb6c80ef6ee7dd11ec32b1dc3c034c988ac1b3a84d46a230ae" -dependencies = [ - "ahash", - "async-trait", - "backoff", - "derivative", - "futures", - "hashbrown 0.14.5", - "json-patch", - "k8s-openapi", - "kube-client", - "parking_lot", - "pin-project", - "serde 1.0.215", - "serde_json", - "smallvec", - "thiserror 1.0.69", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "kv-log-macro" version = "1.0.7" @@ -3909,9 +3716,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.167" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "libcgroups" @@ -3923,7 +3730,7 @@ dependencies = [ "nix 0.28.0", "oci-spec", "procfs", - "serde 1.0.215", + "serde 1.0.216", "thiserror 1.0.69", "tracing", ] @@ -3937,7 +3744,7 @@ dependencies = [ "bitflags 2.6.0", "caps", "chrono", - "fastrand 2.2.0", + "fastrand 2.3.0", "futures", "libc", "libcgroups", @@ -3952,7 +3759,7 @@ dependencies = [ "regex", "rust-criu", "safe-path", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "thiserror 1.0.69", "tracing", @@ -4012,7 +3819,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.8", ] [[package]] @@ -4051,7 +3858,7 @@ dependencies = [ "hyper-rustls 0.25.0", "libsql-hrana", "libsql-sqlite3-parser", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "thiserror 1.0.69", "tokio", @@ -4069,7 +3876,7 @@ dependencies = [ "base64 0.21.7", "bytes", "prost 0.12.6", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -4180,18 +3987,18 @@ dependencies = [ [[package]] name = "logos" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6aa86787fd2da255f97a4425799c8d1fd39951f5798a1192fc1b956581f605" +checksum = "7251356ef8cb7aec833ddf598c6cb24d17b689d20b993f9d11a3d764e34e6458" dependencies = [ "logos-derive", ] [[package]] name = "logos-codegen" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f3303189202bb8a052bcd93d66b6c03e6fe70d9c7c47c0ea5e974955e54c876" +checksum = "59f80069600c0d66734f5ff52cc42f2dabd6b29d205f333d61fd7832e9e9963f" dependencies = [ "beef", "fnv", @@ -4199,15 +4006,14 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax 0.8.5", - "rustc_version", "syn 2.0.90", ] [[package]] name = "logos-derive" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774a1c225576486e4fdf40b74646f672c542ca3608160d348749693ae9d456e6" +checksum = "24fb722b06a9dc12adb0963ed585f19fc61dc5413e6a9be9422ef92c091e731d" dependencies = [ "logos-codegen", ] @@ -4273,7 +4079,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.41", + "rustix 0.38.42", ] [[package]] @@ -4393,7 +4199,7 @@ dependencies = [ "percent-encoding", "pin-project", "rand 0.8.5", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "socket2 0.5.8", "thiserror 1.0.69", @@ -4426,7 +4232,7 @@ dependencies = [ "rand 0.8.5", "regex", "saturating", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha1", "sha2", @@ -4683,7 +4489,7 @@ dependencies = [ "getrandom 0.2.15", "http 0.2.12", "rand 0.8.5", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "serde_path_to_error", "sha2", @@ -4719,7 +4525,7 @@ dependencies = [ "olpc-cjson", "regex", "reqwest 0.12.9", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha2", "thiserror 1.0.69", @@ -4743,7 +4549,7 @@ dependencies = [ "olpc-cjson", "regex", "reqwest 0.12.9", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha2", "thiserror 1.0.69", @@ -4762,7 +4568,7 @@ dependencies = [ "getset", "once_cell", "regex", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "strum 0.26.3", "strum_macros 0.26.4", @@ -4778,7 +4584,7 @@ dependencies = [ "anyhow", "chrono", "oci-distribution 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha2", "tokio", @@ -4792,7 +4598,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "696183c9b5fe81a7715d074fd632e8bd46f4ccc0231a3ed7fc580a80de5f7083" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", "serde_json", "unicode-normalization", ] @@ -4897,7 +4703,7 @@ dependencies = [ "opentelemetry-http", "opentelemetry-proto", "opentelemetry_sdk", - "prost 0.13.3", + "prost 0.13.4", "reqwest 0.12.9", "thiserror 1.0.69", "tokio", @@ -4912,7 +4718,7 @@ checksum = "2c43620e8f93359eb7e627a3b16ee92d8585774986f24f2ab010817426c5ce61" dependencies = [ "opentelemetry", "opentelemetry_sdk", - "prost 0.13.3", + "prost 0.13.4", "tonic 0.12.3", ] @@ -5062,7 +4868,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.8", "smallvec", "windows-targets 0.52.6", ] @@ -5104,7 +4910,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" dependencies = [ "base64 0.21.7", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -5131,7 +4937,7 @@ dependencies = [ "pbjson-build", "prost 0.12.6", "prost-build 0.12.6", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -5141,7 +4947,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ "base64 0.22.1", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -5161,20 +4967,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 1.0.69", + "thiserror 2.0.6", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" dependencies = [ "pest", "pest_generator", @@ -5182,9 +4988,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" dependencies = [ "pest", "pest_meta", @@ -5195,9 +5001,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", @@ -5302,7 +5108,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.2.0", + "fastrand 2.3.0", "futures-io", ] @@ -5348,7 +5154,7 @@ dependencies = [ "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.41", + "rustix 0.38.42", "tracing", "windows-sys 0.59.0", ] @@ -5362,7 +5168,7 @@ dependencies = [ "cobs", "embedded-io 0.4.0", "embedded-io 0.6.1", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -5529,7 +5335,7 @@ dependencies = [ "hex", "lazy_static 1.5.0", "procfs-core", - "rustix 0.38.41", + "rustix 0.38.42", ] [[package]] @@ -5565,12 +5371,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" dependencies = [ "bytes", - "prost-derive 0.13.3", + "prost-derive 0.13.4", ] [[package]] @@ -5640,9 +5446,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" dependencies = [ "anyhow", "itertools 0.13.0", @@ -5796,7 +5602,7 @@ dependencies = [ "config", "directories", "petgraph 0.6.5", - "serde 1.0.215", + "serde 1.0.216", "serde-value", "tint", ] @@ -5811,10 +5617,10 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.0", - "rustls 0.23.19", + "rustc-hash", + "rustls 0.23.20", "socket2 0.5.8", - "thiserror 2.0.4", + "thiserror 2.0.6", "tokio", "tracing", ] @@ -5829,11 +5635,11 @@ dependencies = [ "getrandom 0.2.15", "rand 0.8.5", "ring 0.17.8", - "rustc-hash 2.1.0", - "rustls 0.23.19", + "rustc-hash", + "rustls 0.23.20", "rustls-pki-types", "slab", - "thiserror 2.0.4", + "thiserror 2.0.6", "tinyvec", "tracing", "web-time", @@ -5841,9 +5647,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" +checksum = "52cd4b1eff68bf27940dd39811292c49e007f4d0b4c357358dc9b0197be6b527" dependencies = [ "cfg_aliases 0.2.1", "libc", @@ -6022,9 +5828,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -6048,7 +5854,7 @@ checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0" dependencies = [ "hashbrown 0.14.5", "log", - "rustc-hash 2.1.0", + "rustc-hash", "slice-group-by", "smallvec", ] @@ -6122,7 +5928,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls-pemfile 1.0.4", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "serde_urlencoded", "sync_wrapper 0.1.2", @@ -6169,10 +5975,10 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pemfile 2.2.0", "rustls-pki-types", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.2", @@ -6260,7 +6066,7 @@ dependencies = [ "log", "rustls-native-certs 0.7.3", "rustls-pemfile 2.2.0", - "rustls-webpki 0.102.8", + "rustls-webpki", "thiserror 1.0.69", "tokio", "tokio-rustls 0.25.0", @@ -6305,12 +6111,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hash" version = "2.1.0" @@ -6338,7 +6138,7 @@ dependencies = [ "http 1.2.0", "reqwest 0.12.9", "rustify_derive", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "serde_urlencoded", "thiserror 1.0.69", @@ -6376,9 +6176,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", @@ -6386,7 +6186,7 @@ dependencies = [ "libc", "linux-raw-sys 0.4.14", "once_cell", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6401,18 +6201,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki 0.101.7", - "sct", -] - [[package]] name = "rustls" version = "0.22.4" @@ -6422,22 +6210,22 @@ dependencies = [ "log", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "log", "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] @@ -6494,16 +6282,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "rustls-webpki" version = "0.102.8" @@ -6570,30 +6348,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "schemars" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde 1.0.215", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.90", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -6630,7 +6384,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", "zeroize", ] @@ -6648,7 +6402,7 @@ dependencies = [ "num", "once_cell", "rand 0.8.5", - "serde 1.0.215", + "serde 1.0.216", "sha2", "zbus", ] @@ -6682,7 +6436,7 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -6693,9 +6447,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] @@ -6719,25 +6473,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" dependencies = [ "ordered-float", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] name = "serde_derive" -version = "1.0.215" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "serde_derive_internals" -version = "0.29.1" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", @@ -6750,7 +6493,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8e319a36d1b52126a0d608f24e93b2d81297091818cd70625fcf50a15d84ddf" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -6762,7 +6505,7 @@ dependencies = [ "itoa", "memchr", "ryu", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -6772,7 +6515,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ "itoa", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -6782,7 +6525,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" dependencies = [ "percent-encoding", - "serde 1.0.215", + "serde 1.0.216", "thiserror 1.0.69", ] @@ -6803,7 +6546,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -6815,7 +6558,7 @@ dependencies = [ "form_urlencoded", "itoa", "ryu", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -6829,7 +6572,7 @@ dependencies = [ "hex", "indexmap 1.9.3", "indexmap 2.7.0", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "serde_with_macros", @@ -6857,7 +6600,7 @@ dependencies = [ "indexmap 2.7.0", "itoa", "ryu", - "serde 1.0.215", + "serde 1.0.216", "unsafe-libyaml", ] @@ -7018,7 +6761,7 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -7091,7 +6834,7 @@ version = "3.0.0" source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398d2734ff0cc91002f0" dependencies = [ "anyhow", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "spin-locked-app", ] @@ -7168,7 +6911,7 @@ source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398 dependencies = [ "anyhow", "lru", - "serde 1.0.215", + "serde 1.0.216", "spin-core", "spin-factors", "spin-locked-app", @@ -7187,7 +6930,7 @@ source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398 dependencies = [ "anyhow", "async-trait", - "serde 1.0.215", + "serde 1.0.216", "spin-factors", "spin-llm-remote-http", "spin-locked-app", @@ -7209,7 +6952,7 @@ dependencies = [ "hyper 1.5.1", "ip_network", "reqwest 0.12.9", - "rustls 0.23.19", + "rustls 0.23.20", "spin-factor-outbound-networking", "spin-factors", "spin-telemetry", @@ -7264,10 +7007,10 @@ dependencies = [ "futures-util", "http 1.2.0", "ipnet", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pemfile 2.2.0", "rustls-pki-types", - "serde 1.0.215", + "serde 1.0.216", "spin-expressions", "spin-factor-variables", "spin-factor-wasi", @@ -7360,7 +7103,7 @@ version = "3.0.0" source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398d2734ff0cc91002f0" dependencies = [ "anyhow", - "serde 1.0.215", + "serde 1.0.216", "spin-app", "spin-factors-derive", "thiserror 1.0.69", @@ -7401,7 +7144,7 @@ dependencies = [ "indexmap 2.7.0", "percent-encoding", "routefinder", - "serde 1.0.215", + "serde 1.0.216", "spin-app", "tracing", "wasmtime", @@ -7418,7 +7161,7 @@ dependencies = [ "azure_data_cosmos", "azure_identity", "futures", - "serde 1.0.215", + "serde 1.0.216", "spin-core", "spin-factor-key-value", ] @@ -7430,7 +7173,7 @@ source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398 dependencies = [ "anyhow", "redis 0.27.6", - "serde 1.0.215", + "serde 1.0.216", "spin-core", "spin-factor-key-value", "tokio", @@ -7444,7 +7187,7 @@ source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398 dependencies = [ "anyhow", "rusqlite", - "serde 1.0.215", + "serde 1.0.216", "spin-core", "spin-factor-key-value", "spin-world", @@ -7458,7 +7201,7 @@ source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398 dependencies = [ "anyhow", "reqwest 0.12.9", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "spin-telemetry", "spin-world", @@ -7477,7 +7220,7 @@ dependencies = [ "path-absolutize", "reqwest 0.12.9", "semver", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha2", "spin-common", @@ -7499,7 +7242,7 @@ source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398 dependencies = [ "anyhow", "async-trait", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "spin-serde", "thiserror 1.0.69", @@ -7513,7 +7256,7 @@ dependencies = [ "anyhow", "indexmap 2.7.0", "semver", - "serde 1.0.215", + "serde 1.0.216", "spin-serde", "terminal", "thiserror 1.0.69", @@ -7539,7 +7282,7 @@ dependencies = [ "itertools 0.13.0", "oci-distribution 0.11.0 (git+https://github.com/fermyon/oci-distribution?rev=7e4ce9be9bcd22e78a28f06204931f10c44402ba)", "reqwest 0.12.9", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "spin-common", "spin-loader", @@ -7619,7 +7362,7 @@ dependencies = [ "anyhow", "base64 0.22.1", "semver", - "serde 1.0.215", + "serde 1.0.216", "wasm-pkg-common", ] @@ -7628,7 +7371,7 @@ name = "spin-sqlite" version = "3.0.0" source = "git+https://github.com/fermyon/spin?tag=v3.0.0#737778e9d7dc1a7f590a398d2734ff0cc91002f0" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", "spin-factor-sqlite", "spin-factors", "spin-sqlite-inproc", @@ -7689,7 +7432,7 @@ dependencies = [ "ctrlc", "futures", "sanitize-filename", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "spin-app", "spin-common", @@ -7718,10 +7461,10 @@ dependencies = [ "http-body-util", "hyper 1.5.1", "hyper-util", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pemfile 2.2.0", "rustls-pki-types", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "spin-app", "spin-core", @@ -7749,7 +7492,7 @@ dependencies = [ "anyhow", "futures", "redis 0.27.6", - "serde 1.0.215", + "serde 1.0.216", "spin-factor-variables", "spin-factors", "spin-telemetry", @@ -7768,7 +7511,7 @@ dependencies = [ "azure_identity", "azure_security_keyvault", "dotenvy", - "serde 1.0.215", + "serde 1.0.216", "spin-expressions", "spin-factor-variables", "spin-factors", @@ -8005,7 +7748,7 @@ dependencies = [ "cap-std", "fd-lock", "io-lifetimes 2.0.4", - "rustix 0.38.41", + "rustix 0.38.42", "windows-sys 0.59.0", "winx", ] @@ -8049,9 +7792,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if 1.0.0", - "fastrand 2.2.0", + "fastrand 2.3.0", "once_cell", - "rustix 0.38.41", + "rustix 0.38.42", "windows-sys 0.59.0", ] @@ -8102,11 +7845,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.4" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" +checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" dependencies = [ - "thiserror-impl 2.0.4", + "thiserror-impl 2.0.6", ] [[package]] @@ -8122,9 +7865,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.4" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" +checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" dependencies = [ "proc-macro2", "quote", @@ -8163,7 +7906,7 @@ dependencies = [ "num-conv", "num_threads", "powerfmt", - "serde 1.0.215", + "serde 1.0.216", "time-core", "time-macros", ] @@ -8305,16 +8048,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.25.0" @@ -8332,7 +8065,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.19", + "rustls 0.23.20", "tokio", ] @@ -8360,27 +8093,15 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", "tokio", ] -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - [[package]] name = "tokio-util" version = "0.7.13" @@ -8392,7 +8113,6 @@ dependencies = [ "futures-io", "futures-sink", "pin-project-lite", - "slab", "tokio", ] @@ -8402,7 +8122,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -8412,7 +8132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "indexmap 2.7.0", - "serde 1.0.215", + "serde 1.0.216", "serde_spanned", "toml_datetime", "toml_edit 0.22.22", @@ -8424,7 +8144,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -8445,7 +8165,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.7.0", - "serde 1.0.215", + "serde 1.0.216", "serde_spanned", "toml_datetime", "winnow 0.6.20", @@ -8498,7 +8218,7 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost 0.13.3", + "prost 0.13.4", "socket2 0.5.8", "tokio", "tokio-stream", @@ -8543,37 +8263,16 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper 0.1.2", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.4.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ - "base64 0.21.7", - "bitflags 2.6.0", - "bytes", "futures-core", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "http-range-header", - "mime", "pin-project-lite", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -8644,7 +8343,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", "tracing-core", ] @@ -8658,7 +8357,7 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sharded-slab", "smallvec", @@ -8676,7 +8375,7 @@ dependencies = [ "anyhow", "clap 3.2.25", "openssl", - "serde 1.0.215", + "serde 1.0.216", "spin-core", "spin-factor-wasi", "spin-factors", @@ -8697,7 +8396,7 @@ dependencies = [ "clap 3.2.25", "futures", "paho-mqtt", - "serde 1.0.215", + "serde 1.0.216", "spin-app", "spin-core", "spin-expressions", @@ -8722,7 +8421,7 @@ dependencies = [ "clap 3.2.25", "futures", "openssl", - "serde 1.0.215", + "serde 1.0.216", "spin-core", "spin-factors", "spin-runtime-factors", @@ -8784,25 +8483,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand 0.8.5", - "sha1", - "thiserror 1.0.69", - "url", - "utf-8", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -8939,7 +8619,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -8948,12 +8628,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf16_iter" version = "1.0.5" @@ -9006,7 +8680,7 @@ dependencies = [ "reqwest 0.12.9", "rustify", "rustify_derive", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "thiserror 1.0.69", "tracing", @@ -9091,7 +8765,7 @@ checksum = "6a22d3c9026f2f6a628cf386963844cdb7baea3b3419ba090c9096da114f977d" dependencies = [ "indexmap 2.7.0", "itertools 0.12.1", - "serde 1.0.215", + "serde 1.0.216", "serde_with", "thiserror 1.0.69", "warg-crypto", @@ -9123,7 +8797,7 @@ dependencies = [ "reqwest 0.12.9", "secrecy", "semver", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha256", "tempfile", @@ -9159,7 +8833,7 @@ dependencies = [ "p256", "rand_core 0.6.4", "secrecy", - "serde 1.0.215", + "serde 1.0.216", "sha2", "signature", "thiserror 1.0.69", @@ -9180,7 +8854,7 @@ dependencies = [ "prost-types 0.12.6", "protox", "regex", - "serde 1.0.215", + "serde 1.0.216", "warg-crypto", ] @@ -9198,7 +8872,7 @@ dependencies = [ "prost 0.12.6", "prost-types 0.12.6", "semver", - "serde 1.0.215", + "serde 1.0.216", "serde_with", "thiserror 1.0.69", "warg-crypto", @@ -9241,9 +8915,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -9252,13 +8926,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.90", @@ -9267,9 +8940,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -9280,9 +8953,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9290,9 +8963,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", @@ -9303,9 +8976,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-compose" @@ -9319,7 +8992,7 @@ dependencies = [ "indexmap 2.7.0", "log", "petgraph 0.6.5", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_yaml", "smallvec", @@ -9384,7 +9057,7 @@ checksum = "094aea3cb90e09f16ee25a4c0e324b3e8c934e7fd838bfa039aef5352f44a917" dependencies = [ "anyhow", "indexmap 2.7.0", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "spdx", @@ -9400,7 +9073,7 @@ checksum = "4d32029ce424f6d3c2b39b4419fb45a0e2d84fb0751e0c0a32b7ce8bd5d97f46" dependencies = [ "anyhow", "indexmap 2.7.0", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "spdx", @@ -9416,7 +9089,7 @@ checksum = "65a146bf9a60e9264f0548a2599aa9656dba9a641eff9ab88299dc2a637e483c" dependencies = [ "anyhow", "indexmap 2.7.0", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "spdx", @@ -9435,7 +9108,7 @@ dependencies = [ "http 1.2.0", "reqwest 0.12.9", "semver", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "thiserror 1.0.69", "toml 0.8.19", @@ -9458,7 +9131,7 @@ dependencies = [ "oci-distribution 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "oci-wasm", "secrecy", - "serde 1.0.215", + "serde 1.0.216", "serde_json", "sha2", "thiserror 1.0.69", @@ -9532,7 +9205,7 @@ dependencies = [ "hashbrown 0.14.5", "indexmap 2.7.0", "semver", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -9546,7 +9219,7 @@ dependencies = [ "hashbrown 0.14.5", "indexmap 2.7.0", "semver", - "serde 1.0.215", + "serde 1.0.216", ] [[package]] @@ -9611,9 +9284,9 @@ dependencies = [ "postcard", "psm", "rayon", - "rustix 0.38.41", + "rustix 0.38.42", "semver", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "smallvec", @@ -9657,8 +9330,8 @@ dependencies = [ "directories-next", "log", "postcard", - "rustix 0.38.41", - "serde 1.0.215", + "rustix 0.38.42", + "serde 1.0.216", "serde_derive", "sha2", "toml 0.8.19", @@ -9729,7 +9402,7 @@ dependencies = [ "postcard", "rustc-demangle", "semver", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "target-lexicon", "wasm-encoder 0.217.0", @@ -9748,7 +9421,7 @@ dependencies = [ "anyhow", "cc", "cfg-if 1.0.0", - "rustix 0.38.41", + "rustix 0.38.42", "wasmtime-asm-macros", "wasmtime-versioned-export-macros", "windows-sys 0.52.0", @@ -9762,7 +9435,7 @@ checksum = "106731c6ebe1d551362ee8c876d450bdc2d517988b20eb3653dc4837b1949437" dependencies = [ "object", "once_cell", - "rustix 0.38.41", + "rustix 0.38.42", "wasmtime-versioned-export-macros", ] @@ -9792,7 +9465,7 @@ checksum = "c6d83a7816947a4974e2380c311eacb1db009b8bad86081dc726b705603c93c7" dependencies = [ "anyhow", "cranelift-entity", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "smallvec", "wasmparser 0.217.0", @@ -9829,7 +9502,7 @@ dependencies = [ "io-extras", "io-lifetimes 2.0.4", "once_cell", - "rustix 0.38.41", + "rustix 0.38.42", "system-interface", "thiserror 1.0.69", "tokio", @@ -9925,9 +9598,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -9980,7 +9653,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.41", + "rustix 0.38.42", ] [[package]] @@ -9989,7 +9662,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.5.7", + "redox_syscall 0.5.8", "wasite", "web-sys", ] @@ -10319,7 +9992,7 @@ dependencies = [ "bitflags 2.6.0", "indexmap 2.7.0", "log", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "wasm-encoder 0.209.1", @@ -10338,7 +10011,7 @@ dependencies = [ "bitflags 2.6.0", "indexmap 2.7.0", "log", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "wasm-encoder 0.217.0", @@ -10358,7 +10031,7 @@ dependencies = [ "indexmap 2.7.0", "log", "semver", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "unicode-xid", @@ -10376,7 +10049,7 @@ dependencies = [ "indexmap 2.7.0", "log", "semver", - "serde 1.0.215", + "serde 1.0.216", "serde_derive", "serde_json", "unicode-xid", @@ -10424,7 +10097,7 @@ checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", "linux-raw-sys 0.4.14", - "rustix 0.38.41", + "rustix 0.38.42", ] [[package]] @@ -10458,7 +10131,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -10504,7 +10177,7 @@ dependencies = [ "once_cell", "ordered-stream", "rand 0.8.5", - "serde 1.0.215", + "serde 1.0.216", "serde_repr", "sha1", "static_assertions", @@ -10537,7 +10210,7 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" dependencies = [ - "serde 1.0.215", + "serde 1.0.216", "static_assertions", "zvariant", ] @@ -10649,7 +10322,7 @@ dependencies = [ "byteorder", "enumflags2", "libc", - "serde 1.0.215", + "serde 1.0.216", "static_assertions", "zvariant_derive", ] diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 7cce802b..0efe63eb 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -6,18 +6,9 @@ license.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dev-dependencies] anyhow = "1" -kube = { version = "0.87", features = ["runtime", "derive", "ws"] } -k8s-openapi = { version = "0.20", features = ["v1_25"] } curl = { version = "0.4", features = ["static-curl"] } -rand = "0.8" -tokio = { version = "1", features = ["rt", "macros", "process"] } - - -[dev-dependencies] -http = "1.1" -tower = "0.5" -hyper = "1.4" redis = { version = "0.25", features = ["tokio-comp"] } rumqttc = "0.24.0" +tokio = { version = "1", features = ["rt", "macros", "process"] } \ No newline at end of file diff --git a/tests/src/integration_test.rs b/tests/src/integration_test.rs index 1d2f3a71..dcddfea3 100644 --- a/tests/src/integration_test.rs +++ b/tests/src/integration_test.rs @@ -1,16 +1,55 @@ #[cfg(test)] mod test { - use std::{thread, time}; + use std::{ + process::Command, + thread, + time::{self, Duration}, + }; use anyhow::{Context, Result}; + use curl::easy::Easy; use redis::AsyncCommands; - use tokio::process::Command; - - use crate::retry_get; const RETRY_TIMES: u32 = 5; const INTERVAL_IN_SECS: u64 = 10; + pub async fn retry_get(url: &str, retry_times: u32, interval_in_secs: u64) -> Result> { + let mut i = 0; + let mut handle = Easy::new(); + handle.url(url)?; + let mut buf = Vec::new(); + loop { + let res = { + let mut transfer = handle.transfer(); + transfer.write_function(|data| { + buf.extend_from_slice(data); + Ok(data.len()) + })?; + transfer.perform() + }; + let response_code = handle.response_code()?; + // verify res is ok and not 404 + match res { + Ok(_) => { + println!("response_code: {}", response_code); + if response_code / 100 == 2 { + break; // 2xx response + } + } + Err(e) => { + println!("res: {}, response_code: {}", e, response_code); + } + } + i += 1; + if i == retry_times { + anyhow::bail!("failed to curl for {}", url); + } + buf = Vec::new(); + tokio::time::sleep(Duration::from_secs(interval_in_secs)).await; + } + Ok(buf) + } + #[tokio::test] async fn spin_test() -> Result<()> { let host_port = 8082; @@ -201,7 +240,7 @@ mod test { } async fn is_kubectl_installed() -> anyhow::Result { - let output: Result = Command::new("kubectl") + let output: Result = tokio::process::Command::new("kubectl") .arg("version") .arg("--client") .output() @@ -228,7 +267,7 @@ mod test { } async fn get_logs_by_label(label: &str) -> Result { - let output = Command::new("kubectl") + let output = tokio::process::Command::new("kubectl") .arg("logs") .arg("-l") .arg(label) diff --git a/tests/src/lib.rs b/tests/src/lib.rs index 97e5a505..2758dbf6 100644 --- a/tests/src/lib.rs +++ b/tests/src/lib.rs @@ -1,111 +1 @@ -use std::{process::Command, time::Duration}; - -use anyhow::Result; -use curl::easy::Easy; -use k8s_openapi::api::core::v1::Pod; -use kube::{api::ListParams, config::KubeConfigOptions, Api, Client, Config, ResourceExt}; -use rand::{distributions::Alphanumeric, Rng}; - mod integration_test; - -pub async fn retry_get(url: &str, retry_times: u32, interval_in_secs: u64) -> Result> { - let mut i = 0; - let mut handle = Easy::new(); - handle.url(url)?; - let mut buf = Vec::new(); - loop { - let res = { - let mut transfer = handle.transfer(); - transfer.write_function(|data| { - buf.extend_from_slice(data); - Ok(data.len()) - })?; - transfer.perform() - }; - let response_code = handle.response_code()?; - // verify res is ok and not 404 - match res { - Ok(_) => { - println!("response_code: {}", response_code); - if response_code / 100 == 2 { - break; // 2xx response - } - } - Err(e) => { - println!("res: {}, response_code: {}", e, response_code); - } - } - i += 1; - if i == retry_times { - anyhow::bail!("failed to curl for {}", url); - } - buf = Vec::new(); - tokio::time::sleep(Duration::from_secs(interval_in_secs)).await; - } - Ok(buf) -} - -pub async fn retry_put( - url: &str, - data: &str, - retry_times: u32, - interval_in_secs: u64, -) -> Result<()> { - let mut i = 0; - loop { - let output = Command::new("curl") - .arg("-X") - .arg("PUT") - .arg(url) - .arg("-d") - .arg(data) - .arg("-s") - .arg("-o") - .arg("/dev/null") - .arg("-w") - .arg("%{http_code}") - .output()?; - - let response_code = String::from_utf8_lossy(&output.stdout) - .trim() - .parse::()?; - - if response_code / 100 == 2 { - break; // 2xx response - } - - i += 1; - if i == retry_times { - anyhow::bail!("failed to curl for {}", url); - } - - tokio::time::sleep(Duration::from_secs(interval_in_secs)).await; - } - Ok(()) -} - -pub async fn list_pods(cluster_name: &str) -> Result<()> { - let config = Config::from_kubeconfig(&KubeConfigOptions { - context: Some(cluster_name.to_string()), - ..Default::default() - }) - .await?; - - let client = Client::try_from(config)?; - - let pods: Api = Api::default_namespaced(client); - for p in pods.list(&ListParams::default()).await? { - println!("found pod {}", p.name_any()); - } - Ok(()) -} - -pub async fn random_payload() -> String { - let rng = rand::thread_rng(); - let payload: String = rng - .sample_iter(&Alphanumeric) - .take(30) - .map(char::from) - .collect(); - payload -} From 3a7d1817a25fa9894c0f47221ecb426fd0ac3c91 Mon Sep 17 00:00:00 2001 From: "Jiaxiao (mossaka) Zhou" Date: Wed, 11 Dec 2024 16:57:59 +0000 Subject: [PATCH 2/2] tests: rustfmt Signed-off-by: Jiaxiao (mossaka) Zhou --- tests/src/integration_test.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/src/integration_test.rs b/tests/src/integration_test.rs index dcddfea3..697f8d48 100644 --- a/tests/src/integration_test.rs +++ b/tests/src/integration_test.rs @@ -240,11 +240,12 @@ mod test { } async fn is_kubectl_installed() -> anyhow::Result { - let output: Result = tokio::process::Command::new("kubectl") - .arg("version") - .arg("--client") - .output() - .await; + let output: Result = + tokio::process::Command::new("kubectl") + .arg("version") + .arg("--client") + .output() + .await; match output { Ok(output) => Ok(output.status.success()),