Skip to content

Commit 00d790a

Browse files
author
Devdutt Shenoi
authored
Merge branch 'main' into to_json
2 parents 3e9c978 + 20e66a4 commit 00d790a

Some content is hidden

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

76 files changed

+2569
-2662
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ jobs:
5555
file: ./Dockerfile.kafka
5656
push: true
5757
tags: parseable/parseable:edge-kafka
58-
platforms: =linux/arm64
58+
platforms: linux/arm64
5959
build-args: |
6060
LIB_DIR=aarch64-linux-gnu

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ key.pem
1010
helm-releases/.DS_Store
1111
.DS_Store
1212
env-file
13-
parseable
13+
parseable/*
1414
parseable_*
1515
parseable-env-secret
1616
cache

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ clokwerk = "0.4"
107107
derive_more = { version = "1", features = ["full"] }
108108
itertools = "0.14"
109109
lazy_static = "1.4"
110-
nom = "7.1.3"
111110
once_cell = "1.20"
112111
rand = "0.8.5"
113112
regex = "1.7.3"
@@ -145,7 +144,7 @@ assets-sha1 = "4516db38c8e556707b29b33569f9b1e53d5165f2"
145144

146145
[features]
147146
debug = []
148-
kafka = ["rdkafka", "sasl2-sys", "sasl2-sys/vendored", "rdkafka/ssl-vendored", "rdkafka/ssl", "rdkafka/sasl"]
147+
kafka = ["rdkafka", "rdkafka/ssl-vendored", "rdkafka/ssl", "rdkafka/sasl", "sasl2-sys", "sasl2-sys/vendored"]
149148

150149
[profile.release-lto]
151150
inherits = "release"

Dockerfile.debug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN cargo build
3434
# final stage
3535
FROM docker.io/debian:bookworm-slim
3636

37+
RUN apt update && apt install -y curl
38+
3739
WORKDIR /parseable
3840

3941
# Copy the static binary into the final image

docker-compose-distributed-test-with-kafka.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ services:
1111
volumes:
1212
- ./parseable-ingest-haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
1313
depends_on:
14-
- parseable-ingest-one
15-
- parseable-ingest-two
14+
parseable-ingest-one:
15+
condition: service_healthy
16+
parseable-ingest-two:
17+
condition: service_healthy
1618
networks:
1719
- parseable-internal
1820
healthcheck:
@@ -28,7 +30,7 @@ services:
2830

2931
# minio
3032
minio:
31-
image: minio/minio:RELEASE.2023-02-10T18-48-39Z
33+
image: minio/minio:RELEASE.2025-02-03T21-03-04Z
3234
entrypoint:
3335
- sh
3436
- -euc
@@ -55,7 +57,7 @@ services:
5557
parseable-query:
5658
build:
5759
context: .
58-
dockerfile: Dockerfile
60+
dockerfile: Dockerfile.debug
5961
platform: linux/amd64
6062
command: [ "parseable", "s3-store" ]
6163
ports:
@@ -72,6 +74,7 @@ services:
7274
- P_CHECK_UPDATE=false
7375
- P_PARQUET_COMPRESSION_ALGO=snappy
7476
- P_MODE=query
77+
- RUST_LOG=warn
7578
networks:
7679
- parseable-internal
7780
healthcheck:
@@ -189,6 +192,7 @@ services:
189192
quest:
190193
platform: linux/amd64
191194
image: ghcr.io/parseablehq/quest:main
195+
pull_policy: always
192196
command:
193197
[
194198
"load",
@@ -209,9 +213,12 @@ services:
209213
networks:
210214
- parseable-internal
211215
depends_on:
212-
- parseable-query
213-
- parseable-ingest-haproxy
214-
- minio
216+
parseable-query:
217+
condition: service_healthy
218+
parseable-ingest-haproxy:
219+
condition: service_healthy
220+
minio:
221+
condition: service_healthy
215222
deploy:
216223
restart_policy:
217224
condition: on-failure

docker-compose-distributed-test.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ networks:
44
services:
55
# minio
66
minio:
7-
image: minio/minio:RELEASE.2023-02-10T18-48-39Z
7+
image: minio/minio:RELEASE.2025-02-03T21-03-04Z
88
entrypoint:
99
- sh
1010
- -euc
@@ -28,7 +28,7 @@ services:
2828
parseable-query:
2929
build:
3030
context: .
31-
dockerfile: Dockerfile
31+
dockerfile: Dockerfile.debug
3232
platform: linux/amd64
3333
command: [ "parseable", "s3-store" ]
3434
ports:
@@ -45,6 +45,7 @@ services:
4545
- P_CHECK_UPDATE=false
4646
- P_PARQUET_COMPRESSION_ALGO=snappy
4747
- P_MODE=query
48+
- RUST_LOG=warn
4849
networks:
4950
- parseable-internal
5051
healthcheck:
@@ -53,7 +54,8 @@ services:
5354
timeout: 20s
5455
retries: 5
5556
depends_on:
56-
- minio
57+
minio:
58+
condition: service_healthy
5759
deploy:
5860
restart_policy:
5961
condition: on-failure
@@ -63,7 +65,7 @@ services:
6365
parseable-ingest-one:
6466
build:
6567
context: .
66-
dockerfile: Dockerfile
68+
dockerfile: Dockerfile.debug
6769
platform: linux/amd64
6870
command: [ "parseable", "s3-store", ]
6971
ports:
@@ -81,6 +83,7 @@ services:
8183
- P_PARQUET_COMPRESSION_ALGO=snappy
8284
- P_MODE=ingest
8385
- P_INGESTOR_ENDPOINT=parseable-ingest-one:8000
86+
- RUST_LOG=warn
8487
networks:
8588
- parseable-internal
8689
healthcheck:
@@ -89,8 +92,10 @@ services:
8992
timeout: 20s
9093
retries: 5
9194
depends_on:
92-
- parseable-query
93-
- minio
95+
parseable-query:
96+
condition: service_healthy
97+
minio:
98+
condition: service_healthy
9499
deploy:
95100
restart_policy:
96101
condition: on-failure
@@ -100,6 +105,7 @@ services:
100105
quest:
101106
platform: linux/amd64
102107
image: ghcr.io/parseablehq/quest:main
108+
pull_policy: always
103109
command:
104110
[
105111
"load",
@@ -120,9 +126,12 @@ services:
120126
networks:
121127
- parseable-internal
122128
depends_on:
123-
- parseable-query
124-
- parseable-ingest-one
125-
- minio
129+
parseable-query:
130+
condition: service_healthy
131+
parseable-ingest-one:
132+
condition: service_healthy
133+
minio:
134+
condition: service_healthy
126135
deploy:
127136
restart_policy:
128137
condition: on-failure

docker-compose-test-with-kafka.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ networks:
33

44
services:
55
minio:
6-
image: minio/minio:RELEASE.2023-02-10T18-48-39Z
6+
image: minio/minio:RELEASE.2025-02-03T21-03-04Z
77
entrypoint:
88
- sh
99
- -euc
@@ -49,8 +49,10 @@ services:
4949
- P_KAFKA_BOOTSTRAP_SERVERS=kafka-0:9092
5050
# additional settings like security, tuning, etc.
5151
depends_on:
52-
- minio
53-
- kafka-0
52+
minio:
53+
condition: service_healthy
54+
kafka-0:
55+
condition: service_healthy
5456
healthcheck:
5557
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ]
5658
interval: 15s
@@ -67,6 +69,7 @@ services:
6769
quest:
6870
image: ghcr.io/parseablehq/quest:main
6971
platform: linux/amd64
72+
pull_policy: always
7073
command: [
7174
"load",
7275
"http://parseable:8000",
@@ -81,7 +84,8 @@ services:
8184
"parseable"
8285
]
8386
depends_on:
84-
- parseable
87+
parseable:
88+
condition: service_healthy
8589
networks:
8690
- parseable-internal
8791
deploy:
@@ -145,14 +149,15 @@ services:
145149
kafka-log-generator:
146150
build:
147151
context: ./scripts
148-
dockerfile: Dockerfile
152+
dockerfile: Dockerfile.debug
149153
environment:
150154
- KAFKA_BROKERS=kafka-0:9092
151155
- KAFKA_TOPIC=test-logs-stream
152156
- LOG_RATE=5000
153157
- TOTAL_LOGS=500_000
154158
depends_on:
155-
- kafka-0
159+
kafka-0:
160+
condition: service_healthy
156161
networks:
157162
- parseable-internal
158163
deploy:

docker-compose-test.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ networks:
33

44
services:
55
minio:
6-
image: minio/minio:RELEASE.2023-02-10T18-48-39Z
6+
image: minio/minio:RELEASE.2025-02-03T21-03-04Z
77
entrypoint:
88
- sh
99
- -euc
@@ -27,7 +27,7 @@ services:
2727
parseable:
2828
build:
2929
context: .
30-
dockerfile: Dockerfile
30+
dockerfile: Dockerfile.debug
3131
platform: linux/amd64
3232
command: [ "parseable", "s3-store", ]
3333
ports:
@@ -43,8 +43,10 @@ services:
4343
- P_PASSWORD=parseableadmin
4444
- P_CHECK_UPDATE=false
4545
- P_PARQUET_COMPRESSION_ALGO=snappy
46+
- RUST_LOG=warn
4647
depends_on:
47-
- minio
48+
minio:
49+
condition: service_healthy
4850
healthcheck:
4951
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ]
5052
interval: 15s
@@ -61,6 +63,7 @@ services:
6163
quest:
6264
image: ghcr.io/parseablehq/quest:main
6365
platform: linux/amd64
66+
pull_policy: always
6467
command: [
6568
"load",
6669
"http://parseable:8000",
@@ -75,7 +78,8 @@ services:
7578
"parseable"
7679
]
7780
depends_on:
78-
- parseable
81+
parseable:
82+
condition: service_healthy
7983
networks:
8084
- parseable-internal
8185
deploy:

src/about.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
*
1818
*/
1919

