Skip to content

Commit

Permalink
chore: remove models
Browse files Browse the repository at this point in the history
  • Loading branch information
v3g42 committed Sep 20, 2023
1 parent e392f4a commit 44acf29
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 84 deletions.
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dozer-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "dozer"

[dependencies]

dozer-cloud-client = { git = "ssh://[email protected]/getdozer/dozer-cloud.git", rev = "refs/pull/628/head", optional = true }
dozer-cloud-client = { git = "ssh://[email protected]/getdozer/dozer-cloud.git", rev = "c0ff1cb" }
dozer-api = { path = "../dozer-api" }
dozer-ingestion = { path = "../dozer-ingestion" }
dozer-core = { path = "../dozer-core" }
Expand Down Expand Up @@ -59,5 +59,5 @@ path = "src/main.rs"
snowflake = ["dozer-ingestion/snowflake"]
mongodb = ["dozer-ingestion/mongodb"]
onnx = ["dozer-sql/onnx"]
cloud = ["dozer-cloud-client"]
cloud = []
tokio-console = ["dozer-tracing/tokio-console"]
17 changes: 4 additions & 13 deletions dozer-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,8 @@ fn run() -> Result<(), OrchestrationError> {
#[cfg(feature = "cloud")]
Commands::Cloud(cloud) => {
render_logo();
run_cloud(
dozer.runtime.clone(),
dozer.config.clone(),
cloud,
cli.config_paths,
)
.map_err(OrchestrationError::CloudError)
run_cloud(dozer.runtime.clone(), cloud, cli.config_paths)
.map_err(OrchestrationError::CloudError)
}
Commands::Init => {
panic!("This should not happen as it is handled in parse_and_generate");
Expand Down Expand Up @@ -275,18 +270,14 @@ fn init_orchestrator(cli: &Cli) -> Result<SimpleOrchestrator, CliError> {
}
})
}
#[cfg(feature = "cloud")]

fn display_error(e: &OrchestrationError) {
if let OrchestrationError::CloudError(e) = &e {
display_cloud_error(e);
dozer_cloud_client::errors::display_cloud_error(e);
} else {
error!("{}", e);
}
}
fn display_error(e: &OrchestrationError) {
error!("{}", e);
}

struct Telemetry();

impl Telemetry {
Expand Down
1 change: 1 addition & 0 deletions dozer-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dozer-cloud-client = { git = "ssh://[email protected]/getdozer/dozer-cloud.git", rev = "c0ff1cb" }
chrono = { version = "0.4.23", features = ["serde"] }
serde = { version = "1.0.152", features = ["derive", "rc"] }
serde_json = { version = "1.0.93", features = ["std"] }
Expand Down
2 changes: 2 additions & 0 deletions dozer-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ pub use serde_yaml;
pub use thiserror;
pub use tracing;

pub use dozer_cloud_client;

// Types required by API and other clients
pub mod api {
use serde::{Deserialize, Serialize};
Expand Down
62 changes: 0 additions & 62 deletions dozer-types/src/models/cloud.rs

This file was deleted.

7 changes: 4 additions & 3 deletions dozer-types/src/models/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::Path;

use super::{
api_config::ApiConfig, api_endpoint::ApiEndpoint, app_config::AppConfig, cloud::Cloud,
api_config::ApiConfig, api_endpoint::ApiEndpoint, app_config::AppConfig,
connection::Connection, flags::Flags, source::Source, telemetry::TelemetryConfig,
};
use crate::constants::DEFAULT_HOME_DIR;
Expand Down Expand Up @@ -75,10 +75,11 @@ pub struct Config {
/// Instrument using Dozer
#[serde(skip_serializing_if = "Option::is_none")]
pub telemetry: Option<TelemetryConfig>,
#[prost(message, optional, tag = "14")]

/// Dozer Cloud specific configuration
#[prost(message, optional, tag = "14")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud: Option<Cloud>,
pub cloud: Option<dozer_cloud_client::models::Cloud>,

#[prost(message, repeated, tag = "15")]
/// UDF specific configuration (eg. !Onnx)
Expand Down
1 change: 0 additions & 1 deletion dozer-types/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pub mod api_config;
pub mod api_endpoint;
pub mod api_security;
pub mod app_config;
pub mod cloud;
pub mod config;
pub mod connection;
pub mod flags;
Expand Down

0 comments on commit 44acf29

Please sign in to comment.