Skip to content

Commit 506751f

Browse files
committed
blop
1 parent c6f1565 commit 506751f

19 files changed

Lines changed: 279 additions & 207 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Build Lambda binary
2+
3+
on:
4+
push:
5+
branches:
6+
- lambda # This is temporary
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version tag (e.g., v0.8.0)'
11+
required: false
12+
default: 'dev'
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
build-lambda:
19+
name: Build Lambda ARM64
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
actions: write
24+
steps:
25+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
26+
27+
- name: Set version
28+
run: |
29+
if [ "${{ github.event.inputs.version }}" = "dev" ]; then
30+
echo "ASSET_VERSION=dev-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
31+
else
32+
echo "ASSET_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
33+
fi
34+
35+
- name: Install rustup
36+
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
37+
38+
- name: Install cross
39+
run: cargo install cross
40+
41+
- name: Retrieve and export commit date, hash, and tags
42+
run: |
43+
echo "QW_COMMIT_DATE=$(TZ=UTC0 git log -1 --format=%cd --date=format-local:%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV
44+
echo "QW_COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
45+
echo "QW_COMMIT_TAGS=$(git tag --points-at HEAD | tr '\n' ',')" >> $GITHUB_ENV
46+
47+
- name: Build Lambda binary
48+
run: cross build --release --features lambda-release --target aarch64-unknown-linux-gnu -p quickwit-lambda --bin quickwit-aws-lambda-leaf-search
49+
env:
50+
QW_COMMIT_DATE: ${{ env.QW_COMMIT_DATE }}
51+
QW_COMMIT_HASH: ${{ env.QW_COMMIT_HASH }}
52+
QW_COMMIT_TAGS: ${{ env.QW_COMMIT_TAGS }}
53+
working-directory: ./quickwit
54+
55+
- name: Create Lambda zip
56+
run: |
57+
cd quickwit/target/aarch64-unknown-linux-gnu/release
58+
cp quickwit-aws-lambda-leaf-search bootstrap
59+
zip quickwit-aws-lambda-${{ env.ASSET_VERSION }}-aarch64.zip bootstrap
60+
mv quickwit-aws-lambda-${{ env.ASSET_VERSION }}-aarch64.zip ../../../../
61+
62+
- name: Upload to GitHub release
63+
uses: quickwit-inc/upload-to-github-release@v1
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
with:
67+
file: quickwit-aws-lambda-${{ env.ASSET_VERSION }}-aarch64.zip
68+
overwrite: true
69+
draft: true
70+
tag_name: ${{ env.ASSET_VERSION }}

LICENSE-3rdparty.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ arrayvec,https://github.com/bluss/arrayvec,MIT OR Apache-2.0,bluss
2121
assert-json-diff,https://github.com/davidpdrsn/assert-json-diff,MIT,David Pedersen <david.pdrsn@gmail.com>
2222
async-compression,https://github.com/Nullus157/async-compression,MIT OR Apache-2.0,"Wim Looman <wim@nemo157.com>, Allen Bui <fairingrey@gmail.com>"
2323
async-speed-limit,https://github.com/tikv/async-speed-limit,MIT OR Apache-2.0,The TiKV Project Developers
24+
async-stream,https://github.com/tokio-rs/async-stream,MIT,Carl Lerche <me@carllerche.com>
25+
async-stream-impl,https://github.com/tokio-rs/async-stream,MIT,Carl Lerche <me@carllerche.com>
2426
async-trait,https://github.com/dtolnay/async-trait,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
2527
atomic-waker,https://github.com/smol-rs/atomic-waker,Apache-2.0 OR MIT,"Stjepan Glavina <stjepang@gmail.com>, Contributors to futures-rs"
2628
aws-config,https://github.com/smithy-lang/smithy-rs,Apache-2.0,"AWS Rust SDK Team <aws-sdk-rust@amazon.com>, Russell Cohen <rcoh@amazon.com>"
2729
aws-credential-types,https://github.com/smithy-lang/smithy-rs,Apache-2.0,AWS Rust SDK Team <aws-sdk-rust@amazon.com>
2830
aws-lc-rs,https://github.com/aws/aws-lc-rs,ISC AND (Apache-2.0 OR ISC),AWS-LibCrypto
2931
aws-lc-sys,https://github.com/aws/aws-lc-rs,ISC AND (Apache-2.0 OR ISC) AND OpenSSL,AWS-LC
3032
aws-runtime,https://github.com/smithy-lang/smithy-rs,Apache-2.0,AWS Rust SDK Team <aws-sdk-rust@amazon.com>
33+
aws-sdk-lambda,https://github.com/awslabs/aws-sdk-rust,Apache-2.0,"AWS Rust SDK Team <aws-sdk-rust@amazon.com>, Russell Cohen <rcoh@amazon.com>"
3134
aws-sdk-s3,https://github.com/awslabs/aws-sdk-rust,Apache-2.0,"AWS Rust SDK Team <aws-sdk-rust@amazon.com>, Russell Cohen <rcoh@amazon.com>"
3235
aws-sdk-sso,https://github.com/awslabs/aws-sdk-rust,Apache-2.0,"AWS Rust SDK Team <aws-sdk-rust@amazon.com>, Russell Cohen <rcoh@amazon.com>"
3336
aws-sdk-ssooidc,https://github.com/awslabs/aws-sdk-rust,Apache-2.0,"AWS Rust SDK Team <aws-sdk-rust@amazon.com>, Russell Cohen <rcoh@amazon.com>"
@@ -235,6 +238,8 @@ jiff-static,https://github.com/BurntSushi/jiff,Unlicense OR MIT,Andrew Gallant <
235238
jobserver,https://github.com/rust-lang/jobserver-rs,MIT OR Apache-2.0,Alex Crichton <alex@alexcrichton.com>
236239
js-sys,https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/js-sys,MIT OR Apache-2.0,The wasm-bindgen Developers
237240
json_comments,https://github.com/tmccombs/json-comments-rs,Apache-2.0,Thayne McCombs <astrothayne@gmail.com>
241+
lambda_runtime,https://github.com/awslabs/aws-lambda-rust-runtime,Apache-2.0,"David Calavera <dcalaver@amazon.com>, Harold Sun <sunhua@amazon.com>"
242+
lambda_runtime_api_client,https://github.com/awslabs/aws-lambda-rust-runtime,Apache-2.0,"David Calavera <dcalaver@amazon.com>, Harold Sun <sunhua@amazon.com>"
238243
lazy_static,https://github.com/rust-lang-nursery/lazy-static.rs,MIT OR Apache-2.0,Marvin Löbel <loebel.marvin@gmail.com>
239244
levenshtein_automata,https://github.com/tantivy-search/levenshtein-automata,MIT,Paul Masurel <paul.masurel@gmail.com>
240245
libc,https://github.com/rust-lang/libc,MIT OR Apache-2.0,The Rust Project Developers
@@ -424,6 +429,7 @@ serde_core,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar
424429
serde_derive,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>"
425430
serde_json,https://github.com/serde-rs/json,MIT OR Apache-2.0,"Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>"
426431
serde_json_borrow,https://github.com/PSeitz/serde_json_borrow,MIT,Pascal Seitz <pascal.seitz@gmail.com>
432+
serde_path_to_error,https://github.com/dtolnay/path-to-error,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
427433
serde_qs,https://github.com/samscott89/serde_qs,MIT OR Apache-2.0,Sam Scott <sam@osohq.com>
428434
serde_spanned,https://github.com/toml-rs/toml,MIT OR Apache-2.0,The serde_spanned Authors
429435
serde_urlencoded,https://github.com/nox/serde_urlencoded,MIT OR Apache-2.0,Anthony Ramine <n.oxyde@gmail.com>

