diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 8f359cc..0e6bc6a 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -15,7 +15,7 @@ jobs: ubuntu-latest, ] toolchain: [ - 1.75.0, + 1.77.2, stable, ] steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc720da..7387d80 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,10 +15,11 @@ jobs: os: [ ubuntu-latest, macos-latest, + macos-13, windows-latest, ] toolchain: [ - 1.75.0, + 1.77.2, stable, ] steps: diff --git a/Cargo.toml b/Cargo.toml index f0c143a..3351499 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,17 +20,17 @@ futures = "0.3" hex = "0.4" hex-literal = "0.4" influxdb = "0.7" -influxive-core = { version = "0.0.2-alpha.1", path = "crates/influxive-core" } -influxive-writer = { version = "0.0.2-alpha.1", path = "crates/influxive-writer" } -influxive-downloader = { version = "0.0.2-alpha.1", path = "crates/influxive-downloader" } -influxive-child-svc = { version = "0.0.2-alpha.1", path = "crates/influxive-child-svc" } -influxive-otel = { version = "0.0.2-alpha.1", path = "crates/influxive-otel" } -influxive-otel-atomic-obs = { version = "0.0.2-alpha.1", path = "crates/influxive-otel-atomic-obs" } +influxive-core = { version = "0.0.3-alpha.1", path = "crates/influxive-core" } +influxive-writer = { version = "0.0.3-alpha.1", path = "crates/influxive-writer" } +influxive-downloader = { version = "0.0.3-alpha.1", path = "crates/influxive-downloader" } +influxive-child-svc = { version = "0.0.3-alpha.1", path = "crates/influxive-child-svc" } +influxive-otel = { version = "0.0.3-alpha.1", path = "crates/influxive-otel" } +influxive-otel-atomic-obs = { version = "0.0.3-alpha.1", path = "crates/influxive-otel-atomic-obs" } opentelemetry_api = { version = "0.20.0", features = [ "metrics" ] } -reqwest = "0.11" +reqwest = "0.12" sha2 = "0.10" tar = "0.4" tempfile = "3" tokio = "1" tracing = "0.1" -zip = "0.6" +zip = "2.1" diff --git a/crates/influxive-child-svc/Cargo.toml b/crates/influxive-child-svc/Cargo.toml index 7796855..6ce1cb7 100644 --- a/crates/influxive-child-svc/Cargo.toml +++ b/crates/influxive-child-svc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "influxive-child-svc" -version = "0.0.2-alpha.1" +version = "0.0.3-alpha.1" edition = "2021" description = "Run influxd as a child process" license = "MIT OR Apache-2.0" diff --git a/crates/influxive-child-svc/src/download_binaries.rs b/crates/influxive-child-svc/src/download_binaries.rs index 400b665..b8884ad 100644 --- a/crates/influxive-child-svc/src/download_binaries.rs +++ b/crates/influxive-child-svc/src/download_binaries.rs @@ -4,15 +4,15 @@ use influxive_downloader::*; mod tgt { use super::*; pub const DL_DB: Option = Some(DownloadSpec { - url: "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.1-linux-amd64.tar.gz", + url: "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.6_linux_amd64.tar.gz", archive: Archive::TarGz { - inner_path: "influxdb2_linux_amd64/influxd", + inner_path: "influxdb2-2.7.6/usr/bin/influxd", }, archive_hash: Hash::Sha2_256(&hex_literal::hex!( - "e5ecfc15c35af55641ffc92680ad0fb043aa51a942944252e214e2a551c60ebb" + "a29d56dbd18edeeb893f61fa0517f5d9140d2e073f2ecf805912f4b91f308825" )), file_hash: Hash::Sha2_256(&hex_literal::hex!( - "68547e6e8b05088f1d824c9923412d22045003026f4f6e844630a126c10a97e1" + "5c8fcb17accb9b0e689e0c6259aaace16ac42e5c0a2c99cef158de843d14d759" )), file_prefix: "influxd", file_extension: "", @@ -37,15 +37,15 @@ mod tgt { mod tgt { use super::*; pub const DL_DB: Option = Some(DownloadSpec { - url: "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.1-linux-arm64.tar.gz", + url: "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.6_linux_arm64.tar.gz", archive: Archive::TarGz { - inner_path: "influxdb2_linux_arm64/influxd", + inner_path: "influxdb2-2.7.6/usr/bin/influxd", }, archive_hash: Hash::Sha2_256(&hex_literal::hex!( - "b88989dae0c802fdee499fa07aae837139da3c786293c74e9d7c46b8460510d4" + "96b5574a2772da7d54f496d881e741f3339027a563502e55d8084504b0e22e90" )), file_hash: Hash::Sha2_256(&hex_literal::hex!( - "b966602eb1b43b5d9633446f91d3b84cdd15abfdcaa3aac3dd210368e4eca85e" + "e2d8b81c11e6bec68bc61adb224ba58d87be951c6a0ce9f9907c55a3b69ed864" )), file_prefix: "influxd", file_extension: "", @@ -68,20 +68,20 @@ mod tgt { #[cfg(all( any(target_os = "macos", target_os = "ios", target_os = "tvos"), - target_arch = "x86_64" + any(target_arch = "x86_64", target_arch = "aarch64") ))] mod tgt { use super::*; pub const DL_DB: Option = Some(DownloadSpec { - url: "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.1-darwin-amd64.tar.gz", + url: "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.6_darwin_amd64.tar.gz", archive: Archive::TarGz { - inner_path: "influxdb2_darwin_amd64/influxd", + inner_path: "influxdb2-2.7.6/influxd", }, archive_hash: Hash::Sha2_256(&hex_literal::hex!( - "af709215dce8767ae131802f050c139d0ae179c13f29bb68ca5baa2716aa1874" + "f484a41ad390ccae7a4cc99960ed0eb6a0309487696cf646b63122c96dbd139d" )), file_hash: Hash::Sha2_256(&hex_literal::hex!( - "8eb1e1391f6c6619c44b5edd27a39806cb7de89adb8712f66e74379801da4ce3" + "01d6a032a9508c8e860726824e9c50e177d3afa5333c69c753d6c776c5d89e4a" )), file_prefix: "influxd", file_extension: "", @@ -106,15 +106,15 @@ mod tgt { mod tgt { use super::*; pub const DL_DB: Option = Some(DownloadSpec { - url: "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.1-windows-amd64.zip", + url: "https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.6-windows.zip", archive: Archive::Zip { - inner_path: "influxdb2_windows_amd64\\influxd.exe", + inner_path: "influxd.exe", }, archive_hash: Hash::Sha2_256(&hex_literal::hex!( - "8e0acbc7dba55a794450fa53d72cd48958d11d39e619394a268e06a6c03af672" + "a874451d9e41dbcd63486c382b9d8bd4c3e06d7ebfdd78b0c7cdfa16bf7e5df3" )), file_hash: Hash::Sha2_256(&hex_literal::hex!( - "841f6739607765fc2ffc39be9514dfdce597381368987bab48f5d9cab8d544c7" + "c6ad343c46eff73fcebcbeead06d30564293c6ece2dfaa829dfe1811370450ed" )), file_prefix: "influxd", file_extension: ".exe", @@ -142,7 +142,7 @@ mod tgt { ), all( any(target_os = "macos", target_os = "ios", target_os = "tvos"), - target_arch = "x86_64" + any(target_arch = "x86_64", target_arch = "aarch64") ), all(target_os = "windows", target_arch = "x86_64") )))] diff --git a/crates/influxive-child-svc/src/lib.rs b/crates/influxive-child-svc/src/lib.rs index a7971a6..02dc270 100644 --- a/crates/influxive-child-svc/src/lib.rs +++ b/crates/influxive-child-svc/src/lib.rs @@ -1,5 +1,4 @@ #![deny(missing_docs)] -#![deny(warnings)] #![deny(unsafe_code)] //! Run influxd as a child process. //! @@ -514,7 +513,7 @@ async fn validate_influx( // alas, the cli prints out the unhelpful version "dev". if is_cli && !ver.contains("build_date: 2023-04-28") { return Err(err_other(format!("invalid build_date: {ver}"))); - } else if !is_cli && !ver.contains("InfluxDB v2.7.1") { + } else if !is_cli && !ver.contains("InfluxDB v2.7.6") { return Err(err_other(format!("invalid version: {ver}"))); } diff --git a/crates/influxive-child-svc/src/test.rs b/crates/influxive-child-svc/src/test.rs index 9b13f16..c99fb92 100644 --- a/crates/influxive-child-svc/src/test.rs +++ b/crates/influxive-child-svc/src/test.rs @@ -7,8 +7,8 @@ const DASHBOARD_TEMPLATE: &[u8] = async fn sanity() { let tmp = tempfile::tempdir().unwrap(); - const METRIC: &'static str = "my.metric"; - const VALUE: &'static str = "value"; + const METRIC: &str = "my.metric"; + const VALUE: &str = "value"; let i = InfluxiveChildSvc::new( InfluxiveChildSvcConfig::default() @@ -56,7 +56,7 @@ async fn sanity() { .unwrap(); // make sure the result contains at least 10 of the entries - let line_count = result.split("\n").count(); + let line_count = result.split('\n').count(); assert!(line_count >= 10, "{result}"); drop(i); diff --git a/crates/influxive-core/Cargo.toml b/crates/influxive-core/Cargo.toml index 06f07fe..8c2162a 100644 --- a/crates/influxive-core/Cargo.toml +++ b/crates/influxive-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "influxive-core" -version = "0.0.2-alpha.1" +version = "0.0.3-alpha.1" edition = "2021" description = "Core types for influxive crates" license = "MIT OR Apache-2.0" diff --git a/crates/influxive-downloader/Cargo.toml b/crates/influxive-downloader/Cargo.toml index d37a2a5..cfbb0d1 100644 --- a/crates/influxive-downloader/Cargo.toml +++ b/crates/influxive-downloader/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "influxive-downloader" -version = "0.0.2-alpha.1" +version = "0.0.3-alpha.1" edition = "2021" description = "Influxive system download utility" license = "MIT OR Apache-2.0" diff --git a/crates/influxive-downloader/src/lib.rs b/crates/influxive-downloader/src/lib.rs index 6c8105e..8ab644d 100644 --- a/crates/influxive-downloader/src/lib.rs +++ b/crates/influxive-downloader/src/lib.rs @@ -1,5 +1,4 @@ #![deny(missing_docs)] -#![deny(warnings)] #![deny(unsafe_code)] //! Influxive system download utility. It's probably not useful to use this //! crate directly. It mainly exists as separate from the diff --git a/crates/influxive-otel-atomic-obs/Cargo.toml b/crates/influxive-otel-atomic-obs/Cargo.toml index cb046db..4dc38e6 100644 --- a/crates/influxive-otel-atomic-obs/Cargo.toml +++ b/crates/influxive-otel-atomic-obs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "influxive-otel-atomic-obs" -version = "0.0.2-alpha.1" +version = "0.0.3-alpha.1" edition = "2021" description = "Opentelemetry observable metric implementations based on std::sync::atomic types" license = "MIT OR Apache-2.0" diff --git a/crates/influxive-otel-atomic-obs/src/lib.rs b/crates/influxive-otel-atomic-obs/src/lib.rs index 31d90ac..caa6c66 100644 --- a/crates/influxive-otel-atomic-obs/src/lib.rs +++ b/crates/influxive-otel-atomic-obs/src/lib.rs @@ -1,5 +1,4 @@ #![deny(missing_docs)] -#![deny(warnings)] #![deny(unsafe_code)] //! Opentelemetry observable metric implementations based on std::sync::atomic //! types. @@ -135,7 +134,10 @@ impl Drop for Unreg { /// Observable counter based on std::sync::atomic::AtomicU64 /// (but storing f64 bits). #[derive(Debug, Clone)] -pub struct AtomicObservableCounterF64(Arc, Arc); +pub struct AtomicObservableCounterF64( + Arc, + #[allow(unused)] Arc, +); impl AtomicObservableCounterF64 { /// Construct a new AtomicObservableCounterF64, and associated @@ -205,7 +207,10 @@ impl AtomicObservableCounterF64 { /// Observable up down counter based on std::sync::atomic::AtomicU64 /// (but storing f64 bits). #[derive(Debug, Clone)] -pub struct AtomicObservableUpDownCounterF64(Arc, Arc); +pub struct AtomicObservableUpDownCounterF64( + Arc, + #[allow(unused)] Arc, +); impl AtomicObservableUpDownCounterF64 { /// Construct a new AtomicObservableUpDownCounterF64, @@ -270,7 +275,10 @@ impl AtomicObservableUpDownCounterF64 { /// Observable gauge based on std::sync::atomic::AtomicU64 /// (but storing f64 bits). #[derive(Debug, Clone)] -pub struct AtomicObservableGaugeF64(Arc, Arc); +pub struct AtomicObservableGaugeF64( + Arc, + #[allow(unused)] Arc, +); impl AtomicObservableGaugeF64 { /// Construct a new AtomicObservableGaugeF64, and associated opentelemetry metric. @@ -326,7 +334,10 @@ impl AtomicObservableGaugeF64 { /// Observable gauge based on std::sync::atomic::AtomicI64. #[derive(Debug, Clone)] -pub struct AtomicObservableGaugeI64(Arc, Arc); +pub struct AtomicObservableGaugeI64( + Arc, + #[allow(unused)] Arc, +); impl AtomicObservableGaugeI64 { /// Construct a new ObsGaugeAtomicI64, and associated opentelemetry metric. @@ -382,7 +393,10 @@ impl AtomicObservableGaugeI64 { /// Observable up down counter based on std::sync::atomic::AtomicI64. #[derive(Debug, Clone)] -pub struct AtomicObservableUpDownCounterI64(Arc, Arc); +pub struct AtomicObservableUpDownCounterI64( + Arc, + #[allow(unused)] Arc, +); impl AtomicObservableUpDownCounterI64 { /// Construct a new AtomicObservableUpDownCounterI64, @@ -440,7 +454,10 @@ impl AtomicObservableUpDownCounterI64 { /// Observable counter based on std::sync::atomic::AtomicU64. #[derive(Debug, Clone)] -pub struct AtomicObservableCounterU64(Arc, Arc); +pub struct AtomicObservableCounterU64( + Arc, + #[allow(unused)] Arc, +); impl AtomicObservableCounterU64 { /// Construct a new AtomicObservableCounterU64, @@ -498,7 +515,10 @@ impl AtomicObservableCounterU64 { /// Observable gauge based on std::sync::atomic::AtomicU64. #[derive(Debug, Clone)] -pub struct AtomicObservableGaugeU64(Arc, Arc); +pub struct AtomicObservableGaugeU64( + Arc, + #[allow(unused)] Arc, +); impl AtomicObservableGaugeU64 { /// Construct a new AtomicObservableGaugeU64, diff --git a/crates/influxive-otel/Cargo.toml b/crates/influxive-otel/Cargo.toml index 46992ea..6ef5e8d 100644 --- a/crates/influxive-otel/Cargo.toml +++ b/crates/influxive-otel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "influxive-otel" -version = "0.0.2-alpha.1" +version = "0.0.3-alpha.1" edition = "2021" description = "Opentelemetry metrics bindings for influxive-child-svc" license = "MIT OR Apache-2.0" diff --git a/crates/influxive-writer/Cargo.toml b/crates/influxive-writer/Cargo.toml index 70e625d..9b6d8d8 100644 --- a/crates/influxive-writer/Cargo.toml +++ b/crates/influxive-writer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "influxive-writer" -version = "0.0.2-alpha.1" +version = "0.0.3-alpha.1" edition = "2021" description = "Rust utility for efficiently writing metrics to a running InfluxDB instance" license = "MIT OR Apache-2.0" diff --git a/crates/influxive-writer/src/test.rs b/crates/influxive-writer/src/test.rs index adcbc9c..e62fb5c 100644 --- a/crates/influxive-writer/src/test.rs +++ b/crates/influxive-writer/src/test.rs @@ -123,7 +123,7 @@ async fn writer_stress() { ); writer.write_metric( Metric::new(std::time::SystemTime::now(), "my.metric") - .with_field("val", 3.14) + .with_field("val", 3.77) .with_tag("tag", "test-tag"), ); } @@ -150,7 +150,7 @@ async fn writer_stress() { ); writer.write_metric( Metric::new(std::time::SystemTime::now(), "my.metric") - .with_field("val", 3.14) + .with_field("val", 3.77) .with_tag("tag", "test-tag"), ); } diff --git a/crates/influxive/Cargo.toml b/crates/influxive/Cargo.toml index 14804da..11d934a 100644 --- a/crates/influxive/Cargo.toml +++ b/crates/influxive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "influxive" -version = "0.0.2-alpha.1" +version = "0.0.3-alpha.1" edition = "2021" description = "High-level Rust integration of opentelemetry metrics and InfluxDB" license = "MIT OR Apache-2.0" diff --git a/flake.lock b/flake.lock index b740137..d1e19bb 100644 --- a/flake.lock +++ b/flake.lock @@ -141,16 +141,16 @@ "holochain": { "flake": false, "locked": { - "lastModified": 1707245081, - "narHash": "sha256-l9WHMlD9IDuEv/N/3WDCsP3XLUUnZFrOBEZjbWnC+/Y=", + "lastModified": 1714468636, + "narHash": "sha256-3pdzVmU2uKh7ikcD1K2/YbbYiZGVvWiR46mkdYx3ZbA=", "owner": "holochain", "repo": "holochain", - "rev": "0a3b2408b2d6482b913b9f0faf58a39b567f763a", + "rev": "5b5c177dab35582b6190209762fc57c20d8f157a", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.2.6", + "ref": "holochain-0.2.8", "repo": "holochain", "type": "github" } @@ -188,11 +188,11 @@ "versions": "versions" }, "locked": { - "lastModified": 1709731345, - "narHash": "sha256-YNMiQJRbnBdTQ/Q26M5zp+j2DGtpmaI/VWPVJxc4G7k=", + "lastModified": 1717557645, + "narHash": "sha256-kvuCWaL6ETekIhkqwmvBhIgO4thff4Fva9M/6zbj0QM=", "owner": "holochain", "repo": "holochain", - "rev": "3c3d2d73819e97cb9f5487d853f75a9954850f1e", + "rev": "9edf297508e537cdcf9664a01e7fb19dce67a400", "type": "github" }, "original": { @@ -252,11 +252,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1709479366, - "narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=", + "lastModified": 1716293225, + "narHash": "sha256-pU9ViBVE3XYb70xZx+jK6SEVphvt7xMTbm6yDIF4xPs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b8697e57f10292a6165a20f03d2f42920dfaf973", + "rev": "3eaeaeb6b1e08a016380c279f8846e0bd8808916", "type": "github" }, "original": { @@ -329,11 +329,11 @@ ] }, "locked": { - "lastModified": 1709691047, - "narHash": "sha256-2Vwx1FLufoMEcOS8KAwP8H83IP3Hw6ZPrIDHkSXrFCY=", + "lastModified": 1717467480, + "narHash": "sha256-9Fbar+ycxdfZ6HbwOCgD+jWG3du/12TFisKRQm4Zhfc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "d55139f3061cdf2c8f5f7bc8d49e884826e6a4ea", + "rev": "260ff391290a2b23958d04db0d3e7015c8417401", "type": "github" }, "original": { @@ -345,11 +345,11 @@ "scaffolding": { "flake": false, "locked": { - "lastModified": 1708376918, - "narHash": "sha256-zjjAmu8t566/PUxo2g0EFZ4GAdUu/UbkGA8hsVbFEoQ=", + "lastModified": 1714725444, + "narHash": "sha256-WkZmIIzXbST+JlVLKr5o34AHqC2Eh8ixmZB2GV3y+dg=", "owner": "holochain", "repo": "scaffolding", - "rev": "ddb8b5a950e7be81d704000e662564696bef5d6b", + "rev": "5227734ec6bdf7c6f2dfde1934cefc3df445b5cb", "type": "github" }, "original": { @@ -382,13 +382,10 @@ "scaffolding": "scaffolding" }, "locked": { - "dir": "versions/0_2", - "lastModified": 1708423819, - "narHash": "sha256-/Z0Yg+raaBqlYvH4W7wOrcUrtTUeJXXhLx1DEoGL9SM=", - "owner": "holochain", - "repo": "holochain", - "rev": "58df5bebca1564f3b4c340326aeaf4d5df7e3c39", - "type": "github" + "lastModified": 1714738789, + "narHash": "sha256-6c4kHSqrO178oClbd2tuDGYWniXPVFbfxi6nthZ3Oo8=", + "path": "versions/0_2", + "type": "path" }, "original": { "dir": "versions/0_2",