Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps and fix warnings #14

Merged
merged 7 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
ubuntu-latest,
]
toolchain: [
1.75.0,
1.77.2,
stable,
]
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
os: [
ubuntu-latest,
macos-latest,
macos-13,
windows-latest,
]
toolchain: [
1.75.0,
1.77.2,
stable,
]
steps:
Expand Down
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion crates/influxive-child-svc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
36 changes: 18 additions & 18 deletions crates/influxive-child-svc/src/download_binaries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ use influxive_downloader::*;
mod tgt {
use super::*;
pub const DL_DB: Option<DownloadSpec> = 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: "",
Expand All @@ -37,15 +37,15 @@ mod tgt {
mod tgt {
use super::*;
pub const DL_DB: Option<DownloadSpec> = 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: "",
Expand All @@ -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")
neonphog marked this conversation as resolved.
Show resolved Hide resolved
))]
mod tgt {
use super::*;
pub const DL_DB: Option<DownloadSpec> = 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: "",
Expand All @@ -106,15 +106,15 @@ mod tgt {
mod tgt {
use super::*;
pub const DL_DB: Option<DownloadSpec> = 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",
Expand Down Expand Up @@ -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")
)))]
Expand Down
3 changes: 1 addition & 2 deletions crates/influxive-child-svc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![deny(missing_docs)]
#![deny(warnings)]
#![deny(unsafe_code)]
//! Run influxd as a child process.
//!
Expand Down Expand Up @@ -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}")));
}

Expand Down
6 changes: 3 additions & 3 deletions crates/influxive-child-svc/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion crates/influxive-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/influxive-downloader/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 0 additions & 1 deletion crates/influxive-downloader/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/influxive-otel-atomic-obs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
36 changes: 28 additions & 8 deletions crates/influxive-otel-atomic-obs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![deny(missing_docs)]
#![deny(warnings)]
#![deny(unsafe_code)]
//! Opentelemetry observable metric implementations based on std::sync::atomic
//! types.
Expand Down Expand Up @@ -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<AtomicU64>, Arc<Unreg>);
pub struct AtomicObservableCounterF64(
Arc<AtomicU64>,
#[allow(unused)] Arc<Unreg>,
);

impl AtomicObservableCounterF64 {
/// Construct a new AtomicObservableCounterF64, and associated
Expand Down Expand Up @@ -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<AtomicU64>, Arc<Unreg>);
pub struct AtomicObservableUpDownCounterF64(
Arc<AtomicU64>,
#[allow(unused)] Arc<Unreg>,
);

impl AtomicObservableUpDownCounterF64 {
/// Construct a new AtomicObservableUpDownCounterF64,
Expand Down Expand Up @@ -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<AtomicU64>, Arc<Unreg>);
pub struct AtomicObservableGaugeF64(
Arc<AtomicU64>,
#[allow(unused)] Arc<Unreg>,
);

impl AtomicObservableGaugeF64 {
/// Construct a new AtomicObservableGaugeF64, and associated opentelemetry metric.
Expand Down Expand Up @@ -326,7 +334,10 @@ impl AtomicObservableGaugeF64 {

/// Observable gauge based on std::sync::atomic::AtomicI64.
#[derive(Debug, Clone)]
pub struct AtomicObservableGaugeI64(Arc<AtomicI64>, Arc<Unreg>);
pub struct AtomicObservableGaugeI64(
Arc<AtomicI64>,
#[allow(unused)] Arc<Unreg>,
);

impl AtomicObservableGaugeI64 {
/// Construct a new ObsGaugeAtomicI64, and associated opentelemetry metric.
Expand Down Expand Up @@ -382,7 +393,10 @@ impl AtomicObservableGaugeI64 {

/// Observable up down counter based on std::sync::atomic::AtomicI64.
#[derive(Debug, Clone)]
pub struct AtomicObservableUpDownCounterI64(Arc<AtomicI64>, Arc<Unreg>);
pub struct AtomicObservableUpDownCounterI64(
Arc<AtomicI64>,
#[allow(unused)] Arc<Unreg>,
);

impl AtomicObservableUpDownCounterI64 {
/// Construct a new AtomicObservableUpDownCounterI64,
Expand Down Expand Up @@ -440,7 +454,10 @@ impl AtomicObservableUpDownCounterI64 {

/// Observable counter based on std::sync::atomic::AtomicU64.
#[derive(Debug, Clone)]
pub struct AtomicObservableCounterU64(Arc<AtomicU64>, Arc<Unreg>);
pub struct AtomicObservableCounterU64(
Arc<AtomicU64>,
#[allow(unused)] Arc<Unreg>,
);

impl AtomicObservableCounterU64 {
/// Construct a new AtomicObservableCounterU64,
Expand Down Expand Up @@ -498,7 +515,10 @@ impl AtomicObservableCounterU64 {

/// Observable gauge based on std::sync::atomic::AtomicU64.
#[derive(Debug, Clone)]
pub struct AtomicObservableGaugeU64(Arc<AtomicU64>, Arc<Unreg>);
pub struct AtomicObservableGaugeU64(
Arc<AtomicU64>,
#[allow(unused)] Arc<Unreg>,
);

impl AtomicObservableGaugeU64 {
/// Construct a new AtomicObservableGaugeU64,
Expand Down
2 changes: 1 addition & 1 deletion crates/influxive-otel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/influxive-writer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions crates/influxive-writer/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
);
}
Expand All @@ -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"),
);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/influxive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading