Skip to content

Commit d2d797b

Browse files
authored
fix(orion): move get_manager() before scorpio config reads; remove eager mount enumeration (#2092)
- antares/warmup_dicfuse: call get_manager() before reading scorpio config accessors to avoid logging default values instead of loaded config - buck_controller: remove synchronous read_dir enumeration from get_build_targets debug block (expensive I/O on large repos) - .gitignore: add tools/ and .libra entries
1 parent cfdc7df commit d2d797b

5 files changed

Lines changed: 19 additions & 27 deletions

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,9 @@ orion-server/docker-compose.override.yml
6161
.buildx-cache
6262

6363
# Claude Code configuration and cache
64-
.claude
64+
.claude
65+
66+
tools/**
67+
68+
.libra
69+
.libraignore

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

orion/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "orion"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2024"
55

66
[[bin]]

orion/src/antares.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,21 +458,26 @@ Hint: set SCORPIO_CONFIG=/path/to/scorpio.toml or create /etc/scorpio/scorpio.to
458458
pub(crate) async fn warmup_dicfuse() -> Result<(), DynError> {
459459
tracing::info!("Initializing Antares Dicfuse during Orion startup");
460460

461-
// DEBUG: Log Dicfuse configuration
461+
// NOTE: do not read scorpio config accessors before `get_manager()`.
462+
// `get_manager()` is what calls `scorpiofs::util::config::init_config(...)`.
463+
// Reading accessors first would trigger scorpiofs' lazy DEFAULT_CONFIG
464+
// fallback, and any values logged here would be the built-in defaults
465+
// (e.g. base_url=http://localhost:8000) rather than the values from
466+
// the scorpio.toml that init_config is about to load.
467+
let manager = get_manager().await?;
468+
let manager_for_test_mount = Arc::clone(manager);
469+
let dicfuse = manager.dicfuse();
470+
462471
let workspace_path = scorpiofs::util::config::workspace();
463472
let base_url = scorpiofs::util::config::base_url();
464473
let store_path = scorpiofs::util::config::store_path();
465474
tracing::debug!(
466475
workspace = %workspace_path,
467476
base_url = %base_url,
468477
store_path = %store_path,
469-
"DEBUG: Dicfuse prewarm configuration"
478+
"Dicfuse prewarm configuration"
470479
);
471480

472-
let manager = get_manager().await?;
473-
let manager_for_test_mount = Arc::clone(manager);
474-
let dicfuse = manager.dicfuse();
475-
476481
dicfuse.start_import();
477482

478483
tokio::spawn(async move {

orion/src/buck_controller.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -588,24 +588,6 @@ async fn get_build_targets(
588588
"DEBUG: Buck2 get_build_targets paths"
589589
);
590590

591-
// DEBUG: Check mount_path contents
592-
if mount_path.exists() {
593-
match std::fs::read_dir(&mount_path) {
594-
Ok(entries) => {
595-
let dir_contents: Vec<_> = entries
596-
.filter_map(|e| e.ok())
597-
.map(|e| e.file_name().to_string_lossy().to_string())
598-
.collect();
599-
tracing::debug!(mount_path = %mount_path.display(), contents = ?dir_contents, "DEBUG: Mount path directory contents");
600-
}
601-
Err(e) => {
602-
tracing::warn!(mount_path = %mount_path.display(), error = %e, "DEBUG: Failed to read mount path");
603-
}
604-
}
605-
} else {
606-
tracing::warn!(mount_path = %mount_path.display(), "DEBUG: Mount path does not exist!");
607-
}
608-
609591
tracing::debug!("Analyzing changes {mega_changes:?}");
610592

611593
preheat_shallow(&mount_path, preheat_shallow_depth())?;

0 commit comments

Comments
 (0)