diff --git a/bin/core/src/api/write/repo.rs b/bin/core/src/api/write/repo.rs index 904969776..41751f7b6 100644 --- a/bin/core/src/api/write/repo.rs +++ b/bin/core/src/api/write/repo.rs @@ -90,6 +90,11 @@ impl Resolve for State { ) .await?; + if repo.config.repo.is_empty() { + // Nothing to do + return Ok(NoData {}); + } + let config = core_config(); let repo_dir = config.repo_directory.join(random_string(10)); diff --git a/bin/core/src/helpers/sync/mod.rs b/bin/core/src/helpers/sync/mod.rs index 284c7db54..f64455736 100644 --- a/bin/core/src/helpers/sync/mod.rs +++ b/bin/core/src/helpers/sync/mod.rs @@ -11,11 +11,11 @@ use crate::{ }; // pub mod deployment; +pub mod deploy; pub mod remote; pub mod resource; pub mod user_groups; pub mod variables; -pub mod deploy; mod file; mod resources; @@ -47,6 +47,9 @@ async fn refresh_syncs() { return; }; for sync in syncs { + if sync.config.repo.is_empty() { + continue; + } State .resolve( RefreshResourceSyncPending { sync: sync.id }, diff --git a/bin/core/src/resource/repo.rs b/bin/core/src/resource/repo.rs index 01fcb7b0d..54b3e5b3f 100644 --- a/bin/core/src/resource/repo.rs +++ b/bin/core/src/resource/repo.rs @@ -195,7 +195,7 @@ pub async fn refresh_repo_state_cache() { } .await .inspect_err(|e| { - error!("failed to refresh repo state cache | {e:#}") + warn!("failed to refresh repo state cache | {e:#}") }); }