Skip to content

Commit 0190d85

Browse files
authored
chore: update depedencies (#782)
* chore: update depedencies arrow-schema = "47.0.0" -> "51.0.0" arrow-array = "47.0.0" -> "51.0.0" arrow-json = "47.0.0" -> "51.0.0" arrow-ipc = "47.0.0" -> "51.0.0" arrow-select = "47.0.0" -> "51.0.0" parquet = "47.0.0" -> "51.0.0" arrow-flight = "47.0.0" -> "51.0.0" datafusion = "32.0.0" -> "37.1.0" object_store = "0.7.0" -> "0.9.1" tonic = "0.10.0" -> "0.11.0" tonic-web = "0.10.0" -> "0.11.0" * chore: update depedencies related to arrow arrow-schema = "47.0.0" -> "51.0.0" arrow-array = "47.0.0" -> "51.0.0" arrow-json = "47.0.0" -> "51.0.0" arrow-ipc = "47.0.0" -> "51.0.0" arrow-select = "47.0.0" -> "51.0.0" parquet = "47.0.0" -> "51.0.0" arrow-flight = "47.0.0" -> "51.0.0" datafusion = "32.0.0" -> "37.1.0" object_store = "0.7.0" -> "0.9.1" tonic = "0.10.0" -> "0.11.0" tonic-web = "0.10.0" -> "0.11.0" thread-priority = "0.13.1" -> "1.0.0" zip = "0.6" -> "1.1.1" sysinfo = "0.29.6" -> "0.30.11" * update dependencies second pass actix-web = "4.3"-> "4.5.1" actix-cors = "0.6" -> "0.7.0" base64 = "0.21" -> "0.22.0" cookie = "0.17.0" -> "0.18.1" crossterm = "0.26" -> "0.27.0" env_logger = "0.10" -> "0.11.3" hostname = "0.3" -> "0.4.0" http = "0.2" -> "0.2.7" itertools = "0.10" -> "0.12.1" reqwest = "0.11.18" -> "0.11.27" rustls = "0.20" -> "0.22.4" rustls-pemfile = "1.0" -> "2.1.2" uptime_lib = "0.2.2" -> "0.3.0" openid = "0.12.0" -> "0.14.0" cargo_toml = "0.15" -> "0.20.1" rstest = "0.16" -> "0.19.0" * changes in behaviour on Null rows arrow now infers null rows by mark existence of a field if it wasn't known before. This was not done in previous version. So schema for `{"a": 1,"b": "hello","c": null}` is inferred to have all 3 columns ["a": Number, "b": string, "c": null] previously it would have inferred it to be `["a": Number, "b": String] Modified the tests basic_object_with_null_into_rb and arr_with_null_derive_schema_into_rb (temporary, going forward we should delete them)
1 parent 06e1218 commit 0190d85

20 files changed

+1695
-1410
lines changed

Cargo.lock

Lines changed: 1436 additions & 1164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/Cargo.toml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ build = "build.rs"
99

1010
[dependencies]
1111
### apache arrow/datafusion dependencies
12-
arrow-schema = { version = "^47.0.0", features = ["serde"] }
13-
arrow-array = { version = "^47.0.0" }
14-
arrow-json = "^47.0.0"
15-
arrow-ipc = "^47.0.0"
16-
arrow-select = "^47.0.0"
17-
datafusion = "32.0.0"
18-
object_store = { version = "^0.7.0", features = ["cloud", "aws"] }
19-
parquet = "^47.0.0"
12+
arrow-schema = { version = "51.0.0", features = ["serde"] }
13+
arrow-array = { version = "51.0.0" }
14+
arrow-json = "51.0.0"
15+
arrow-ipc = "51.0.0"
16+
arrow-select = "51.0.0"
17+
datafusion = "37.1.0"
18+
object_store = { version = "0.9.1", features = ["cloud", "aws"] }
19+
parquet = "51.0.0"
2020

2121
### LiveTail server deps
22-
arrow-flight = "47.0.0"
23-
tonic = {version = "0.10.0", features = ["tls"] }
24-
tonic-web = "0.10.0"
22+
arrow-flight = "51.0.0"
23+
tonic = {version = "0.11.0", features = ["tls"] }
24+
tonic-web = "0.11.0"
2525
tower-http = { version = "0.4.4", features = ["cors"] }
2626

2727
### actix dependencies
2828
actix-web-httpauth = "0.8"
29-
actix-web = { version = "4.3", features = ["rustls"] }
30-
actix-cors = "0.6"
29+
actix-web = { version = "4.5.1", features = ["rustls-0_22"] }
30+
actix-cors = "0.7.0"
3131
actix-web-prometheus = { version = "0.1" }
3232
actix-web-static-files = "4.0"
3333
mime = "0.3.17"
@@ -36,11 +36,11 @@ mime = "0.3.17"
3636
anyhow = { version = "1.0", features = ["backtrace"] }
3737
argon2 = "0.5.0"
3838
async-trait = "0.1"
39-
base64 = "0.21"
39+
base64 = "0.22.0"
4040
bytes = "1.4"
4141
byteorder = "1.4.3"
4242
bzip2 = { version = "*", features = ["static"] }
43-
cookie = "0.17.0"
43+
cookie = "0.18.1"
4444
chrono = "0.4"
4545
chrono-humanize = "0.2"
4646
clap = { version = "4.1", default-features = false, features = [
@@ -53,51 +53,51 @@ clap = { version = "4.1", default-features = false, features = [
5353
"error-context",
5454
] }
5555
clokwerk = "0.4"
56-
crossterm = "0.26"
56+
crossterm = "0.27.0"
5757
derive_more = "0.99"
58-
env_logger = "0.10"
58+
env_logger = "0.11.3"
5959
fs_extra = "1.3"
6060
futures = "0.3"
6161
futures-util = "0.3.28"
6262
hex = "0.4"
63-
hostname = "0.3"
64-
http = "0.2"
63+
hostname = "0.4.0"
64+
http = "0.2.7"
6565
humantime-serde = "1.1"
66-
itertools = "0.10"
66+
itertools = "0.12.1"
6767
log = "0.4"
6868
num_cpus = "1.15"
6969
once_cell = "1.17.1"
7070
prometheus = { version = "0.13", features = ["process"] }
7171
rand = "0.8"
7272
regex = "1.7.3"
7373
relative-path = { version = "1.7", features = ["serde"] }
74-
reqwest = { version = "0.11.18", default_features = false, features = [
74+
reqwest = { version = "0.11.27", default_features = false, features = [
7575
"rustls-tls",
7676
"json",
7777
] }
78-
rustls = "0.20"
79-
rustls-pemfile = "1.0"
78+
rustls = "0.22.4"
79+
rustls-pemfile = "2.1.2"
8080
semver = "1.0"
8181
serde = { version = "1.0", features = ["rc"] }
8282
serde_json = "1.0"
8383
static-files = "0.2"
84-
sysinfo = "0.29.6"
84+
sysinfo = "0.30.11"
8585
thiserror = "1"
86-
thread-priority = "0.13.1"
86+
thread-priority = "1.0.0"
8787
tokio = { version = "1.28", default-features = false, features = [
8888
"sync",
8989
"macros",
9090
"fs",
9191
] }
9292
tokio-stream = { version = "0.1", features = ["fs"] }
9393
ulid = { version = "1.0", features = ["serde"] }
94-
uptime_lib = "0.2.2"
94+
uptime_lib = "0.3.0"
9595
xxhash-rust = { version = "0.8", features = ["xxh3"] }
9696
xz2 = { version = "*", features = ["static"] }
9797
nom = "7.1.3"
9898
humantime = "2.1.0"
9999
human-size = "0.4"
100-
openid = { version = "0.12.0", default-features = false, features = ["rustls"] }
100+
openid = { version = "0.14.0", default-features = false, features = ["rustls"] }
101101
url = "2.4.0"
102102
http-auth-basic = "0.3.3"
103103
serde_repr = "0.1.17"
@@ -108,18 +108,18 @@ prometheus-parse = "0.2.5"
108108
sha2 = "0.10.8"
109109

110110
[build-dependencies]
111-
cargo_toml = "0.15"
111+
cargo_toml = "0.20.1"
112112
sha1_smol = { version = "1.0", features = ["std"] }
113113
static-files = "0.2"
114114
ureq = "2.6"
115115
vergen = { version = "8.1", features = ["build", "git", "cargo", "gitcl"] }
116-
zip = { version = "0.6", default_features = false, features = ["deflate"] }
116+
zip = { version = "1.1.1", default_features = false, features = ["deflate"] }
117117
url = "2.4.0"
118118
prost-build = "0.12.3"
119119

120120
[dev-dependencies]
121121
maplit = "1.0"
122-
rstest = "0.16"
122+
rstest = "0.19.0"
123123

124124
[package.metadata.parseable_ui]
125125
assets-url = "https://github.com/parseablehq/console/releases/download/v0.7.0/build.zip"

server/src/about.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use chrono_humanize::{Accuracy, Tense};
2222
use crossterm::style::Stylize;
2323
use std::env;
2424
use std::path::Path;
25-
use sysinfo::SystemExt;
25+
use sysinfo::System;
2626
use ulid::Ulid;
2727

2828
use crate::analytics;
@@ -59,11 +59,7 @@ pub fn user_agent(uid: &Ulid) -> String {
5959
uid,
6060
current().released_version,
6161
current().commit_hash,
62-
analytics::SYS_INFO
63-
.lock()
64-
.unwrap()
65-
.name()
66-
.unwrap_or_default(),
62+
System::name().unwrap_or_default(),
6763
platform()
6864
)
6965
}

server/src/analytics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use serde_json::Value;
3434
use std::collections::HashMap;
3535
use std::sync::Mutex;
3636
use std::time::Duration;
37-
use sysinfo::{CpuExt, System, SystemExt};
37+
use sysinfo::System;
3838
use ulid::Ulid;
3939

4040
const ANALYTICS_SERVER_URL: &str = "https://analytics.parseable.io:80";
@@ -86,8 +86,8 @@ impl Report {
8686
let mut cpu_count = 0;
8787
let mut mem_total = 0;
8888
if let Ok(info) = SYS_INFO.lock() {
89-
os_version = info.os_version().unwrap_or_default();
90-
os_name = info.name().unwrap_or_default();
89+
os_version = System::os_version().unwrap_or_default();
90+
os_name = System::name().unwrap_or_default();
9191
cpu_count = info.cpus().len();
9292
mem_total = info.total_memory();
9393
}

server/src/catalog.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::{
2828
};
2929
use crate::{handlers, Mode};
3030
use bytes::Bytes;
31-
use chrono::{DateTime, Local, NaiveDateTime, NaiveTime, Utc};
31+
use chrono::{DateTime, Local, NaiveTime, Utc};
3232
use relative_path::RelativePathBuf;
3333
use std::io::Error as IOError;
3434
pub mod column;
@@ -82,12 +82,8 @@ fn get_file_bounds(file: &manifest::File) -> (DateTime<Utc>, DateTime<Utc>) {
8282
.unwrap()
8383
{
8484
column::TypedStatistics::Int(stats) => (
85-
NaiveDateTime::from_timestamp_millis(stats.min)
86-
.unwrap()
87-
.and_utc(),
88-
NaiveDateTime::from_timestamp_millis(stats.max)
89-
.unwrap()
90-
.and_utc(),
85+
DateTime::from_timestamp_millis(stats.min).unwrap(),
86+
DateTime::from_timestamp_millis(stats.max).unwrap(),
9187
),
9288
_ => unreachable!(),
9389
}

server/src/handlers/http/cluster/utils.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -112,28 +112,9 @@ impl StorageStats {
112112
}
113113

114114
pub fn merge_quried_stats(stats: Vec<QueriedStats>) -> QueriedStats {
115-
// get the actual creation time
116-
// let min_creation_time = stats
117-
// .iter()
118-
// .map(|x| x.creation_time.parse::<DateTime<Utc>>().unwrap())
119-
// .min()
120-
// .unwrap(); // should never be None
121-
122115
// get the stream name
123116
let stream_name = stats[1].stream.clone();
124117

125-
// get the first event at
126-
// let min_first_event_at = stats
127-
// .iter()
128-
// .map(|x| match x.first_event_at.as_ref() {
129-
// we can directly unwrap here because
130-
// we are sure that the first_event_at is a valid date
131-
// Some(fea) => fea.parse::<DateTime<Utc>>().unwrap(),
132-
// None => Utc::now(), // current time ie the max time
133-
// })
134-
// .min()
135-
// .unwrap(); // should never be None
136-
137118
let min_time = stats.iter().map(|x| x.time).min().unwrap_or_else(Utc::now);
138119

139120
let cumulative_ingestion =

server/src/handlers/http/ingest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ mod tests {
354354
.unwrap();
355355

356356
assert_eq!(rb.num_rows(), 1);
357-
assert_eq!(rb.num_columns(), 5);
357+
assert_eq!(rb.num_columns(), 6);
358358
assert_eq!(
359359
rb.column_by_name("a").unwrap().as_int64_arr(),
360360
&Int64Array::from_iter([1])
@@ -663,7 +663,7 @@ mod tests {
663663
.unwrap();
664664

665665
assert_eq!(rb.num_rows(), 3);
666-
assert_eq!(rb.num_columns(), 5);
666+
assert_eq!(rb.num_columns(), 6);
667667
assert_eq!(
668668
rb.column_by_name("a").unwrap().as_int64_arr(),
669669
&Int64Array::from(vec![Some(1), Some(1), Some(1)])

server/src/handlers/http/modal/ingest_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl ParseableServer for IngestServer {
9393

9494
if let Some(config) = ssl {
9595
http_server
96-
.bind_rustls(&CONFIG.parseable.address, config)?
96+
.bind_rustls_0_22(&CONFIG.parseable.address, config)?
9797
.run()
9898
.await?;
9999
} else {

server/src/handlers/http/modal/query_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl ParseableServer for QueryServer {
7373
let http_server = HttpServer::new(create_app_fn).workers(num_cpus::get());
7474
if let Some(config) = ssl {
7575
http_server
76-
.bind_rustls(&CONFIG.parseable.address, config)?
76+
.bind_rustls_0_22(&CONFIG.parseable.address, config)?
7777
.run()
7878
.await?;
7979
} else {

server/src/handlers/http/modal/server.rs

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use crate::migration;
3232
use crate::rbac;
3333
use crate::storage;
3434
use crate::sync;
35-
use std::{fs::File, io::BufReader, sync::Arc};
35+
use std::sync::Arc;
3636

3737
use actix_web::web::resource;
3838
use actix_web::Resource;
@@ -42,9 +42,6 @@ use actix_web_prometheus::PrometheusMetrics;
4242
use actix_web_static_files::ResourceFiles;
4343
use async_trait::async_trait;
4444

45-
use rustls::{Certificate, PrivateKey, ServerConfig};
46-
use rustls_pemfile::{certs, pkcs8_private_keys};
47-
4845
use crate::{
4946
handlers::http::{
5047
self, cross_origin_config, ingest, llm, logstream,
@@ -57,6 +54,7 @@ use crate::{
5754

5855
// use super::generate;
5956
use super::generate;
57+
use super::ssl_acceptor::get_ssl_acceptor;
6058
use super::OpenIdClient;
6159
use super::ParseableServer;
6260

@@ -89,45 +87,16 @@ impl ParseableServer for Server {
8987
.wrap(cross_origin_config())
9088
};
9189

92-
let ssl_acceptor = match (
90+
let ssl = get_ssl_acceptor(
9391
&CONFIG.parseable.tls_cert_path,
9492
&CONFIG.parseable.tls_key_path,
95-
) {
96-
(Some(cert), Some(key)) => {
97-
// init server config builder with safe defaults
98-
let config = ServerConfig::builder()
99-
.with_safe_defaults()
100-
.with_no_client_auth();
101-
102-
// load TLS key/cert files
103-
let cert_file = &mut BufReader::new(File::open(cert)?);
104-
let key_file = &mut BufReader::new(File::open(key)?);
105-
106-
// convert files to key/cert objects
107-
let cert_chain = certs(cert_file)?.into_iter().map(Certificate).collect();
108-
109-
let mut keys: Vec<PrivateKey> = pkcs8_private_keys(key_file)?
110-
.into_iter()
111-
.map(PrivateKey)
112-
.collect();
113-
114-
// exit if no keys could be parsed
115-
if keys.is_empty() {
116-
anyhow::bail!("Could not locate PKCS 8 private keys.");
117-
}
118-
119-
let server_config = config.with_single_cert(cert_chain, keys.remove(0))?;
120-
121-
Some(server_config)
122-
}
123-
(_, _) => None,
124-
};
93+
)?;
12594

12695
// concurrent workers equal to number of cores on the cpu
12796
let http_server = HttpServer::new(create_app_fn).workers(num_cpus::get());
128-
if let Some(config) = ssl_acceptor {
97+
if let Some(config) = ssl {
12998
http_server
130-
.bind_rustls(&CONFIG.parseable.address, config)?
99+
.bind_rustls_0_22(&CONFIG.parseable.address, config)?
131100
.run()
132101
.await?;
133102
} else {

server/src/handlers/http/modal/ssl_acceptor.rs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,23 @@
1818

1919
use std::{fs::File, io::BufReader, path::PathBuf};
2020

21-
use itertools::Itertools;
22-
use rustls::{Certificate, PrivateKey, ServerConfig};
23-
use rustls_pemfile::{certs, pkcs8_private_keys};
21+
use rustls::ServerConfig;
2422

2523
pub fn get_ssl_acceptor(
2624
tls_cert: &Option<PathBuf>,
2725
tls_key: &Option<PathBuf>,
2826
) -> anyhow::Result<Option<ServerConfig>> {
2927
match (tls_cert, tls_key) {
3028
(Some(cert), Some(key)) => {
31-
let server_config = ServerConfig::builder()
32-
.with_safe_defaults()
33-
.with_no_client_auth();
29+
let server_config = ServerConfig::builder().with_no_client_auth();
3430

3531
let cert_file = &mut BufReader::new(File::open(cert)?);
3632
let key_file = &mut BufReader::new(File::open(key)?);
37-
let cert_chain = certs(cert_file)?.into_iter().map(Certificate).collect_vec();
33+
let certs = rustls_pemfile::certs(cert_file).collect::<Result<Vec<_>, _>>()?;
34+
let private_key = rustls_pemfile::private_key(key_file)?
35+
.ok_or(anyhow::anyhow!("Could not parse private key."))?;
3836

39-
let mut keys = pkcs8_private_keys(key_file)?
40-
.into_iter()
41-
.map(PrivateKey)
42-
.collect_vec();
43-
44-
if keys.is_empty() {
45-
anyhow::bail!("Could not locate PKCS 8 private keys.");
46-
}
47-
48-
Ok(Some(
49-
server_config.with_single_cert(cert_chain, keys.remove(0))?,
50-
))
37+
Ok(Some(server_config.with_single_cert(certs, private_key)?))
5138
}
5239
(_, _) => Ok(None),
5340
}

0 commit comments

Comments
 (0)