Skip to content

Commit 4b6209b

Browse files
author
Devdutt Shenoi
committed
Merge remote-tracking branch 'origin/main' into schema-detect
2 parents 637f33c + 1afa318 commit 4b6209b

File tree

20 files changed

+397
-50
lines changed

20 files changed

+397
-50
lines changed

.github/workflows/build-push-edge-debug.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,3 @@ jobs:
4545
push: true
4646
tags: parseable/parseable:edge-debug
4747
platforms: linux/amd64,linux/arm64
48-
cache-from: type=gha
49-
cache-to: type=gha,mode=max

.github/workflows/build-push-edge.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,3 @@ jobs:
4545
push: true
4646
tags: parseable/parseable:edge
4747
platforms: linux/amd64,linux/arm64
48-
cache-from: type=gha
49-
cache-to: type=gha,mode=max

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "parseable"
3-
version = "1.7.3"
3+
version = "1.7.5"
44
authors = ["Parseable Team <[email protected]>"]
55
edition = "2021"
66
rust-version = "1.83.0"
@@ -128,9 +128,8 @@ sha1_smol = { version = "1.0", features = ["std"] }
128128
static-files = "0.2"
129129
ureq = "2.12"
130130
url = "2.5"
131-
vergen = { version = "9.0", features = ["build", "cargo", "rustc", "si"] }
132131
vergen-gitcl = { version = "1.0", features = ["build", "cargo", "rustc", "si"] }
133-
zip = { version = "2.2", default-features = false, features = ["deflate"] }
132+
zip = { version = "2.3", default-features = false, features = ["deflate"] }
134133
anyhow = "1.0"
135134

136135
[dev-dependencies]
@@ -139,8 +138,8 @@ arrow = "54.0.0"
139138
temp-dir = "0.1.14"
140139

141140
[package.metadata.parseable_ui]
142-
assets-url = "https://github.com/parseablehq/console/releases/download/v0.9.18/build.zip"
143-
assets-sha1 = "4516db38c8e556707b29b33569f9b1e53d5165f2"
141+
assets-url = "https://github.com/parseablehq/console/releases/download/v0.9.20/build.zip"
142+
assets-sha1 = "58eb74bdb6727b5df04d6f9f339cf370c0bf4eec"
144143

145144
[features]
146145
debug = []

Dockerfile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,23 @@
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
18-
17+
FROM rust:1.84.0-bookworm AS builder
1918

2019
LABEL org.opencontainers.image.title="Parseable"
2120
LABEL maintainer="Parseable Team <[email protected]>"
2221
LABEL org.opencontainers.image.vendor="Parseable Inc"
2322
LABEL org.opencontainers.image.licenses="AGPL-3.0"
2423

2524
WORKDIR /parseable
26-
27-
# Cache dependencies
28-
COPY Cargo.toml Cargo.lock build.rs ./
29-
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src
30-
31-
# Build the actual binary
32-
COPY src ./src
33-
COPY resources ./resources
25+
COPY . .
3426
RUN cargo build --release
3527

3628
# final stage
3729
FROM gcr.io/distroless/cc-debian12:latest
3830

3931
WORKDIR /parseable
4032

41-
# Copy the static binary into the final image
33+
# Copy the static shell into base image.
4234
COPY --from=builder /parseable/target/release/parseable /usr/bin/parseable
4335

4436
CMD ["/usr/bin/parseable"]

src/alerts/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,7 @@ pub struct AlertsInfo {
886886
low: u64,
887887
medium: u64,
888888
high: u64,
889+
critical: u64,
889890
}
890891

891892
// TODO: add RBAC
@@ -898,6 +899,7 @@ pub async fn get_alerts_info() -> Result<AlertsInfo, AlertError> {
898899
let mut low = 0;
899900
let mut medium = 0;
900901
let mut high = 0;
902+
let mut critical = 0;
901903

902904
for (_, alert) in alerts.iter() {
903905
total += 1;
@@ -911,7 +913,7 @@ pub async fn get_alerts_info() -> Result<AlertsInfo, AlertError> {
911913
Severity::Low => low += 1,
912914
Severity::Medium => medium += 1,
913915
Severity::High => high += 1,
914-
_ => {}
916+
Severity::Critical => critical += 1,
915917
}
916918
}
917919

@@ -923,5 +925,6 @@ pub async fn get_alerts_info() -> Result<AlertsInfo, AlertError> {
923925
low,
924926
medium,
925927
high,
928+
critical,
926929
})
927930
}

src/cli.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,14 @@ pub struct Options {
270270
)]
271271
pub row_group_size: usize,
272272

273+
#[arg(
274+
long,
275+
env = "P_EXECUTION_BATCH_SIZE",
276+
default_value = "20000",
277+
help = "batch size for query execution"
278+
)]
279+
pub execution_batch_size: usize,
280+
273281
#[arg(
274282
long = "compression-algo",
275283
env = "P_PARQUET_COMPRESSION_ALGO",

src/event/format/mod.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,19 @@ use super::{Event, DEFAULT_TIMESTAMP_KEY};
4141
pub mod json;
4242
pub mod known_schema;
4343

44-
static TIME_FIELD_NAME_PARTS: [&str; 2] = ["time", "date"];
44+
static TIME_FIELD_NAME_PARTS: [&str; 11] = [
45+
"time",
46+
"date",
47+
"timestamp",
48+
"created",
49+
"received",
50+
"ingested",
51+
"collected",
52+
"start",
53+
"end",
54+
"ts",
55+
"dt",
56+
];
4557
type EventSchema = Vec<Arc<Field>>;
4658

4759
/// Source of the logs, used to perform special processing for certain sources

src/handlers/http/modal/query_server.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ impl ParseableServer for QueryServer {
7676
.service(
7777
web::scope(&prism_base_path())
7878
.service(Server::get_prism_home())
79-
.service(Server::get_prism_logstream()),
79+
.service(Server::get_prism_logstream())
80+
.service(Server::get_prism_datasets()),
8081
)
8182
.service(Server::get_generated());
8283
}

src/handlers/http/modal/server.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ impl ParseableServer for Server {
9595
.service(
9696
web::scope(&prism_base_path())
9797
.service(Server::get_prism_home())
98-
.service(Server::get_prism_logstream()),
98+
.service(Server::get_prism_logstream())
99+
.service(Server::get_prism_datasets()),
99100
)
100101
.service(Self::get_ingest_otel_factory())
101102
.service(Self::get_generated());
@@ -180,6 +181,17 @@ impl Server {
180181
)
181182
}
182183

184+
pub fn get_prism_datasets() -> Scope {
185+
web::scope("/datasets").route(
186+
"",
187+
web::post()
188+
.to(http::prism_logstream::post_datasets)
189+
.authorize_for_stream(Action::GetStreamInfo)
190+
.authorize_for_stream(Action::GetStats)
191+
.authorize_for_stream(Action::GetRetention),
192+
)
193+
}
194+
183195
pub fn get_metrics_webscope() -> Scope {
184196
web::scope("/metrics").service(
185197
web::resource("").route(web::get().to(metrics::get).authorize(Action::Metrics)),

0 commit comments

Comments
 (0)