Allow Rerun from Last Failed Stage with Original Pipeline Definition
M
Mauve Jaguar
Problem
When using "Rerun from Last Failed Stage" in Harness CD pipelines, the system fetches the latest pipeline YAML from the configured branch rather than using the original pipeline version that was used during the failed execution. This creates non-deterministic behavior and false failures in incident recovery scenarios.
Current Behavior:
- Run pipeline with YAML commit aa → Test passes, Prod fails
- Pipeline updated to commit bb (adds new outputs/variables)
- "Rerun from Last Failed Stage" on original execution → Harness uses commit bb
- Result: Output/context mismatch causes false failures
Desired Behavior:
- "Rerun from Last Failed Stage" should use the original pipeline commit (aa) from the failed execution
- Ensures deterministic reruns and maintains pipeline context consistency
Use Case
This is critical for:
- Incident Recovery: Production support teams need reliable reruns without pipeline drift
- Debugging: Isolating whether failures are stage-related or due to pipeline changes
- Confidence: Reduced false positives when resuming failed stages
Related Context
There is an existing "Rerun Pipeline with Original Pipeline Definition" setting (Account Settings → Default Settings → Pipeline), but:
- It reruns the entire pipeline from the start, not from the failed stage
- This defeats the purpose of "Last Failed Stage" rerun for long-running multi-stage pipelines
- We need both capabilities: stage-level resumption + original definition pinning
Impact
- Non-deterministic pipeline behavior
- False failures due to pipeline definition drift
- Reduced reliability of rerun feature for production support workflows
Prior context: https://support.harness.io/hc/en-us/requests/121843
Log In