Skip to content

Commit 636dec4

Browse files
authored
Rollup merge of #161373 - JonathanBrouwer:ec2-local, r=Mark-Simulacrum
Allow running EC2 jobs locally The command ``` cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-x86_64-linux ``` Fails locally with the error "Only Linux jobs can be executed locally", which I think is not correct. The os is displayed as `ec2-x86_64ami-c8a.8xlarge-x64-linux-$github.run_id-$github.run_attempt`. This was my hack to fix it, but I'm not sure if the problem should be fixed here or whether the os string is wrong
2 parents 8abcab5 + f11d76f commit 636dec4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/ci/citool/src/jobs.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl Job {
4444
}
4545

4646
fn is_linux(&self) -> bool {
47-
self.os.contains("ubuntu")
47+
self.os.contains("ubuntu") || self.os.contains("linux")
4848
}
4949
}
5050

@@ -414,7 +414,10 @@ pub fn find_linux_job<'a>(jobs: &'a [Job], name: &str) -> anyhow::Result<&'a Job
414414
));
415415
};
416416
if !job.is_linux() {
417-
return Err(anyhow::anyhow!("Only Linux jobs can be executed locally"));
417+
return Err(anyhow::anyhow!(
418+
"Only Linux jobs can be executed locally, os `{}` is not linux",
419+
job.os
420+
));
418421
}
419422

420423
Ok(job)

0 commit comments

Comments
 (0)