From da8b7754ccf413dea47ebc19ea751b5c33061de2 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 14:07:42 +0200 Subject: [PATCH 1/2] ci: trim PR/merge-queue test time Two low-risk cuts targeting the dominant costs in PR test wall-clock: 1. Exclude `job_pydabs_1000_tasks` from the `migrate` and `continue_293` invariant tests. The 1000-task scale case is still exercised by `no_drift`; running the same scale in two additional variants added ~3 minutes per linux/direct test job without incremental coverage. 2. Add `install-pythons-test` Makefile target that installs only the Python version actually needed by unit + acceptance tests (3.10), and switch the setup-build-environment composite action to use it. The `patchwheel` unit test now skips versions not available via `uv python find`, so CI can install a subset without failing. Integration runs keep using `install-pythons` for the full 3.9-3.13 matrix. Expected impact: linux/direct ~10min -> ~3-4min, windows/* ~3min off setup. Co-authored-by: Isaac --- .github/actions/setup-build-environment/action.yml | 2 +- Makefile | 8 ++++++++ acceptance/bundle/invariant/continue_293/test.toml | 4 ++++ acceptance/bundle/invariant/migrate/test.toml | 4 ++++ libs/patchwheel/patch_test.go | 8 ++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 62d9bd66f1..134bbc0a61 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -38,7 +38,7 @@ runs: version: "0.8.9" - name: Install Python versions for tests - run: make install-pythons + run: make install-pythons-test shell: bash - name: Install ruff (Python linter and formatter) diff --git a/Makefile b/Makefile index c763496ceb..54acd3540b 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,14 @@ checks: tidy ws links install-pythons: uv python install 3.9 3.10 3.11 3.12 3.13 +# Subset of Python versions needed for unit + acceptance tests in CI. +# 3.13 is already provided by actions/setup-python; 3.10 is the default for +# acceptance bundle tests (see acceptance/bundle/test.toml). Integration and +# scheduled runs still use `install-pythons` to cover the full matrix. +.PHONY: install-pythons-test +install-pythons-test: + uv python install 3.10 + .PHONY: test test: test-unit test-acc diff --git a/acceptance/bundle/invariant/continue_293/test.toml b/acceptance/bundle/invariant/continue_293/test.toml index 91c45e0dd7..2afbcbf5e3 100644 --- a/acceptance/bundle/invariant/continue_293/test.toml +++ b/acceptance/bundle/invariant/continue_293/test.toml @@ -11,3 +11,7 @@ EnvMatrixExclude.no_vector_search_endpoint = ["INPUT_CONFIG=vector_search_endpoi # Dotted pipeline configuration keys are not supported on v0.293.0 EnvMatrixExclude.no_pipeline_config_dots = ["INPUT_CONFIG=pipeline_config_dots.yml.tmpl"] + +# The 1000-task scale case is covered by no_drift. Running it here adds ~1.5 min +# per variant (two full deploys at 1000 tasks) without incremental coverage. +EnvMatrixExclude.no_pydabs_1000_tasks = ["INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl"] diff --git a/acceptance/bundle/invariant/migrate/test.toml b/acceptance/bundle/invariant/migrate/test.toml index adc49c2992..240a32d5d4 100644 --- a/acceptance/bundle/invariant/migrate/test.toml +++ b/acceptance/bundle/invariant/migrate/test.toml @@ -19,3 +19,7 @@ EnvMatrixExclude.no_grant_ref = ["INPUT_CONFIG=schema_grant_ref.yml.tmpl"] # SQL warehouses currently failing with migration with permanent drift. TODO: fix this. EnvMatrixExclude.no_sql_warehouse = ["INPUT_CONFIG=sql_warehouse.yml.tmpl"] + +# The 1000-task scale case is covered by no_drift. Running it here adds ~1.5 min +# per variant (deploy + migrate + plan at 1000 tasks) without incremental coverage. +EnvMatrixExclude.no_pydabs_1000_tasks = ["INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl"] diff --git a/libs/patchwheel/patch_test.go b/libs/patchwheel/patch_test.go index e5a2ef9792..667a324626 100644 --- a/libs/patchwheel/patch_test.go +++ b/libs/patchwheel/patch_test.go @@ -145,6 +145,14 @@ func TestPatchWheel(t *testing.T) { for _, py := range pythonVersions { t.Run(py, func(t *testing.T) { t.Parallel() + + // Skip if the interpreter is not available via uv. CI only installs + // a subset of versions to keep setup fast; the full matrix is + // exercised in integration and scheduled runs. + if err := exec.Command("uv", "python", "find", py).Run(); err != nil { + t.Skipf("%s not available: %v", py, err) + } + tempDir := t.TempDir() projFiles := minimalPythonProject() From 17773bf0e3bcdff3574ba48b595d6bcbc5a4d03c Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 22 Apr 2026 14:39:04 +0200 Subject: [PATCH 2/2] Revert install-pythons trim The test server (libs/testserver/jobs.go:531) maps a task's spark_version to a Python version (DBR 12 -> 3.9, 13 -> 3.10, 15 -> 3.11, >=16 -> 3.12) and calls `uv venv --python ` at runtime. Acceptance tests using DBR 12.2 (integration_whl/wrapper*) or EnvMatrix on UV_PYTHON (templates/ default-python/integration_classic) therefore require those versions to be installed. Measured on the prior CI run: installing only 3.10 took ~6.7s on Windows, vs an estimated 30-60s for all five. Not worth breaking tests. The real Windows setup cost is Setup Go (2m49s cache restore), which is a different problem. Keeping the pydabs_1000_tasks invariant exclusion from the prior commit; linux/direct is now ~4m18s including reruns, under the <5 min target. Co-authored-by: Isaac --- .github/actions/setup-build-environment/action.yml | 2 +- Makefile | 8 -------- libs/patchwheel/patch_test.go | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 134bbc0a61..62d9bd66f1 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -38,7 +38,7 @@ runs: version: "0.8.9" - name: Install Python versions for tests - run: make install-pythons-test + run: make install-pythons shell: bash - name: Install ruff (Python linter and formatter) diff --git a/Makefile b/Makefile index 54acd3540b..c763496ceb 100644 --- a/Makefile +++ b/Makefile @@ -74,14 +74,6 @@ checks: tidy ws links install-pythons: uv python install 3.9 3.10 3.11 3.12 3.13 -# Subset of Python versions needed for unit + acceptance tests in CI. -# 3.13 is already provided by actions/setup-python; 3.10 is the default for -# acceptance bundle tests (see acceptance/bundle/test.toml). Integration and -# scheduled runs still use `install-pythons` to cover the full matrix. -.PHONY: install-pythons-test -install-pythons-test: - uv python install 3.10 - .PHONY: test test: test-unit test-acc diff --git a/libs/patchwheel/patch_test.go b/libs/patchwheel/patch_test.go index 667a324626..e5a2ef9792 100644 --- a/libs/patchwheel/patch_test.go +++ b/libs/patchwheel/patch_test.go @@ -145,14 +145,6 @@ func TestPatchWheel(t *testing.T) { for _, py := range pythonVersions { t.Run(py, func(t *testing.T) { t.Parallel() - - // Skip if the interpreter is not available via uv. CI only installs - // a subset of versions to keep setup fast; the full matrix is - // exercised in integration and scheduled runs. - if err := exec.Command("uv", "python", "find", py).Run(); err != nil { - t.Skipf("%s not available: %v", py, err) - } - tempDir := t.TempDir() projFiles := minimalPythonProject()