From c573e7f64c9080c2b9a182fb8217a2049096a8fb Mon Sep 17 00:00:00 2001 From: tahahawa Date: Thu, 10 Jul 2025 13:30:15 -0400 Subject: [PATCH] cargo fmt/fix --- examples/rust/src/main.rs | 7 +------ harmony/src/domain/topology/k8s.rs | 5 +---- harmony/src/modules/application/features/argo_types.rs | 3 ++- harmony/src/modules/application/features/monitoring.rs | 1 - 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/examples/rust/src/main.rs b/examples/rust/src/main.rs index 3df4775..6df2ce9 100644 --- a/examples/rust/src/main.rs +++ b/examples/rust/src/main.rs @@ -1,19 +1,14 @@ use std::{path::PathBuf, sync::Arc}; use harmony::{ - data::Id, inventory::Inventory, maestro::Maestro, - modules::{ - application::{ + modules::application::{ ApplicationScore, RustWebFramework, RustWebapp, features::{ContinuousDelivery, Monitoring}, }, - tenant::TenantScore, - }, topology::{ K8sAnywhereTopology, Url, - tenant::{ResourceLimits, TenantConfig, TenantNetworkPolicy}, }, }; diff --git a/harmony/src/domain/topology/k8s.rs b/harmony/src/domain/topology/k8s.rs index c2896ca..6ab249a 100644 --- a/harmony/src/domain/topology/k8s.rs +++ b/harmony/src/domain/topology/k8s.rs @@ -2,10 +2,7 @@ use derive_new::new; use futures_util::StreamExt; use k8s_openapi::{ ClusterResourceScope, NamespaceResourceScope, - api::{ - apps::v1::Deployment, - core::v1::Pod, - }, + api::{apps::v1::Deployment, core::v1::Pod}, }; use kube::{ Client, Config, Error, Resource, diff --git a/harmony/src/modules/application/features/argo_types.rs b/harmony/src/modules/application/features/argo_types.rs index 15bb896..45b429a 100644 --- a/harmony/src/modules/application/features/argo_types.rs +++ b/harmony/src/modules/application/features/argo_types.rs @@ -29,6 +29,8 @@ pub struct Helm { #[derive(Clone, Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct Source { + // Using string for this because URL enforces a URL scheme at the beginning but Helm, ArgoCD, etc do not, and it can be counterproductive, + // as the only way I've found to get OCI working isn't by using oci:// but rather no scheme at all #[serde(rename = "repoURL")] pub repo_url: String, pub target_revision: Option, @@ -256,7 +258,6 @@ spec: #[cfg(test)] mod tests { use pretty_assertions::assert_eq; - use crate::modules::application::features::{ ArgoApplication, Automated, Backoff, Helm, Retry, Source, SyncPolicy, diff --git a/harmony/src/modules/application/features/monitoring.rs b/harmony/src/modules/application/features/monitoring.rs index 61429ea..fa7ac71 100644 --- a/harmony/src/modules/application/features/monitoring.rs +++ b/harmony/src/modules/application/features/monitoring.rs @@ -8,7 +8,6 @@ use crate::{ application::ApplicationFeature, monitoring::{ alert_channel::webhook_receiver::WebhookReceiver, - application_monitoring::k8s_application_monitoring_score::ApplicationPrometheusMonitoringScore, kube_prometheus::{ helm_prometheus_alert_score::HelmPrometheusAlertingScore, types::{NamespaceSelector, ServiceMonitor},