From a95a60cfe57557194c4417dd822ed645f7a9ca42 Mon Sep 17 00:00:00 2001 From: Louie Weng <56288712+lourw@users.noreply.github.com> Date: Fri, 7 Mar 2025 12:11:55 -0800 Subject: [PATCH] chore(repo): use parallelism on assignment rules (#30196) ## Current Behavior Currently we set the parallelism at the DTE level and it applies to all tasks executed for that DTE. ## Expected Behavior We can set parallelism on our assignment rules and dynamically set the parallelism of tasks as they are being scheduled. ## Related Issue(s) Fixes # --- .github/workflows/ci.yml | 2 +- .nx/workflows/dynamic-changesets.yaml | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d8c76015f..9b32d15a40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners --parallel=1 --no-dte & pids+=($!) - pnpm nx affected --targets=lint,test,build,e2e,e2e-ci --base=$NX_BASE --head=$NX_HEAD --parallel=3 & + pnpm nx affected --targets=lint,test,build,e2e,e2e-ci --base=$NX_BASE --head=$NX_HEAD & pids+=($!) for pid in "${pids[@]}"; do diff --git a/.nx/workflows/dynamic-changesets.yaml b/.nx/workflows/dynamic-changesets.yaml index 19da384976..a8b9cbdcee 100644 --- a/.nx/workflows/dynamic-changesets.yaml +++ b/.nx/workflows/dynamic-changesets.yaml @@ -7,8 +7,16 @@ assignment-rules: - build* run-on: - agent: linux-extra-large + parallelism: 1 + + - targets: + - lint + run-on: + - agent: linux-medium + parallelism: 6 - targets: - '*' run-on: - - agent: linux-medium \ No newline at end of file + - agent: linux-medium + parallelism: 3