Skip to content

Commit 4bc377b

Browse files
committed
refactor: remove orchestrator/graph.rs re-export shim
Import hm_pipeline_ir types directly instead of going through a one-line re-export module.
1 parent 8225be5 commit 4bc377b

5 files changed

Lines changed: 9 additions & 10 deletions

File tree

crates/hm/src/orchestrator/graph.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

crates/hm/src/orchestrator/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub mod cache;
1111
pub mod docker_client;
1212
pub mod docker_host_fns;
1313
pub mod events;
14-
pub mod graph;
1514
pub mod output_subscriber;
1615
pub mod scheduler;
1716
pub mod source;

crates/hm/src/orchestrator/scheduler.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ use hm_plugin_protocol::{
4343
use tokio::sync::Mutex;
4444
use uuid::Uuid;
4545

46+
use hm_pipeline_ir::{EdgeKind, PipelineGraph, Transition};
47+
4648
use crate::error::HmError;
4749
use crate::orchestrator::docker_client::DockerClient;
48-
use crate::orchestrator::graph::{EdgeKind, Transition};
4950
use crate::orchestrator::source::build_archive_bytes;
5051
use crate::plugin::{PluginRegistry, RegistryConfig};
5152

@@ -73,7 +74,7 @@ type StepFuture = futures::future::Shared<BoxFuture<'static, StepOutcome>>;
7374
/// scheduler-level failure occurs. Non-zero step exit codes are
7475
/// surfaced via the returned `i32`, not as an Err.
7576
pub async fn run(
76-
graph: crate::orchestrator::graph::Graph,
77+
graph: PipelineGraph,
7778
repo_root: PathBuf,
7879
parallelism: usize,
7980
format_name: String,

crates/hm/tests/default_image_inheritance.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
)]
1515

1616
use daggy::petgraph::visit::IntoNodeReferences;
17-
use harmont_cli::orchestrator::graph::Graph;
17+
use hm_pipeline_ir::PipelineGraph;
1818

19-
fn decode(json: &[u8]) -> Graph {
20-
serde_json::from_slice::<Graph>(json).unwrap()
19+
fn decode(json: &[u8]) -> PipelineGraph {
20+
serde_json::from_slice::<PipelineGraph>(json).unwrap()
2121
}
2222

23-
fn find_step<'a>(g: &'a Graph, key: &str) -> &'a hm_pipeline_ir::CommandStep {
23+
fn find_step<'a>(g: &'a PipelineGraph, key: &str) -> &'a hm_pipeline_ir::CommandStep {
2424
let dag = g.dag();
2525
let (_, t) = dag.graph().node_references()
2626
.find(|(_, t)| t.step.key == key)

crates/hm/tests/runner_dispatch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use std::collections::BTreeMap;
3939
use daggy::petgraph::visit::IntoNodeReferences;
4040

4141
use common::fixtures;
42-
use harmont_cli::orchestrator::graph::Graph;
42+
use hm_pipeline_ir::PipelineGraph;
4343
use harmont_cli::plugin::{PluginRegistry, RegistryConfig};
4444
use hm_plugin_protocol::{ArchiveId, CacheDecision, ExecutorInput, StepResult};
4545
use uuid::Uuid;
@@ -85,7 +85,7 @@ async fn runner_field_dispatches_to_named_plugin() {
8585
.expect("load registry");
8686

8787
// 2. Deserialize the graph directly from JSON — the new wire format.
88-
let graph: Graph = serde_json::from_slice(PIPELINE_JSON).expect("parse graph");
88+
let graph: PipelineGraph = serde_json::from_slice(PIPELINE_JSON).expect("parse graph");
8989

9090
// Sanity check: the graph must preserve `runner` from the IR.
9191
// This is the cheap fast-fail; the dispatch check below is the

0 commit comments

Comments
 (0)