Skip to content

Commit 6b07375

Browse files
committed
sever/vclient
1 parent aecd1fe commit 6b07375

22 files changed

Lines changed: 242 additions & 394 deletions

File tree

.github/workflows/publish_lambda.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
echo "QW_COMMIT_TAGS=$(git tag --points-at HEAD | tr '\n' ',')" >> $GITHUB_ENV
4646
4747
- 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
48+
run: cross build --release --features lambda-release --target aarch64-unknown-linux-gnu -p quickwit-lambda-server --bin quickwit-aws-lambda-leaf-search
4949
env:
5050
QW_COMMIT_DATE: ${{ env.QW_COMMIT_DATE }}
5151
QW_COMMIT_HASH: ${{ env.QW_COMMIT_HASH }}

LICENSE-3rdparty.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,11 @@ unicode-width,https://github.com/unicode-rs/unicode-width,MIT OR Apache-2.0,"kwa
529529
unit-prefix,https://codeberg.org/commons-rs/unit-prefix,MIT,"Fabio Valentini <decathorpe@gmail.com>, Benjamin Sago <ogham@bsago.me>"
530530
unsafe-libyaml,https://github.com/dtolnay/unsafe-libyaml,MIT,David Tolnay <dtolnay@gmail.com>
531531
untrusted,https://github.com/briansmith/untrusted,ISC,Brian Smith <brian@briansmith.org>
532+
ureq-proto,https://github.com/algesten/ureq-proto,MIT OR Apache-2.0,Martin Algesten <martin@algesten.se>
532533
url,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
533534
urlencoding,https://github.com/kornelski/rust_urlencoding,MIT,"Kornel <kornel@geekhood.net>, Bertram Truong <b@bertramtruong.com>"
534535
username,https://pijul.org/darcs/user,MIT OR Apache-2.0,Pierre-Étienne Meunier <pierre-etienne.meunier@aalto.fi>
536+
utf-8,https://github.com/SimonSapin/rust-utf8,MIT OR Apache-2.0,Simon Sapin <simon.sapin@exyr.org>
535537
utf8-ranges,https://github.com/BurntSushi/utf8-ranges,Unlicense OR MIT,Andrew Gallant <jamslam@gmail.com>
536538
utf8_iter,https://github.com/hsivonen/utf8_iter,Apache-2.0 OR MIT,Henri Sivonen <hsivonen@hsivonen.fi>
537539
utf8parse,https://github.com/alacritty/vte,Apache-2.0 OR MIT,"Joe Wilm <joe@jwilm.com>, Christian Duerr <contact@christianduerr.com>"

quickwit/Cargo.lock

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

