Skip to content

Commit

Permalink
Less CI on buck2 test changes
Browse files Browse the repository at this point in the history
Summary: See https://fb.workplace.com/groups/td.users/permalink/3358078197821509/ for context, mostly won't restate myself here

Reviewed By: ndmitchell

Differential Revision: D58879679

fbshipit-source-id: 26758b095f7591efa1cf585d15599ffc4619ecae
  • Loading branch information
JakobDegen authored and facebook-github-bot committed Jun 21, 2024
1 parent a1e049f commit df8792c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions btd/src/buck/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ pub fn is_buck_deployment(path: &CellPath) -> bool {
pub fn is_buckconfig_change(path: &CellPath) -> bool {
let ext = path.extension();
let str = path.as_str();
// Don't treat changes to buck2 tests as buckconfig changes, otherwise we run way too much CI on
// these
if str.contains("buck2/tests") {
return false;
}
ext == Some("buckconfig")
|| str.starts_with("fbsource//tools/buckconfigs/")
|| (ext.is_none()
Expand Down Expand Up @@ -82,5 +87,8 @@ mod tests {
assert!(is_buckconfig_change(&CellPath::new(
"fbsource//.buckconfig"
)));
assert!(!is_buckconfig_change(&CellPath::new(
"fbcode//buck2/tests/foo_data/.buckconfig"
)));
}
}

0 comments on commit df8792c

Please sign in to comment.