Skip to content

Commit 4cd7cca

Browse files
committed
deploy versioning, invoke and added metrics.
1 parent 748f326 commit 4cd7cca

14 files changed

Lines changed: 812 additions & 472 deletions

File tree

quickwit/CLAUDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Quickwit Claude Guidelines
2+
3+
## Code Formatting
4+
5+
Run `make fmt` to check and fix code formatting. This command performs three checks:
6+
7+
1. **Rust formatting**: Ensures Rust code is properly formatted (via `cargo fmt`)
8+
2. **License headers**: Checks that files are prepended with the correct LICENSE header
9+
3. **Log format policy**: Checks that log statements follow our format rules:
10+
- No trailing punctuation in log messages
11+
- No uppercase for the first character of log messages
12+
- See `scripts/check_log_format.sh` for details
13+
14+
### Quick Fix
15+
16+
Use `/fmt` to automatically run format checks and see issues.

quickwit/Cargo.lock

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

quickwit/quickwit-lambda-client/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@ aws-sdk-lambda = { workspace = true }
1919
base64 = { workspace = true }
2020
prost = { workspace = true }
2121
serde_json = { workspace = true }
22+
once_cell = { workspace = true }
2223
tokio = { workspace = true }
2324
tracing = { workspace = true }
2425

26+
quickwit-common = { workspace = true }
2527
quickwit-config = { workspace = true }
2628
quickwit-lambda-server = { workspace = true }
2729
quickwit-proto = { workspace = true }
2830
quickwit-search = { workspace = true }
2931

3032
[build-dependencies]
33+
hex = { workspace = true }
34+
sha1 = "0.10"
3135
ureq = { workspace = true }
3236

3337
[features]

quickwit/quickwit-lambda-client/build.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ use std::fs::File;
2424
use std::io::Write;
2525
use std::path::PathBuf;
2626

27+
use sha1::{Digest, Sha1};
28+
2729
/// URL to download the pre-built Lambda zip from GitHub releases.
2830
/// This should be updated when a new Lambda binary is released.
2931
const LAMBDA_ZIP_URL: &str =
@@ -54,6 +56,15 @@ fn main() {
5456
zip_path,
5557
data.len()
5658
);
59+
60+
// Compute SHA1 hash of the zip and export as environment variable.
61+
// This is used to create a unique qualifier for Lambda versioning.
62+
let mut hasher = Sha1::new();
63+
hasher.update(&data);
64+
let sha1_hash = hasher.finalize();
65+
let sha1_short = hex::encode(&sha1_hash[..4]); // First 8 hex chars
66+
println!("cargo:rustc-env=LAMBDA_BINARY_SHA1={}", sha1_short);
67+
println!("cargo:warning=Lambda binary SHA1 (short): {}", sha1_short);
5768
}
5869
Err(e) => {
5970
panic!("Failed to download Lambda zip: {}", e);

0 commit comments

Comments
 (0)