Skip to content

Commit

Permalink
log::debug and ignore on daemon usage in CI (#9237)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitropoulos authored Oct 9, 2024
1 parent a72f7d5 commit 278d24e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/turborepo-lib/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use miette::{Diagnostic, NamedSource, SourceSpan};
use serde::Deserialize;
use struct_iterable::Iterable;
use thiserror::Error;
use tracing::debug;
use turbo_json::TurboJsonReader;
use turbopath::{AbsoluteSystemPath, AbsoluteSystemPathBuf};
use turborepo_errors::TURBO_SITE;
Expand Down Expand Up @@ -329,6 +330,15 @@ impl ConfigurationOptions {
}

pub fn daemon(&self) -> Option<bool> {
// hardcode to off in CI
if turborepo_ci::is_ci() {
if Some(true) == self.daemon {
debug!("Ignoring daemon setting and disabling the daemon because we're in CI");
}

return Some(false);
}

self.daemon
}

Expand Down
4 changes: 4 additions & 0 deletions docs/repo-docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ Turborepo runs a background process to pre-calculate some expensive operations.
}
```

<Callout type="good-to-know">
When running in a CI environment the daemon is always disabled regardless of this setting.
</Callout>

### `envMode`

Default: `"strict"`
Expand Down

0 comments on commit 278d24e

Please sign in to comment.