Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod committed Feb 7, 2025
1 parent e8c092c commit 957e0a2
Show file tree
Hide file tree
Showing 12 changed files with 304 additions and 118 deletions.
70 changes: 43 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ shlex = "1.3.0"
ssh2 = "0.9.4"
tar = "0.4.41"
tempfile = "3.12.0"
tes = { version = "0.3.0", features = ["client", "serde"] }
tes = { version = "0.4.0", features = ["client", "serde"] }
thiserror = "2.0.11"
tokio = { version = "1.40.0", features = ["full", "time", "tracing"] }
tokio-metrics = "0.3.1"
Expand Down
3 changes: 2 additions & 1 deletion crankshaft-config/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ impl Config {
self.defaults.as_ref()
}

/// Consumes `self` returns the constituent parts of the [`Config`].
/// Consumes `self` returns the constituent, owned parts of the
/// configuration.
pub fn into_parts(self) -> (String, Kind, usize, Option<Defaults>) {
(self.name, self.kind, self.max_tasks, self.defaults)
}
Expand Down
6 changes: 6 additions & 0 deletions crankshaft-config/src/backend/tes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ impl Config {
pub fn http(&self) -> &http::Config {
&self.http
}

/// Consumes `self` and returns the constituent, owned parts of the
/// configuration.
pub fn into_parts(self) -> (Url, http::Config) {
(self.url, self.http)
}
}
2 changes: 1 addition & 1 deletion crankshaft-engine/src/service/runner/backend/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl crate::Backend for Backend {
// (2) Upload inputs to the container.
//
// TODO(clay): these could be cached.
for task in task.inputs().cloned().map(|i| {
for task in task.inputs().map(|i| {
let container = container.clone();
tokio::spawn(async move {
let contents = i.fetch().await;
Expand Down
Loading

0 comments on commit 957e0a2

Please sign in to comment.