From a5f32c001a0904b1d7ab35e6b9bddf79f5f0f9b5 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Wed, 27 Nov 2024 15:54:21 -0800 Subject: [PATCH] fix: Check against deep dependencies. --- CHANGELOG.md | 2 ++ crates/action/src/action_node.rs | 2 -- crates/app/src/commands/ci.rs | 2 +- crates/app/src/commands/run.rs | 2 +- crates/task-hasher/src/task_hasher.rs | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62803d905c..b7ce2075b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ - Fixed a Git "fatal: bad object" error when submodules are in being used. - Fixed an issue where `moon ci` would trigger a shallow checkout error, even when a base revision is provided. +- Fixed an issue were changes in a non-direct dependency would not mark a deep dependent as + affected. ## 1.30.0 diff --git a/crates/action/src/action_node.rs b/crates/action/src/action_node.rs index 310d771a3b..c327d52971 100644 --- a/crates/action/src/action_node.rs +++ b/crates/action/src/action_node.rs @@ -59,8 +59,6 @@ impl RunTaskNode { } self.id = Some(hasher.finish()); - - dbg!(self.target.as_str(), self.id.as_ref()); } } diff --git a/crates/app/src/commands/ci.rs b/crates/app/src/commands/ci.rs index 7825522618..47e4d12118 100644 --- a/crates/app/src/commands/ci.rs +++ b/crates/app/src/commands/ci.rs @@ -214,7 +214,7 @@ async fn generate_action_graph( let mut action_graph_builder = session.build_action_graph(workspace_graph).await?; action_graph_builder.set_touched_files(touched_files)?; - action_graph_builder.set_affected_scopes(UpstreamScope::Direct, DownstreamScope::Deep)?; + action_graph_builder.set_affected_scopes(UpstreamScope::Deep, DownstreamScope::Deep)?; // Run dependents to ensure consumers still work correctly action_graph_builder.run_from_requirements(RunRequirements { diff --git a/crates/app/src/commands/run.rs b/crates/app/src/commands/run.rs index 9c293864c6..8296f6393a 100644 --- a/crates/app/src/commands/run.rs +++ b/crates/app/src/commands/run.rs @@ -153,7 +153,7 @@ pub async fn run_target( if should_run_affected { action_graph_builder.set_touched_files(&touched_files)?; action_graph_builder.set_affected_scopes( - UpstreamScope::Direct, + UpstreamScope::Deep, if args.dependents { DownstreamScope::Direct } else { diff --git a/crates/task-hasher/src/task_hasher.rs b/crates/task-hasher/src/task_hasher.rs index 60605115f8..c87b4cfd54 100644 --- a/crates/task-hasher/src/task_hasher.rs +++ b/crates/task-hasher/src/task_hasher.rs @@ -11,7 +11,7 @@ use starbase_utils::glob::{self, GlobSet}; use std::collections::BTreeMap; use std::env; use std::path::{Path, PathBuf}; -use tracing::{debug, warn}; +use tracing::{trace, warn}; // Hash all inputs for a task, but exclude outputs and moon specific configuration files! pub struct TaskHasher<'task> { @@ -226,7 +226,7 @@ impl<'task> TaskHasher<'task> { } if ignore.is_match(path) { - debug!( + trace!( "Not hashing input {} as it matches an ignore pattern", color::rel_path(&rel_path), );