Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enrich MissingDigest errors when we fail to recover from them #16008

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/rust/engine/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::time::Duration;

use crate::intrinsics::Intrinsics;
use crate::nodes::{ExecuteProcess, NodeKey, NodeOutput, NodeResult, WrappedNode};
use crate::python::Failure;
use crate::python::{throw, Failure};
use crate::session::{Session, Sessions};
use crate::tasks::{Rule, Tasks};
use crate::types::Types;
Expand Down Expand Up @@ -720,7 +720,11 @@ impl Context {

if candidate_roots.is_empty() {
// We did not identify any roots to invalidate: allow the Node to fail.
return result;
return result.map_err(|e| {
throw(format!(
"Could not identify a process to backtrack to for: {e}"
))
});
}

// Attempt to trigger backtrack attempts for the matched Nodes. It's possible that we are not
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ impl fmt::Display for Failure {
match self {
Failure::Invalidated => write!(f, "Giving up on retrying due to changed files."),
Failure::MissingDigest(s, d) => {
write!(f, "Could not recover from missing digest: {s}: {d:?}")
write!(f, "Missing digest: {s}: {d:?}")
}
Failure::Throw { val, .. } => {
let repr = Python::with_gil(|py| {
Expand Down