Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log::debug and ignore on daemon usage in CI #9237

Merged
merged 6 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading