From 4c20d88feec88cb8b4dc6fae70a4a7523e762bfb Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 8 Jun 2024 18:06:04 +0200 Subject: [PATCH] remove all warnings --- backend/Cargo.toml | 2 +- backend/windmill-api/src/embeddings.rs | 3 +++ backend/windmill-api/src/jobs.rs | 3 ++- backend/windmill-api/src/schedule.rs | 10 +++++----- backend/windmill-worker/Cargo.toml | 1 + backend/windmill-worker/src/worker.rs | 1 + backend/windmill-worker/src/worker_flow.rs | 15 --------------- 7 files changed, 13 insertions(+), 22 deletions(-) diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 3c769bcc41..a5f81165c0 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -50,7 +50,7 @@ parquet = ["windmill-api/parquet", "windmill-common/parquet", "windmill-worker/p prometheus = ["windmill-common/prometheus", "windmill-api/prometheus", "windmill-worker/prometheus", "windmill-queue/prometheus"] flow_testing = ["windmill-worker/flow_testing"] openidconnect = ["windmill-api/openidconnect"] -cloud = ["windmill-queue/cloud"] +cloud = ["windmill-queue/cloud", "windmill-worker/cloud"] jemalloc = ["windmill-common/jemalloc", "dep:tikv-jemallocator", "dep:tikv-jemalloc-sys", "dep:tikv-jemalloc-ctl"] [dependencies] diff --git a/backend/windmill-api/src/embeddings.rs b/backend/windmill-api/src/embeddings.rs index fc9d36713f..6848ceb3d3 100644 --- a/backend/windmill-api/src/embeddings.rs +++ b/backend/windmill-api/src/embeddings.rs @@ -27,6 +27,7 @@ use candle_transformers::models::bert::{BertModel, Config, DTYPE}; use hf_hub::{api::sync::Api, Cache, Repo}; #[cfg(feature = "embedding")] use serde::Deserialize; +#[cfg(feature = "embedding")] use serde::Serialize; #[cfg(feature = "embedding")] use sqlx::{Pool, Postgres}; @@ -63,6 +64,7 @@ struct HubScriptsQuery { app: Option, } +#[cfg(feature = "embedding")] #[derive(Serialize)] pub struct HubScriptResult { ask_id: i64, @@ -100,6 +102,7 @@ struct ResourceTypesQuery { limit: Option, } +#[cfg(feature = "embedding")] #[derive(Serialize)] pub struct ResourceTypeResult { name: String, diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 91cc430680..74d4ee7b5a 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -10,13 +10,13 @@ use axum::body::Body; use axum::http::HeaderValue; use serde_json::value::RawValue; use sqlx::Pool; -use tower::ServiceBuilder; use std::collections::HashMap; #[cfg(feature = "prometheus")] use std::sync::atomic::Ordering; use tokio::io::AsyncReadExt; #[cfg(feature = "prometheus")] use tokio::time::Instant; +use tower::ServiceBuilder; use windmill_common::flow_status::{JobResult, RestartedFrom}; use windmill_common::jobs::{ format_completed_job_result, format_result, CompletedJobWithFormattedResult, FormattedResult, @@ -4024,6 +4024,7 @@ async fn get_log_file(Path((_w_id, file_p)): Path<(String, String)>) -> error::R )); } + #[cfg(not(all(feature = "enterprise", feature = "parquet")))] return Err(error::Error::NotFound(format!( "File not found on server logs volume /tmp/windmill/logs and no distributed logs s3 storage for {}", file_p diff --git a/backend/windmill-api/src/schedule.rs b/backend/windmill-api/src/schedule.rs index acbc6d7762..c7ab2cbcc5 100644 --- a/backend/windmill-api/src/schedule.rs +++ b/backend/windmill-api/src/schedule.rs @@ -809,8 +809,8 @@ pub struct SetEnabled { pub enabled: bool, } -#[derive(Deserialize)] -pub struct Catchup { - pub from: DateTime, - pub to: Option>, -} +// #[derive(Deserialize)] +// pub struct Catchup { +// pub from: DateTime, +// pub to: Option>, +// } diff --git a/backend/windmill-worker/Cargo.toml b/backend/windmill-worker/Cargo.toml index 1328ca9da9..c84caad0b9 100644 --- a/backend/windmill-worker/Cargo.toml +++ b/backend/windmill-worker/Cargo.toml @@ -16,6 +16,7 @@ benchmark = ["windmill-queue/benchmark"] flamegraph = [] parquet = ["windmill-common/parquet", "dep:object_store", "dep:tar"] flow_testing = [] +cloud = [] [dependencies] windmill-queue.workspace = true diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 17682b5a42..f61edf6742 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -571,6 +571,7 @@ async fn handle_receive_completed_job< } } +#[allow(dead_code)] #[derive(Clone)] pub struct JobCompletedSender(Sender, Option, Option); diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index aef56aaa45..491ecf0518 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -1137,12 +1137,6 @@ pub async fn get_step_of_flow_status(db: &DB, id: Uuid) -> error::Result { } } -#[derive(serde::Deserialize)] -pub struct ErrorValue<'a> { - #[serde(borrow)] - pub error: Option<&'a RawValue>, -} - /// resumes should be in order of timestamp ascending, so that more recent are at the end #[instrument(level = "trace", skip_all)] async fn transform_input( @@ -1277,15 +1271,6 @@ pub struct Iter { value: Box, } -#[derive(Serialize)] -pub struct MergeArgs<'a> { - #[serde(flatten)] - b: &'a Iter, - - #[serde(flatten)] - a: HashMap>, -} - #[derive(FromRow)] pub struct ResumeRow { pub value: Json>,