Skip to content

Commit 44b4245

Browse files
committed
Merge branch 'runner' into logging_patch
2 parents 9de08e1 + f9b53ba commit 44b4245

40 files changed

+1614
-107
lines changed

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
excessive-nesting-threshold = 4
1+
excessive-nesting-threshold = 6
22
too-many-arguments-threshold = 10
33
allowed-idents-below-min-chars = ["..", "k", "v", "f", "re", "id", "Ok", "'_"]

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install Rust + components
1818
uses: actions-rust-lang/setup-rust-toolchain@v1
1919
with:
20-
toolchain: 1.87
20+
toolchain: 1.89
2121
components: rustfmt,clippy
2222
- name: Install code coverage
2323
uses: taiki-e/install-action@cargo-llvm-cov

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
],
1010
"files.autoSave": "off",
1111
"files.insertFinalNewline": true,
12-
"gitlens.showWelcomeOnInstall": false,
1312
"gitlens.showWhatsNewAfterUpgrades": false,
1413
"lldb.consoleMode": "evaluate",
1514
"rust-analyzer.cargo.features": [

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ glob = "0.3.1"
5555
heck = "0.5.0"
5656
# convert bytes to hex strings
5757
hex = "0.4.3"
58+
hostname = "0.4.1"
5859
# hashmaps that preserve insertion order
5960
indexmap = { version = "2.9.0", features = ["serde"] }
6061
# utilities for iterables e.g. cartesian products

cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@
8080
"wasi",
8181
"patchelf",
8282
"itertools",
83-
"colinianking"
83+
"colinianking",
84+
"itertools",
85+
"pathset",
8486
],
8587
"useGitignore": false,
8688
"ignorePaths": [

src/core/crypto.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ pub fn hash_buffer(buffer: impl AsRef<[u8]>) -> String {
5050
///
5151
/// Will return error if unable to access file.
5252
pub fn hash_file(filepath: impl AsRef<Path>) -> Result<String> {
53-
hash_stream(
54-
&mut File::open(&filepath).context(selector::InvalidFilepath {
55-
path: filepath.as_ref(),
56-
})?,
57-
)
53+
hash_stream(&mut File::open(&filepath).context(selector::InvalidPath {
54+
path: filepath.as_ref(),
55+
})?)
5856
}
5957
/// Evaluate checksum hash of a directory.
6058
///
@@ -64,7 +62,10 @@ pub fn hash_file(filepath: impl AsRef<Path>) -> Result<String> {
6462
pub fn hash_dir(dirpath: impl AsRef<Path>) -> Result<String> {
6563
let summary: BTreeMap<String, String> = dirpath
6664
.as_ref()
67-
.read_dir()?
65+
.read_dir()
66+
.context(selector::InvalidPath {
67+
path: dirpath.as_ref(),
68+
})?
6869
.map(|path| {
6970
let access_path = path?.path();
7071
Ok((

src/core/error.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,14 @@ impl fmt::Debug for OrcaError {
124124
| Kind::FailedToStartPod { backtrace, .. }
125125
| Kind::FailedToExtractRunInfo { backtrace, .. }
126126
| Kind::IncompletePacket { backtrace, .. }
127-
| Kind::InvalidFilepath { backtrace, .. }
127+
| Kind::InvalidPath { backtrace, .. }
128+
| Kind::InvalidIndex { backtrace, .. }
129+
| Kind::KeyMissing { backtrace, .. }
128130
| Kind::MissingInfo { backtrace, .. }
131+
| Kind::FailedToGetPodJobOutput { backtrace, .. }
132+
| Kind::PodJobProcessingError { backtrace, .. }
133+
| Kind::PodJobSubmissionFailed { backtrace, .. }
134+
| Kind::UnexpectedPathType { backtrace, .. }
129135
| Kind::BollardError { backtrace, .. }
130136
| Kind::ChronoParseError { backtrace, .. }
131137
| Kind::DOTError { backtrace, .. }

src/core/graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::{
2-
core::{pipeline::PipelineNode, util::get},
2+
core::{model::pipeline::PipelineNode, util::get},
33
uniffi::{error::Result, model::pipeline::Kernel},
44
};
55
use dot_parser::ast::Graph as DOTGraph;
@@ -25,7 +25,7 @@ pub fn make_graph(
2525
let graph =
2626
DiGraph::<DotNodeWeight, DotAttrList>::from_dot_graph(DOTGraph::try_from(input_dot)?).map(
2727
|_, node| PipelineNode {
28-
name: node.id.clone(),
28+
id: node.id.clone(),
2929
kernel: get(&metadata, &node.id)
3030
.unwrap_or_else(|error| panic!("{error}"))
3131
.clone(),

src/core/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ macro_rules! inner_attr_to_each {
99

1010
pub(crate) mod error;
1111
pub(crate) mod graph;
12-
pub(crate) mod pipeline;
1312
pub(crate) mod store;
1413
pub(crate) mod util;
1514
pub(crate) mod validation;
@@ -20,6 +19,7 @@ inner_attr_to_each! {
2019
pub(crate) mod model;
2120
pub(crate) mod operator;
2221
pub(crate) mod orchestrator;
22+
pub(crate) mod pipeline_runner;
2323
}
2424

2525
#[cfg(feature = "test")]
@@ -35,6 +35,7 @@ inner_attr_to_each! {
3535
)]
3636
pub mod crypto;
3737
pub mod model;
38-
pub mod operator;
3938
pub mod orchestrator;
39+
pub mod pipeline_runner;
40+
pub mod operator;
4041
}

src/core/model/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ where
5757
sorted.serialize(serializer)
5858
}
5959

60+
pub mod pipeline;
6061
pub mod pod;

0 commit comments

Comments
 (0)