From 836f86c04c8754ef9ee4b87f01ed758d4361b2c9 Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Fri, 11 Sep 2026 16:34:57 +0200 Subject: [PATCH] [CI] Fix Quick-checks flakiness: force unused_deps to run sequentially (#290536) ## Summary This pull request updates the quick checks pipeline to better handle checks that require a stable workspace, ensuring they run in the correct order and with appropriate isolation. The main changes involve introducing a new `requiresStableWorkspace` property, updating the partitioning logic for check execution, and adjusting the order of checks in the configuration file. (cherry picked from commit 7135bd59ca3cb8f5c1b8cfaa042c38af2eda647a) --- .buildkite/scripts/steps/checks/quick_checks.json | 5 +++-- src/dev/run_quick_checks.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.buildkite/scripts/steps/checks/quick_checks.json b/.buildkite/scripts/steps/checks/quick_checks.json index f96bde548761a..d829290a51a07 100644 --- a/.buildkite/scripts/steps/checks/quick_checks.json +++ b/.buildkite/scripts/steps/checks/quick_checks.json @@ -101,9 +101,10 @@ "mayChangeFiles": true }, { - "script": ".buildkite/scripts/steps/checks/unused_deps.sh" + "script": ".buildkite/scripts/steps/checks/unused_deps.sh", + "requiresStableWorkspace": true }, { "script": ".buildkite/scripts/steps/checks/jest_negative.sh" } -] \ No newline at end of file +] diff --git a/src/dev/run_quick_checks.ts b/src/dev/run_quick_checks.ts index a2291171e64cb..cc8f355ae023c 100644 --- a/src/dev/run_quick_checks.ts +++ b/src/dev/run_quick_checks.ts @@ -27,6 +27,7 @@ const MAX_ANNOTATION_OUTPUT_LINES = 50; interface QuickCheck { script: string; mayChangeFiles?: boolean; + requiresStableWorkspace?: boolean; // Additional properties can be added here in the future } @@ -74,20 +75,19 @@ void run(async ({ log, flagsReader }) => { checks: flagsReader.string('checks'), }); - // Partition checks based on mayChangeFiles flag - const fileChangingChecks = checksToRun - .filter((check) => check.mayChangeFiles) + const workspaceExclusiveChecks = checksToRun + .filter((check) => check.mayChangeFiles || check.requiresStableWorkspace) .map((check) => (isAbsolute(check.script) ? check.script : join(REPO_ROOT, check.script))); const regularChecks = checksToRun - .filter((check) => !check.mayChangeFiles) + .filter((check) => !check.mayChangeFiles && !check.requiresStableWorkspace) .map((check) => (isAbsolute(check.script) ? check.script : join(REPO_ROOT, check.script))); logger.write( - `--- Running ${checksToRun.length} checks (${fileChangingChecks.length} file-changing with parallelism=1, ${regularChecks.length} regular with parallelism=${MAX_PARALLELISM})...` + `--- Running ${checksToRun.length} checks (${workspaceExclusiveChecks.length} workspace-exclusive with parallelism=1, ${regularChecks.length} regular with parallelism=${MAX_PARALLELISM})...` ); const startTime = Date.now(); - const results = await runPartitionedChecks(fileChangingChecks, regularChecks); + const results = await runPartitionedChecks(workspaceExclusiveChecks, regularChecks); logger.write('--- All checks finished.'); printResults(startTime, results);