Skip to content

Commit

Permalink
Enable support for long paths during RCC setup
Browse files Browse the repository at this point in the history
CMK-15211
  • Loading branch information
jherbel committed Nov 17, 2023
1 parent 06b5410 commit 7948bac
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions v2/robotmk/src/bin/scheduler/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ impl WriteSection for SchedulerPhase {
#[derive(Serialize)]
pub struct RCCSetupFailures {
pub telemetry_disabling: Vec<String>,
pub long_path_support: Vec<String>,
pub shared_holotree: Vec<String>,
pub holotree_init: Vec<String>,
}
Expand Down
29 changes: 29 additions & 0 deletions v2/robotmk/src/bin/scheduler/setup/rcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn rcc_setup_working_directory(working_directory: &Utf8Path) -> Utf8PathBuf {
fn rcc_setup(global_config: &GlobalConfig, rcc_suites: Vec<Suite>) -> Result<Vec<Suite>> {
let mut rcc_setup_failures = RCCSetupFailures {
telemetry_disabling: vec![],
long_path_support: vec![],
shared_holotree: vec![],
holotree_init: vec![],
};
Expand All @@ -69,6 +70,19 @@ fn rcc_setup(global_config: &GlobalConfig, rcc_suites: Vec<Suite>) -> Result<Vec
);
}

debug!("Enabling support for long paths");
let (sucessful_suites, failed_suites) =
enable_long_path_support(global_config, sucessful_suites)
.context("Enabling support for long paths failed")?;
rcc_setup_failures.long_path_support =
failed_suites.into_iter().map(|suite| suite.name).collect();
if !rcc_setup_failures.long_path_support.is_empty() {
error!(
"Dropping the following suites due to long path support enabling failure: {}",
rcc_setup_failures.long_path_support.join(", ")
);
}

debug!("Initializing shared holotree");
let (sucessful_suites, failed_suites) = shared_holotree_init(global_config, sucessful_suites)
.context("Shared holotree initialization failed")?;
Expand Down Expand Up @@ -139,6 +153,21 @@ fn shared_holotree_init(
)
}

fn enable_long_path_support(
global_config: &GlobalConfig,
suites: Vec<Suite>,
) -> Result<(Vec<Suite>, Vec<Suite>)> {
run_command_spec_once_in_current_session(
global_config,
suites,
&CommandSpec {
executable: global_config.rcc_binary_path.to_string(),
arguments: vec!["configure".into(), "longpaths".into(), "--enable".into()],
},
"shared_holotree_init",
)
}

fn holotree_init(
global_config: &GlobalConfig,
suites: Vec<Suite>,
Expand Down

0 comments on commit 7948bac

Please sign in to comment.