quickwit/Cargo.lock

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

quickwit/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ tracing-subscriber = { version = "0.3", features = [
296296
ttl_cache = "0.5"
297297
typetag = "0.2"
298298
ulid = "1.2"
299+
ureq = "3"
299300
username = "0.2"
300301
# We cannot upgrade to utoipa 5.0+ due to significant breaking changes:
301302
# 1. The `OpenApi` struct structure changed (fields are private), breaking our manual merging logic in openapi.rs

quickwit/quickwit-common/src/rate_limiter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ pub struct RateLimiterSettings {
3333
pub refill_period: Duration,
3434
}
3535

36-
#[cfg(any(test, feature = "testsuite"))]
3736
impl Default for RateLimiterSettings {
3837
fn default() -> Self {
3938
// 10 MB burst limit.

quickwit/quickwit-config/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ quickwit-proto = { workspace = true }
4343
tokio = { workspace = true }
4444

4545
quickwit-proto = { workspace = true, features = ["testsuite"] }
46+
quickwit-common = { workspace = true, features = ["testsuite"] }
4647

4748
[features]
4849
testsuite = []

quickwit/quickwit-config/resources/tests/node_config/quickwit.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@
7070
"min_throughtput_bytes_per_secs": 100000,
7171
"timeout_millis": 2000,
7272
"max_num_retries": 2
73+
},
74+
"lambda": {
75+
"function_name": "quickwit-lambda-leaf-search",
76+
"max_splits_per_invocation": 10,
77+
"auto_deploy": {
78+
"execution_role_arn": "arn:aws:iam::123456789012:role/quickwit-lambda-role",
79+
"memory_size": "5 GiB",
80+
"invocation_timeout_secs": 15
81+
}
7382
}
7483
},
7584
"jaeger": {

quickwit/quickwit-config/resources/tests/node_config/quickwit.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ min_throughtput_bytes_per_secs = 100000
6262
timeout_millis = 2000
6363
max_num_retries = 2
6464

65+
[searcher.lambda]
66+
function_name = "quickwit-lambda-leaf-search"
67+
max_splits_per_invocation = 10
68+
69+
[searcher.lambda.auto_deploy]
70+
execution_role_arn = "arn:aws:iam::123456789012:role/quickwit-lambda-role"
71+
memory_size = "5 GiB"
72+
invocation_timeout_secs = 15
73+
6574
[jaeger]
6675
enable_endpoint = true
6776
lookback_period_hours = 24

quickwit/quickwit-config/resources/tests/node_config/quickwit.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ searcher:
6464
min_throughtput_bytes_per_secs: 100000
6565
timeout_millis: 2000
6666
max_num_retries: 2
67+
lambda:
68+
function_name: quickwit-lambda-leaf-search
69+
max_splits_per_invocation: 10
70+
auto_deploy:
71+
execution_role_arn: arn:aws:iam::123456789012:role/quickwit-lambda-role
72+
memory_size: 5 GiB
73+
invocation_timeout_secs: 15
6774

6875
jaeger:
6976
enable_endpoint: true

quickwit/quickwit-config/src/node_config/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ impl LambdaDeployConfig {
347347
ByteSize::gib(5)
348348
}
349349
fn default_invocation_timeout_secs() -> u64 {
350-
30
350+
15
351351
}
352352
}
353353

0 commit comments

Comments
 (0)