phase 2 - fix delegation problems
This commit is contained in:
parent
a5ad099951
commit
922c39f851
1 changed files with 17 additions and 3 deletions
|
|
@ -379,17 +379,31 @@ async fn plan(
|
|||
}
|
||||
}
|
||||
|
||||
if !nodes.is_empty() {
|
||||
info!("Planning complete: created graph with {} nodes for {} output refs", nodes.len(), output_refs.len());
|
||||
// Check if we have delegated partitions that explain why we have no nodes
|
||||
let all_partitions_delegated = nodes.is_empty() &&
|
||||
output_refs.iter().all(|ref_str| _delegated_refs.contains(ref_str));
|
||||
|
||||
if !nodes.is_empty() || all_partitions_delegated {
|
||||
if all_partitions_delegated {
|
||||
info!("Planning complete: all {} partitions delegated to other builds", output_refs.len());
|
||||
} else {
|
||||
info!("Planning complete: created graph with {} nodes for {} output refs", nodes.len(), output_refs.len());
|
||||
}
|
||||
|
||||
// Log planning completion
|
||||
if let Some(ref event_log) = build_event_log {
|
||||
let message = if all_partitions_delegated {
|
||||
format!("Analysis completed - all {} partitions delegated to active builds", output_refs.len())
|
||||
} else {
|
||||
format!("Analysis completed with {} jobs", nodes.len())
|
||||
};
|
||||
|
||||
let event = create_build_event(
|
||||
build_request_id.to_string(),
|
||||
crate::build_event::EventType::BuildRequestEvent(BuildRequestEvent {
|
||||
status: BuildRequestStatus::BuildRequestCompleted as i32,
|
||||
requested_partitions: output_refs.iter().map(|s| PartitionRef { str: s.clone() }).collect(),
|
||||
message: format!("Analysis completed with {} jobs", nodes.len()),
|
||||
message,
|
||||
})
|
||||
);
|
||||
if let Err(e) = event_log.append_event(event).await {
|
||||
|
|
|
|||
Loading…
Reference in a new issue