diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87b69e5..9d6c476 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,9 +54,7 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Install Zig toolchain - uses: korandoru/setup-zig@v1 - with: - zig-version: 0.10.0 + uses: mlugg/setup-zig@v2 - name: Install Cargo Lambda uses: jaxxstorm/action-install-gh-release@v1.12.0 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b8c832f..9c9f7d8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,9 +17,7 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Install Zig toolchain - uses: korandoru/setup-zig@v1 - with: - zig-version: 0.10.0 + uses: mlugg/setup-zig@v2 - name: Install Cargo Lambda uses: jaxxstorm/action-install-gh-release@v1.12.0 with: diff --git a/Cargo.toml b/Cargo.toml index 4af00bc..47f7fb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "3" members = [ "lambdas/*", ] diff --git a/lambdas/query-metrics/Cargo.toml b/lambdas/query-metrics/Cargo.toml index b62cd1d..70fbda0 100644 --- a/lambdas/query-metrics/Cargo.toml +++ b/lambdas/query-metrics/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "query-metrics" -version = "0.4.0" -edition = "2021" +version = "0.5.0" +edition = "2024" [[bin]] name = "query-metrics" @@ -18,8 +18,7 @@ aws-sdk-cloudwatch = "1.11.0" aws-sdk-config = "1.11.0" aws_lambda_events = { version = "0.12.0" } base64 = "0.21.7" -deltalake-core = { version = "0.19.0", features = ["datafusion"] } -deltalake-aws = { version = "0.1.4" } +deltalake = { version = "0.29.0", features = ["datafusion", "s3"] } lambda_runtime = "0.8.3" serde = { version = "1.0.195", features = ["derive"] } @@ -28,4 +27,3 @@ tokio = { version = "1", features = ["macros"] } tracing = { version = "0.1", features = ["log"] } tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "env-filter"] } url = { version = "2.5.0", features = ["serde"] } - diff --git a/lambdas/query-metrics/src/cli.rs b/lambdas/query-metrics/src/cli.rs index 6ff180a..1cc29d6 100644 --- a/lambdas/query-metrics/src/cli.rs +++ b/lambdas/query-metrics/src/cli.rs @@ -4,17 +4,17 @@ use std::collections::HashMap; use std::sync::Arc; -use deltalake_core::arrow::util::pretty::print_batches; -use deltalake_core::arrow::{array::PrimitiveArray, datatypes::Int64Type}; -use deltalake_core::datafusion::common::*; -use deltalake_core::datafusion::execution::context::SessionContext; +use deltalake::arrow::util::pretty::print_batches; +use deltalake::arrow::{array::PrimitiveArray, datatypes::Int64Type}; +use deltalake::datafusion::common::*; +use deltalake::datafusion::execution::context::SessionContext; use tracing::log::*; mod config; #[tokio::main] async fn main() -> anyhow::Result<()> { - deltalake_aws::register_handlers(None); + deltalake::aws::register_handlers(None); tracing_subscriber::fmt() .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) @@ -27,7 +27,7 @@ async fn main() -> anyhow::Result<()> { for gauge in gauges.iter() { println!("Querying the {name} table"); let ctx = SessionContext::new(); - let table = deltalake_core::open_table(&gauge.url) + let table = deltalake::open_table(gauge.url.clone()) .await .expect("Failed to register table"); println!("table opened"); diff --git a/lambdas/query-metrics/src/main.rs b/lambdas/query-metrics/src/main.rs index f4cd38b..1c866bc 100644 --- a/lambdas/query-metrics/src/main.rs +++ b/lambdas/query-metrics/src/main.rs @@ -7,10 +7,10 @@ use aws_sdk_cloudwatch::{ primitives::DateTime, types::{Dimension, MetricDatum, StandardUnit}, }; -use deltalake_core::arrow::{array::PrimitiveArray, datatypes::Int64Type}; -use deltalake_core::datafusion::common::*; -use deltalake_core::datafusion::execution::context::SessionContext; -use lambda_runtime::{run, service_fn, Error, LambdaEvent}; +use deltalake::arrow::{array::PrimitiveArray, datatypes::Int64Type}; +use deltalake::datafusion::common::*; +use deltalake::datafusion::execution::context::SessionContext; +use lambda_runtime::{Error, LambdaEvent, run, service_fn}; use tracing::log::*; use std::collections::HashMap; @@ -20,7 +20,7 @@ use std::time::SystemTime; mod config; async fn function_handler(_event: LambdaEvent) -> Result<(), Error> { - deltalake_aws::register_handlers(None); + deltalake::aws::register_handlers(None); let aws_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await; let cloudwatch = aws_sdk_cloudwatch::Client::new(&aws_config); @@ -35,7 +35,7 @@ async fn function_handler(_event: LambdaEvent) -> Result<(), Er for gauge in gauges.iter() { debug!("Querying the {name} table"); let ctx = SessionContext::new(); - let table = deltalake_core::open_table(&gauge.url) + let table = deltalake::open_table(gauge.url.clone()) .await .expect("Failed to register table"); ctx.register_table("source", Arc::new(table))