From e392f4abf79564a78d666804e653053bc5972532 Mon Sep 17 00:00:00 2001 From: VG Date: Thu, 21 Sep 2023 00:47:37 +0800 Subject: [PATCH] chore: include feature cloud --- Cargo.lock | 65 +++++++++++++++++++++++++++++++---------- dozer-cli/Cargo.toml | 5 ++-- dozer-cli/src/errors.rs | 6 ++-- dozer-cli/src/main.rs | 7 +++-- 4 files changed, 59 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0518b3169..41413d7499 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2582,7 +2582,7 @@ dependencies = [ "dozer-cache", "dozer-core", "dozer-tracing", - "dozer-types", + "dozer-types 0.1.39", "futures-util", "gethostname", "handlebars", @@ -2616,7 +2616,7 @@ dependencies = [ "dozer-log", "dozer-storage", "dozer-tracing", - "dozer-types", + "dozer-types 0.1.39", "env_logger", "futures", "itertools 0.10.5", @@ -2646,7 +2646,7 @@ dependencies = [ "dozer-sql", "dozer-storage", "dozer-tracing", - "dozer-types", + "dozer-types 0.1.39", "futures", "glob", "handlebars", @@ -2673,11 +2673,12 @@ dependencies = [ [[package]] name = "dozer-cloud-client" version = "0.1.0" +source = "git+ssh://git@github.com/getdozer/dozer-cloud.git?rev=refs/pull/628/head#378abd949f4f62b42fd94ad795637a45a6f19349" dependencies = [ "camino", "chrono", "clap 4.4.1", - "dozer-types", + "dozer-types 0.1.39 (git+ssh://git@github.com/getdozer/dozer-cloud.git?rev=refs/pull/628/head)", "futures", "futures-util", "glob", @@ -2700,7 +2701,7 @@ dependencies = [ "dozer-log", "dozer-storage", "dozer-tracing", - "dozer-types", + "dozer-types 0.1.39", "metrics", "tempdir", "uuid", @@ -2719,7 +2720,7 @@ dependencies = [ "dozer-cli", "dozer-log", "dozer-tracing", - "dozer-types", + "dozer-types 0.1.39", "dozer-utils", "env_logger", "futures", @@ -2767,7 +2768,7 @@ dependencies = [ "aws-smithy-types", "camino", "clap 4.4.1", - "dozer-types", + "dozer-types 0.1.39", "dyn-clone", "env_logger", "futures-util", @@ -2784,7 +2785,7 @@ name = "dozer-log-js" version = "0.1.39" dependencies = [ "dozer-log", - "dozer-types", + "dozer-types 0.1.39", "neon", ] @@ -2793,7 +2794,7 @@ name = "dozer-log-python" version = "0.1.39" dependencies = [ "dozer-log", - "dozer-types", + "dozer-types 0.1.39", "pyo3-asyncio", ] @@ -2806,7 +2807,7 @@ dependencies = [ "dozer-sql-expression", "dozer-storage", "dozer-tracing", - "dozer-types", + "dozer-types 0.1.39", "enum_dispatch", "linked-hash-map", "metrics", @@ -2822,7 +2823,7 @@ name = "dozer-sql-expression" version = "0.1.39" dependencies = [ "bigdecimal", - "dozer-types", + "dozer-types 0.1.39", "half 2.3.1", "jsonpath", "like", @@ -2837,7 +2838,7 @@ dependencies = [ name = "dozer-storage" version = "0.1.39" dependencies = [ - "dozer-types", + "dozer-types 0.1.39", "lmdb-rkv", "lmdb-rkv-sys", "page_size", @@ -2862,7 +2863,7 @@ dependencies = [ "dozer-core", "dozer-sql", "dozer-tracing", - "dozer-types", + "dozer-types 0.1.39", "dozer-utils", "env_logger", "futures", @@ -2885,7 +2886,7 @@ version = "0.1.39" dependencies = [ "atty", "console-subscriber", - "dozer-types", + "dozer-types 0.1.39", "futures-util", "metrics", "metrics-exporter-prometheus", @@ -2928,11 +2929,43 @@ dependencies = [ "tracing", ] +[[package]] +name = "dozer-types" +version = "0.1.39" +source = "git+ssh://git@github.com/getdozer/dozer-cloud.git?rev=refs/pull/628/head#378abd949f4f62b42fd94ad795637a45a6f19349" +dependencies = [ + "ahash 0.8.3", + "arrow", + "arrow-schema", + "bincode", + "bytes", + "chrono", + "geo", + "indexmap 1.9.2", + "indicatif", + "log", + "ordered-float 3.9.1", + "parking_lot", + "prettytable-rs", + "prost 0.12.0", + "prost-types 0.12.0", + "rust_decimal", + "serde", + "serde_bytes", + "serde_json", + "serde_yaml", + "thiserror", + "tokio-postgres", + "tonic 0.10.0", + "tonic-build", + "tracing", +] + [[package]] name = "dozer-utils" version = "0.1.39" dependencies = [ - "dozer-types", + "dozer-types 0.1.39", ] [[package]] @@ -4281,7 +4314,7 @@ dependencies = [ name = "jsonpath" version = "0.2.6" dependencies = [ - "dozer-types", + "dozer-types 0.1.39", "lazy_static", "pest", "pest_derive", diff --git a/dozer-cli/Cargo.toml b/dozer-cli/Cargo.toml index 84aebc9bab..16a4e5754e 100644 --- a/dozer-cli/Cargo.toml +++ b/dozer-cli/Cargo.toml @@ -10,7 +10,8 @@ authors = ["getdozer/dozer-dev"] name = "dozer" [dependencies] -dozer-cloud-client = { path = "../../dozer-cloud-client" } + +dozer-cloud-client = { git = "ssh://git@github.com/getdozer/dozer-cloud.git", rev = "refs/pull/628/head", optional = true } dozer-api = { path = "../dozer-api" } dozer-ingestion = { path = "../dozer-ingestion" } dozer-core = { path = "../dozer-core" } @@ -58,5 +59,5 @@ path = "src/main.rs" snowflake = ["dozer-ingestion/snowflake"] mongodb = ["dozer-ingestion/mongodb"] onnx = ["dozer-sql/onnx"] -cloud = [] +cloud = ["dozer-cloud-client"] tokio-console = ["dozer-tracing/tokio-console"] diff --git a/dozer-cli/src/errors.rs b/dozer-cli/src/errors.rs index 0c0990b63b..0ae96d197c 100644 --- a/dozer-cli/src/errors.rs +++ b/dozer-cli/src/errors.rs @@ -4,7 +4,6 @@ use crate::live::LiveError; use dozer_api::errors::{ApiInitError, AuthError, GenerationError, GrpcError}; use dozer_cache::dozer_log::storage; use dozer_cache::errors::CacheError; -use dozer_cloud_client::errors::CloudError; use dozer_core::errors::ExecutionError; use dozer_ingestion::errors::ConnectorError; use dozer_sql::errors::PipelineError; @@ -58,8 +57,6 @@ pub enum OrchestrationError { PipelineError(#[from] PipelineError), #[error(transparent)] CliError(#[from] CliError), - #[error(transparent)] - CloudError(#[from] CloudError), #[error("table_name: {0:?} not found in any of the connections")] SourceValidationError(String), #[error("connection: {0:?} not found")] @@ -78,6 +75,9 @@ pub enum OrchestrationError { LockedOutdatedLockfile, #[error("{LOCK_FILE} does not exist. `--locked` requires a lock file.")] LockedNoLockFile, + #[cfg(feature = "cloud")] + #[error(transparent)] + CloudError(#[from] dozer_cloud_client::errors::CloudError), } #[derive(Error, Debug)] diff --git a/dozer-cli/src/main.rs b/dozer-cli/src/main.rs index 516fe119a3..7bd4969117 100644 --- a/dozer-cli/src/main.rs +++ b/dozer-cli/src/main.rs @@ -1,4 +1,3 @@ -use ::dozer_cloud_client::run_cloud; use clap::Parser; use dozer_cli::cli::generate_config_repl; use dozer_cli::cli::types::{Cli, Commands, ConnectorCommand, RunCommands, SecurityCommands}; @@ -6,7 +5,6 @@ use dozer_cli::cli::{init_dozer, list_sources, LOGO}; use dozer_cli::errors::{CliError, OrchestrationError}; use dozer_cli::simple::SimpleOrchestrator; use dozer_cli::{live, set_ctrl_handler, set_panic_hook, shutdown}; -use dozer_cloud_client::errors::display_cloud_error; use dozer_tracing::LabelsAndProgress; use dozer_types::models::telemetry::{TelemetryConfig, TelemetryMetricsConfig}; @@ -277,7 +275,7 @@ fn init_orchestrator(cli: &Cli) -> Result { } }) } - +#[cfg(feature = "cloud")] fn display_error(e: &OrchestrationError) { if let OrchestrationError::CloudError(e) = &e { display_cloud_error(e); @@ -285,6 +283,9 @@ fn display_error(e: &OrchestrationError) { error!("{}", e); } } +fn display_error(e: &OrchestrationError) { + error!("{}", e); +} struct Telemetry();