Skip to content

Commit da8b775

Browse files
committed
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
1 parent 3f3e848 commit da8b775

5 files changed

Lines changed: 25 additions & 1 deletion

File tree

.github/actions/setup-build-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ runs:
3838
version: "0.8.9"
3939

4040
- name: Install Python versions for tests
41-
run: make install-pythons
41+
run: make install-pythons-test
4242
shell: bash
4343

4444
- name: Install ruff (Python linter and formatter)

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ checks: tidy ws links
7474
install-pythons:
7575
uv python install 3.9 3.10 3.11 3.12 3.13
7676

77+
# Subset of Python versions needed for unit + acceptance tests in CI.
78+
# 3.13 is already provided by actions/setup-python; 3.10 is the default for
79+
# acceptance bundle tests (see acceptance/bundle/test.toml). Integration and
80+
# scheduled runs still use `install-pythons` to cover the full matrix.
81+
.PHONY: install-pythons-test
82+
install-pythons-test:
83+
uv python install 3.10
84+
7785
.PHONY: test
7886
test: test-unit test-acc
7987

acceptance/bundle/invariant/continue_293/test.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ EnvMatrixExclude.no_vector_search_endpoint = ["INPUT_CONFIG=vector_search_endpoi
1111

1212
# Dotted pipeline configuration keys are not supported on v0.293.0
1313
EnvMatrixExclude.no_pipeline_config_dots = ["INPUT_CONFIG=pipeline_config_dots.yml.tmpl"]
14+
15+
# The 1000-task scale case is covered by no_drift. Running it here adds ~1.5 min
16+
# per variant (two full deploys at 1000 tasks) without incremental coverage.
17+
EnvMatrixExclude.no_pydabs_1000_tasks = ["INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl"]

acceptance/bundle/invariant/migrate/test.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ EnvMatrixExclude.no_grant_ref = ["INPUT_CONFIG=schema_grant_ref.yml.tmpl"]
1919

2020
# SQL warehouses currently failing with migration with permanent drift. TODO: fix this.
2121
EnvMatrixExclude.no_sql_warehouse = ["INPUT_CONFIG=sql_warehouse.yml.tmpl"]
22+
23+
# The 1000-task scale case is covered by no_drift. Running it here adds ~1.5 min
24+
# per variant (deploy + migrate + plan at 1000 tasks) without incremental coverage.
25+
EnvMatrixExclude.no_pydabs_1000_tasks = ["INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl"]

libs/patchwheel/patch_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ func TestPatchWheel(t *testing.T) {
145145
for _, py := range pythonVersions {
146146
t.Run(py, func(t *testing.T) {
147147
t.Parallel()
148+
149+
// Skip if the interpreter is not available via uv. CI only installs
150+
// a subset of versions to keep setup fast; the full matrix is
151+
// exercised in integration and scheduled runs.
152+
if err := exec.Command("uv", "python", "find", py).Run(); err != nil {
153+
t.Skipf("%s not available: %v", py, err)
154+
}
155+
148156
tempDir := t.TempDir()
149157

150158
projFiles := minimalPythonProject()

0 commit comments

Comments
 (0)