quickwit/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ members = [
1919
"quickwit-integration-tests",
2020
"quickwit-jaeger",
2121
"quickwit-janitor",
22-
"quickwit-lambda",
22+
"quickwit-lambda-client",
23+
"quickwit-lambda-server",
2324
"quickwit-macros",
2425
"quickwit-metastore",
2526

@@ -57,7 +58,8 @@ default-members = [
5758
"quickwit-integration-tests",
5859
"quickwit-jaeger",
5960
"quickwit-janitor",
60-
"quickwit-lambda",
61+
"quickwit-lambda-client",
62+
"quickwit-lambda-server",
6163
"quickwit-macros",
6264
"quickwit-metastore",
6365
"quickwit-opentelemetry",
@@ -361,7 +363,8 @@ quickwit-ingest = { path = "quickwit-ingest" }
361363
quickwit-integration-tests = { path = "quickwit-integration-tests" }
362364
quickwit-jaeger = { path = "quickwit-jaeger" }
363365
quickwit-janitor = { path = "quickwit-janitor" }
364-
quickwit-lambda = { path = "quickwit-lambda" }
366+
quickwit-lambda-client = { path = "quickwit-lambda-client" }
367+
quickwit-lambda-server = { path = "quickwit-lambda-server" }
365368
quickwit-macros = { path = "quickwit-macros" }
366369
quickwit-metastore = { path = "quickwit-metastore" }
367370
quickwit-opentelemetry = { path = "quickwit-opentelemetry" }

quickwit/quickwit-cli/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ release-feature-set = [
102102
"quickwit-indexing/pulsar",
103103
"quickwit-indexing/sqs",
104104
"quickwit-indexing/vrl",
105-
"quickwit-serve/lambda-auto-deploy",
106105
"quickwit-storage/azure",
107106
"quickwit-storage/gcs",
108107
"quickwit-metastore/postgres",
@@ -117,7 +116,6 @@ release-feature-vendored-set = [
117116
"quickwit-indexing/sqs",
118117
"quickwit-indexing/vrl",
119118
"quickwit-indexing/vendored-kafka",
120-
"quickwit-serve/lambda-auto-deploy",
121119
"quickwit-storage/azure",
122120
"quickwit-storage/gcs",
123121
"quickwit-metastore/postgres",
@@ -131,7 +129,6 @@ release-macos-feature-vendored-set = [
131129
"quickwit-indexing/sqs",
132130
"quickwit-indexing/vrl",
133131
"quickwit-indexing/vendored-kafka-macos",
134-
"quickwit-serve/lambda-auto-deploy",
135132
"quickwit-storage/azure",
136133
"quickwit-storage/gcs",
137134
"quickwit-metastore/postgres",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[package]
2+
name = "quickwit-lambda-client"
3+
description = "AWS Lambda client for Quickwit leaf search invocation and deployment"
4+
5+
version.workspace = true
6+
edition.workspace = true
7+
homepage.workspace = true
8+
documentation.workspace = true
9+
repository.workspace = true
10+
authors.workspace = true
11+
license.workspace = true
12+
13+
[dependencies]
14+
async-trait = { workspace = true }
15+
aws-config = { workspace = true }
16+
aws-sdk-lambda = { workspace = true }
17+
base64 = { workspace = true }
18+
prost = { workspace = true }
19+
serde_json = { workspace = true }
20+
tokio = { workspace = true }
21+
tracing = { workspace = true }
22+
23+
quickwit-config = { workspace = true }
24+
quickwit-lambda-server = { workspace = true }
25+
quickwit-proto = { workspace = true }
26+
quickwit-search = { workspace = true }
27+
28+
[build-dependencies]
29+
ureq = { workspace = true }
30+
31+
[features]
32+
default = []
33+
testsuite = []
Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,28 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
//! Build script for quickwit-lambda.
15+
//! Build script for quickwit-lambda-client.
1616
//!
17-
//! When the `auto-deploy` feature is enabled, this script:
18-
//! 1. Downloads the pre-built Lambda zip from a GitHub release
19-
//! 2. Places the zip in OUT_DIR for embedding via include_bytes!
17+
//! This script downloads the pre-built Lambda zip from a GitHub release
18+
//! and places it in OUT_DIR for embedding via include_bytes!
2019
//!
2120
//! The Lambda binary is built separately in CI and published as a GitHub release.
2221
23-
fn main() {
24-
#[cfg(feature = "auto-deploy")]
25-
auto_deploy_build();
26-
27-
#[cfg(not(feature = "auto-deploy"))]
28-
println!("cargo:rerun-if-changed=build.rs");
29-
}
22+
use std::env;
23+
use std::fs::File;
24+
use std::io::Write;
25+
use std::path::PathBuf;
3026

3127
/// URL to download the pre-built Lambda zip from GitHub releases.
3228
/// This should be updated when a new Lambda binary is released.
33-
#[cfg(feature = "auto-deploy")]
3429
const LAMBDA_ZIP_URL: &str =
3530
"https://github.com/quickwit-oss/quickwit/releases/download/lambda-506751fb/quickwit-aws-lambda--aarch64.zip";
3631

3732
/// AWS Lambda direct upload limit is 50MB.
3833
/// Larger artifacts must be uploaded via S3.
39-
#[cfg(feature = "auto-deploy")]
4034
const MAX_LAMBDA_ZIP_SIZE: usize = 50 * 1024 * 1024;
4135

42-
#[cfg(feature = "auto-deploy")]
43-
fn auto_deploy_build() {
44-
use std::env;
45-
use std::fs::File;
46-
use std::io::Write;
47-
use std::path::PathBuf;
48-
36+
fn main() {
4937
println!("cargo:rerun-if-changed=build.rs");
5038
println!("cargo:rerun-if-env-changed=QUICKWIT_LAMBDA_ZIP_URL");
5139

@@ -73,11 +61,10 @@ fn auto_deploy_build() {
7361
}
7462
}
7563

76-
#[cfg(feature = "auto-deploy")]
7764
fn download_lambda_zip(url: &str) -> Result<Vec<u8>, Box<dyn std::error::Error>> {
78-
let response = ureq::get(url).call()?;
65+
let response = ureq::get(url).call();
7966
// Set limit higher than MAX_LAMBDA_ZIP_SIZE so we can provide a better error message
80-
let data = response
67+
let data = response?
8168
.into_body()
8269
.with_config()
8370
.limit(MAX_LAMBDA_ZIP_SIZE as u64 + 1) // We download one more byte to trigger the panic below.

0 commit comments

Comments
 (0)