From 237c904c37fb5e38c3fc150dd4348a12f4fdfc9b Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Tue, 8 Oct 2024 18:43:25 -0400 Subject: [PATCH 1/5] don't run daemon on CI --- crates/turborepo-lib/src/config/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/turborepo-lib/src/config/mod.rs b/crates/turborepo-lib/src/config/mod.rs index 1c35949bbef33..e74e713909c4b 100644 --- a/crates/turborepo-lib/src/config/mod.rs +++ b/crates/turborepo-lib/src/config/mod.rs @@ -329,6 +329,11 @@ impl ConfigurationOptions { } pub fn daemon(&self) -> Option { + // hardcode to off in CI + if turborepo_ci::is_ci() { + return Some(false); + } + self.daemon } From da1b35b96bf3d66c131635c177d402e4f3a0d701 Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Wed, 9 Oct 2024 10:02:34 -0400 Subject: [PATCH 2/5] warn if running on CI --- crates/turborepo-lib/src/config/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/turborepo-lib/src/config/mod.rs b/crates/turborepo-lib/src/config/mod.rs index e74e713909c4b..86c01f09bca39 100644 --- a/crates/turborepo-lib/src/config/mod.rs +++ b/crates/turborepo-lib/src/config/mod.rs @@ -14,6 +14,7 @@ use miette::{Diagnostic, NamedSource, SourceSpan}; use serde::Deserialize; use struct_iterable::Iterable; use thiserror::Error; +use tracing::warn; use turbo_json::TurboJsonReader; use turbopath::{AbsoluteSystemPath, AbsoluteSystemPathBuf}; use turborepo_errors::TURBO_SITE; @@ -331,6 +332,10 @@ impl ConfigurationOptions { pub fn daemon(&self) -> Option { // hardcode to off in CI if turborepo_ci::is_ci() { + if Some(true) == self.daemon { + warn!("Ignoring daemon setting and disabling the daemon because we're in CI"); + } + return Some(false); } From af9e797f3a0f6aa915be42a881f02f85cc5d47d3 Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Wed, 9 Oct 2024 13:32:49 -0400 Subject: [PATCH 3/5] updates docs --- docs/repo-docs/reference/configuration.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/repo-docs/reference/configuration.mdx b/docs/repo-docs/reference/configuration.mdx index ab49e577a302a..fdab61dd3c859 100644 --- a/docs/repo-docs/reference/configuration.mdx +++ b/docs/repo-docs/reference/configuration.mdx @@ -141,6 +141,12 @@ Turborepo runs a background process to pre-calculate some expensive operations. } ``` + + Note that when running in a CI environment the daemon is disabled, even if you + set this value to `true`. This is because the daemon is not useful in a CI + environment and can cause timing out on deploys. + + ### `envMode` Default: `"strict"` From e38237913cf759f37471b11091cf009d39486e7b Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Wed, 9 Oct 2024 14:11:33 -0400 Subject: [PATCH 4/5] Update docs/repo-docs/reference/configuration.mdx Co-authored-by: Thomas Knickman --- docs/repo-docs/reference/configuration.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/repo-docs/reference/configuration.mdx b/docs/repo-docs/reference/configuration.mdx index fdab61dd3c859..e441112d01f99 100644 --- a/docs/repo-docs/reference/configuration.mdx +++ b/docs/repo-docs/reference/configuration.mdx @@ -142,9 +142,7 @@ Turborepo runs a background process to pre-calculate some expensive operations. ``` - Note that when running in a CI environment the daemon is disabled, even if you - set this value to `true`. This is because the daemon is not useful in a CI - environment and can cause timing out on deploys. + When running in a CI environment the daemon is always disabled regardless of this setting. ### `envMode` From 5c9f0d8d5906eb0b777348fcb2f6df2aa0f5ea49 Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Wed, 9 Oct 2024 14:14:23 -0400 Subject: [PATCH 5/5] use debug instead of warn --- crates/turborepo-lib/src/config/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/turborepo-lib/src/config/mod.rs b/crates/turborepo-lib/src/config/mod.rs index 86c01f09bca39..0e1ae724956e8 100644 --- a/crates/turborepo-lib/src/config/mod.rs +++ b/crates/turborepo-lib/src/config/mod.rs @@ -14,7 +14,7 @@ use miette::{Diagnostic, NamedSource, SourceSpan}; use serde::Deserialize; use struct_iterable::Iterable; use thiserror::Error; -use tracing::warn; +use tracing::debug; use turbo_json::TurboJsonReader; use turbopath::{AbsoluteSystemPath, AbsoluteSystemPathBuf}; use turborepo_errors::TURBO_SITE; @@ -333,7 +333,7 @@ impl ConfigurationOptions { // hardcode to off in CI if turborepo_ci::is_ci() { if Some(true) == self.daemon { - warn!("Ignoring daemon setting and disabling the daemon because we're in CI"); + debug!("Ignoring daemon setting and disabling the daemon because we're in CI"); } return Some(false);