From 14c55eb127ba2219a05bed7a8cb9d8fb4bf3a0f6 Mon Sep 17 00:00:00 2001 From: Reef Date: Thu, 5 Feb 2026 00:42:59 +0000 Subject: [PATCH 1/2] Fix needs resolution across stages (approval jobs) --- src/orchestrator/dag.rs | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/orchestrator/dag.rs b/src/orchestrator/dag.rs index 3ef065f..6873ae9 100644 --- a/src/orchestrator/dag.rs +++ b/src/orchestrator/dag.rs @@ -87,22 +87,17 @@ impl JobDAG { continue; } - // Match base job ID (scoped to same stage if prefixing active) + // Match base job ID (the job_id from split config) + // NOTE: This must work across stages. When stage prefixing is enabled, the + // *generated* instance IDs are stage-scoped, but the job_id is still the + // canonical identifier users reference in `needs` (e.g. "build/build_app_image"). + // + // We intentionally add *all* concrete instances that share this job_id + // (e.g. matrix-expanded jobs). if &candidate.job_id == needed_job_id { - if should_prefix(&concrete_job.stage, wf_config) - && should_prefix(&candidate.stage, wf_config) - { - if concrete_job.stage == candidate.stage { - new_needs.insert(candidate_id.clone()); - graph.update_edge(node_map[candidate_id], dependent_node, ()); - found_match = true; - } - } else { - // Global match (e.g. no stage prefixing) - new_needs.insert(candidate_id.clone()); - graph.update_edge(node_map[candidate_id], dependent_node, ()); - found_match = true; - } + new_needs.insert(candidate_id.clone()); + graph.update_edge(node_map[candidate_id], dependent_node, ()); + found_match = true; } } if !found_match { From e2522a8026f348239c9f0e688070984324cc979c Mon Sep 17 00:00:00 2001 From: Reef Date: Thu, 5 Feb 2026 01:42:54 +0000 Subject: [PATCH 2/2] Add Woodpecker CI pipeline --- .woodpecker.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..efb00b2 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,38 @@ +# Woodpecker CI Pipeline for CIGen + +when: + - event: [push, pull_request] + branch: main + +steps: + install-deps: + image: rust:1.85 + commands: + - apt-get update + - apt-get install -y nodejs npm protobuf-compiler + + fmt: + image: rust:1.85 + commands: + - apt-get update + - apt-get install -y protobuf-compiler + - rustup component add rustfmt + - cargo fmt -- --check + depends_on: [install-deps] + + clippy: + image: rust:1.85 + commands: + - apt-get update + - apt-get install -y protobuf-compiler + - rustup component add clippy + - cargo clippy --all-targets --all-features -- -D warnings + depends_on: [install-deps] + + test: + image: rust:1.85 + commands: + - apt-get update + - apt-get install -y protobuf-compiler + - cargo test + depends_on: [install-deps]