20-
use crate::analytics;
21-
use crate::option::Config;
22-
use crate::storage::StorageMetadata;
23-
use crate::utils::update::{self, LatestRelease};
2420
use chrono::Duration;
2521
use chrono_humanize::{Accuracy, Tense};
2622
use crossterm::style::Stylize;
@@ -30,6 +26,11 @@ use std::path::Path;
3026
use sysinfo::System;
3127
use ulid::Ulid;
3228

29+
use crate::analytics;
30+
use crate::cli::Options;
31+
use crate::storage::StorageMetadata;
32+
use crate::utils::update::{self, LatestRelease};
33+
3334
// Expose some static variables for internal usage
3435
pub static LATEST_RELEASE: OnceCell<Option<LatestRelease>> = OnceCell::new();
3536

@@ -99,7 +100,7 @@ impl ParseableVersion {
99100

100101
pub fn print_about(
101102
current_version: semver::Version,
102-
latest_release: Option<update::LatestRelease>,
103+
latest_release: Option<LatestRelease>,
103104
commit_hash: String,
104105
) {
105106
eprint!(
@@ -123,7 +124,7 @@ pub fn print_about(
123124
);
124125
}
125126

126-
fn print_latest_release(latest_release: update::LatestRelease) {
127+
fn print_latest_release(latest_release: LatestRelease) {
127128
let time_since_latest_release = chrono::Utc::now() - latest_release.date;
128129
let time_since_latest_release = humanize_time(time_since_latest_release);
129130
let fmt_latest_version = format!(
@@ -133,10 +134,10 @@ fn print_latest_release(latest_release: update::LatestRelease) {
133134
eprint!("{}", fmt_latest_version.red());
134135
}
135136

136-
pub async fn print(config: &Config, meta: &StorageMetadata) {
137+
pub async fn print(options: &Options, meta: &StorageMetadata) {
137138
// print current version
138139
let current = current();
139-
let latest_release = if config.options.check_update {
140+
let latest_release = if options.check_update {
140141
update::get_latest(&meta.deployment_id).await.ok()
141142
} else {
142143
None

0 commit comments

Comments
 (0)