Skip to content

Commit d3bb3ae

Browse files
authored
chore: bump Rust version (#1383)
bumped edition to 2024 bumped version to 1.88.0
1 parent 673052b commit d3bb3ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+476
-402
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
name = "parseable"
33
version = "2.3.5"
44
authors = ["Parseable Team <[email protected]>"]
5-
edition = "2021"
6-
rust-version = "1.83.0"
5+
edition = "2024"
6+
rust-version = "1.88.0"
77
categories = ["logs", "observability", "metrics", "traces"]
88
build = "build.rs"
99

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

1616
# build stage
17-
FROM rust:1.84.0-bookworm AS builder
17+
FROM rust:1.88.0-bookworm AS builder
1818

1919
LABEL org.opencontainers.image.title="Parseable"
2020
LABEL maintainer="Parseable Team <[email protected]>"

Dockerfile.debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

1616
# build stage
17-
FROM docker.io/rust:1.84.0-bookworm AS builder
17+
FROM docker.io/rust:1.88.0-bookworm AS builder
1818

1919
LABEL org.opencontainers.image.title="Parseable"
2020
LABEL maintainer="Parseable Team <[email protected]>"

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub fn main() -> Result<()> {
3838

3939
mod ui {
4040

41-
use std::fs::{self, create_dir_all, OpenOptions};
41+
use std::fs::{self, OpenOptions, create_dir_all};
4242
use std::io::{self, Cursor, Read, Write};
4343
use std::path::{Path, PathBuf};
4444
use std::{env, panic};

src/alerts/alerts_utils.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ use datafusion::{
2727
sum::sum,
2828
},
2929
logical_expr::{BinaryExpr, Literal, Operator},
30-
prelude::{col, lit, DataFrame, Expr},
30+
prelude::{DataFrame, Expr, col, lit},
3131
};
3232
use tracing::trace;
3333

3434
use crate::{
3535
alerts::LogicalOperator,
3636
handlers::http::query::{create_streams_for_distributed, update_schema_when_distributed},
3737
parseable::PARSEABLE,
38-
query::{resolve_stream_names, QUERY_SESSION},
38+
query::{QUERY_SESSION, resolve_stream_names},
3939
utils::time::TimeRange,
4040
};
4141

4242
use super::{
43-
AggregateConfig, AggregateFunction, AggregateResult, Aggregates, AlertConfig, AlertError,
44-
AlertOperator, AlertState, ConditionConfig, Conditions, WhereConfigOperator, ALERTS,
43+
ALERTS, AggregateConfig, AggregateFunction, AggregateResult, Aggregates, AlertConfig,
44+
AlertError, AlertOperator, AlertState, ConditionConfig, Conditions, WhereConfigOperator,
4545
};
4646

4747
/// accept the alert
@@ -473,9 +473,7 @@ fn match_alert_operator(expr: &ConditionConfig) -> Expr {
473473
WhereConfigOperator::LessThanOrEqual => col(column).lt_eq(lit(value)),
474474
WhereConfigOperator::GreaterThanOrEqual => col(column).gt_eq(lit(value)),
475475
WhereConfigOperator::ILike => col(column).ilike(lit(string_value)),
476-
WhereConfigOperator::Contains => {
477-
col(column).like(lit(format!("%{string_value}%")))
478-
},
476+
WhereConfigOperator::Contains => col(column).like(lit(format!("%{string_value}%"))),
479477
WhereConfigOperator::BeginsWith => Expr::BinaryExpr(BinaryExpr::new(
480478
Box::new(col(column)),
481479
Operator::RegexIMatch,
@@ -497,15 +495,19 @@ fn match_alert_operator(expr: &ConditionConfig) -> Expr {
497495
Operator::RegexNotIMatch,
498496
Box::new(lit(format!("{string_value}$"))),
499497
)),
500-
_ => unreachable!("value must not be null for operators other than `is null` and `is not null`. Should've been caught in validation")
498+
_ => unreachable!(
499+
"value must not be null for operators other than `is null` and `is not null`. Should've been caught in validation"
500+
),
501501
}
502502
} else {
503503
// for maintaining column case
504504
let column = format!(r#""{}""#, expr.column);
505505
match expr.operator {
506506
WhereConfigOperator::IsNull => col(column).is_null(),
507507
WhereConfigOperator::IsNotNull => col(column).is_not_null(),
508-
_ => unreachable!("value must be null for `is null` and `is not null`. Should've been caught in validation")
508+
_ => unreachable!(
509+
"value must be null for `is null` and `is not null`. Should've been caught in validation"
510+
),
509511
}
510512
}
511513
}

src/alerts/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use actix_web::http::header::ContentType;
2020
use async_trait::async_trait;
2121
use chrono::Utc;
2222
use datafusion::sql::sqlparser::parser::ParserError;
23-
use derive_more::derive::FromStr;
2423
use derive_more::FromStrError;
24+
use derive_more::derive::FromStr;
2525
use http::StatusCode;
2626
use once_cell::sync::Lazy;
2727
use serde::Serialize;
@@ -31,7 +31,7 @@ use std::fmt::{self, Display};
3131
use std::thread;
3232
use std::time::Duration;
3333
use tokio::sync::oneshot::{Receiver, Sender};
34-
use tokio::sync::{mpsc, RwLock};
34+
use tokio::sync::{RwLock, mpsc};
3535
use tokio::task::JoinHandle;
3636
use tracing::{error, trace, warn};
3737
use ulid::Ulid;
@@ -40,7 +40,7 @@ pub mod alerts_utils;
4040
pub mod target;
4141

4242
use crate::alerts::target::TARGETS;
43-
use crate::parseable::{StreamNotFound, PARSEABLE};
43+
use crate::parseable::{PARSEABLE, StreamNotFound};
4444
use crate::rbac::map::SessionKey;
4545
use crate::storage;
4646
use crate::storage::ObjectStorageError;

src/alerts/target.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ use async_trait::async_trait;
2626
use base64::Engine;
2727
use bytes::Bytes;
2828
use chrono::Utc;
29-
use http::{header::AUTHORIZATION, HeaderMap, HeaderValue};
29+
use http::{HeaderMap, HeaderValue, header::AUTHORIZATION};
3030
use itertools::Itertools;
3131
use once_cell::sync::Lazy;
3232
use reqwest::ClientBuilder;
33-
use serde_json::{json, Value};
33+
use serde_json::{Value, json};
3434
use tokio::sync::RwLock;
3535
use tracing::{error, trace, warn};
3636
use ulid::Ulid;
@@ -288,7 +288,9 @@ impl Target {
288288
state
289289
} else {
290290
*state.lock().unwrap() = TimeoutState::default();
291-
warn!("Unable to fetch state for given alert_id- {alert_id}, stopping target notifs");
291+
warn!(
292+
"Unable to fetch state for given alert_id- {alert_id}, stopping target notifs"
293+
);
292294
return;
293295
};
294296

@@ -304,7 +306,9 @@ impl Target {
304306
state
305307
} else {
306308
*state.lock().unwrap() = TimeoutState::default();
307-
warn!("Unable to fetch state for given alert_id- {alert_id}, stopping target notifs");
309+
warn!(
310+
"Unable to fetch state for given alert_id- {alert_id}, stopping target notifs"
311+
);
308312
return;
309313
};
310314

src/analytics.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
*
1818
*/
19-
use actix_web::{web, HttpRequest, Responder};
19+
use actix_web::{HttpRequest, Responder, web};
2020
use chrono::{DateTime, Utc};
2121
use clokwerk::{AsyncScheduler, Interval};
2222
use http::header;
@@ -31,19 +31,20 @@ use tracing::{error, info};
3131
use ulid::Ulid;
3232

3333
use crate::{
34+
HTTP_CLIENT, INTRA_CLUSTER_CLIENT,
3435
about::{current, platform},
3536
handlers::{
37+
STREAM_NAME_HEADER_KEY,
3638
http::{
3739
base_path_without_preceding_slash,
3840
cluster::{self, utils::check_liveness},
3941
modal::{NodeMetadata, NodeType},
4042
},
41-
STREAM_NAME_HEADER_KEY,
4243
},
4344
option::Mode,
4445
parseable::PARSEABLE,
4546
stats::{self, Stats},
46-
storage, HTTP_CLIENT, INTRA_CLUSTER_CLIENT,
47+
storage,
4748
};
4849

4950
const ANALYTICS_SERVER_URL: &str = "https://analytics.parseable.io:80";
@@ -239,8 +240,8 @@ fn total_event_stats() -> (Stats, Stats, Stats) {
239240
)
240241
}
241242

242-
async fn fetch_ingestors_metrics(
243-
) -> anyhow::Result<(u64, u64, usize, u64, u64, u64, u64, u64, u64, u64, u64, u64)> {
243+
async fn fetch_ingestors_metrics()
244+
-> anyhow::Result<(u64, u64, usize, u64, u64, u64, u64, u64, u64, u64, u64, u64)> {
244245
let event_stats = total_event_stats();
245246
let mut node_metrics = NodeMetrics::new(
246247
total_streams(),

src/audit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ use std::{
2121
fmt::{Debug, Display},
2222
};
2323

24-
use crate::{about::current, parseable::PARSEABLE, storage::StorageMetadata, HTTP_CLIENT};
24+
use crate::{HTTP_CLIENT, about::current, parseable::PARSEABLE, storage::StorageMetadata};
2525

2626
use chrono::{DateTime, Utc};
2727
use once_cell::sync::Lazy;
2828
use serde::Serialize;
29-
use serde_json::{json, Value};
29+
use serde_json::{Value, json};
3030
use tracing::error;
3131

3232
use ulid::Ulid;

src/catalog/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use crate::{
4141
query::PartialTimeFilter,
4242
stats::{event_labels_date, get_current_stats, storage_size_labels_date, update_deleted_stats},
4343
storage::{
44-
object_storage::manifest_path, ObjectStorage, ObjectStorageError, ObjectStoreFormat,
44+
ObjectStorage, ObjectStorageError, ObjectStoreFormat, object_storage::manifest_path,
4545
},
4646
};
4747
pub use manifest::create_from_parquet_file;

0 commit comments

Comments
 (0)