Skip to content

acc: replace DATABRICKS_TEST_SKIPLOCAL with DATABRICKS_TEST_SELECT_CHANGED=N - #6248

Open
denik wants to merge 21 commits into
mainfrom
denik/skiplocal-withchanged
Open

acc: replace DATABRICKS_TEST_SKIPLOCAL with DATABRICKS_TEST_SELECT_CHANGED=N#6248
denik wants to merge 21 commits into
mainfrom
denik/skiplocal-withchanged

Conversation

@denik

@denik denik commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Changes

  • DATABRICKS_TEST_SKIPLOCAL=withchanged becomes DATABRICKS_TEST_SELECT_CHANGED=N, where N is the number of changed tests to select (was hardcoded at 50).
  • The selection moved to acceptance/internal/selection, with a command to inspect what a change would run: go run ./acceptance/internal/selection/cmd [path...]. acceptance/selftest/selection records its output for the typical kinds of change.
  • Tests are scored, and the scores add up: new test 5, changed fixture 5, changed out* file 1, move 1. A regenerated golden lands on hundreds of dirs at once, so it must not crowd out the tests the branch actually edits.
  • Filters naming the same env var are now alternatives rather than requirements: two changed invariant configs run the variants of both, where before every variant skipped and those tests ran nothing.
  • Unselected tests are dropped rather than skipped one by one, and the selection is logged at startup, including how many changed tests did not fit the limit.
  • integration-short-skiplocal is renamed to cloud-select and kept as an alias, since that is the name the eng-dev-ecosystem CI job dispatches.
  • New ./task local-select runs the same selection locally against the testserver.

Why

"skiplocal" stopped meaning anything after #6196 dropped the Local knob — every acceptance test runs locally now, so the variable only selects the tests a branch touches.

denik added 4 commits August 12, 2026 12:26
…ANGED=N

N is the number of changed tests to select, previously hardcoded at 50.
Moved tests are now selected after added and modified ones, and the
selection is logged at startup.
Keep the old name as an alias: it is what the eng-dev-ecosystem CI job
dispatches.
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 0ef3939

Run: 32364132917

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux 1 275 16 6:18
💚​ aws windows 1 277 14 3:26
💚​ azure linux 1 274 16 6:50
💚​ azure windows 1 276 14 3:19
💚​ gcp linux 1 275 16 6:39
💚​ gcp windows 1 277 14 4:06
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:55 azure linux TestAccept
3:52 aws linux TestAccept
3:49 gcp linux TestAccept
3:13 azure windows TestAccept
3:10 gcp windows TestAccept
3:10 aws windows TestAccept

denik added 3 commits August 12, 2026 14:51
local-select runs the same selection of changed tests locally against the
testserver. TestInprocessMode is skipped under test selection: it asserts
that two specific selftests ran, which does not hold when the selection
excludes them.
A skip per test dir buried the run in ~1100 SKIP lines and hid the
selection summary. local-select now runs plain `go test -v`, which shows
the summary and the tests that ran.
A regenerated golden usually comes from a change elsewhere and lands on
hundreds of dirs at once, which fills the quota and crowds out the tests
the branch actually edits. Order is now added, changed fixture, changed
output, moved.
@denik
denik added this pull request to the merge queue Aug 13, 2026
@denik
denik removed this pull request from the merge queue due to a manual request Aug 13, 2026
denik added 8 commits August 13, 2026 15:53
Same rule the harness uses to split inputs from outputs, so a nested
fixture such as subdir/outer.py is no longer mistaken for generated
output.
Replace the four parallel maps with one map of a documented changedDir
struct, pull the invariant-config and generated-file rules into named
helpers, and rank by sorting once instead of concatenating four slices.
Scores instead of ranks, and the selection is now a real package rather
than test-only code, with a command to inspect what a change selects:

    go run ./acceptance/internal/selection/cmd
    go run ./acceptance/internal/selection/cmd acceptance/bundle/invariant/configs/job.yml.tmpl
A path given without a status prefix now takes the status git reports for
it: added when git does not track it, modified otherwise. Each selected
test is printed with the score it was picked by.
A dir that changed in several ways now outranks one that changed in a
single way: new dir 5, changed fixtures 5, changed goldens 1, move 1. New
and moved stay exclusive, and a move does not also count the renames of
the files it brings along.
An added config adds a variant of every invariant dir, so it now scores 10
where changing an existing config scores 5. The companion setup scripts of a
config only change how an existing variant runs, so they stay at 5.
Three fixes, all in the selection package:

- Two changed invariant configs produced two INPUT_CONFIG filters for the
  same dir. The harness requires every filter to match, so every variant
  skipped and those dirs ran nothing while still filling the quota. Such a
  dir now runs all of its variants. This one predates the branch.
- A dir that was both new and moved scored 6; new and moved are meant to be
  exclusive, and it now scores as new.
- The command resolved a bare path with a path-scoped git diff, which cannot
  pair a rename and reports the destination as added, so a moved test ranked
  as new. It now reads one whole diff, which also drops two git processes per
  argument, and rejects a non-positive limit instead of panicking on a
  negative slice bound.
…test

Two changed invariant configs produced two INPUT_CONFIG filters for the same
dir, and the harness required every filter to match, so every variant skipped
and those dirs ran nothing. The environment has one value per key, so filters
sharing a key now mean any of them: two changed configs run the variants of
both. This also makes ENVFILTER=INPUT_CONFIG=a,INPUT_CONFIG=b run both
variants rather than none, and lets checkEnvFilters reuse one matcher.

acceptance/selftest/selection prints what the selection command reports for a
changed test, a new test, a regenerated golden, a moved test, a touched
invariant config, and a new config alongside two touched ones.
@denik
denik added this pull request to the merge queue Aug 17, 2026
@denik
denik removed this pull request from the merge queue due to a manual request Aug 17, 2026
denik added 6 commits August 17, 2026 13:46
A dir restricted to some of its variants printed them merged into one line,
which read like a syntax of its own. Each variant is now its own line, named
bundle/invariant/no_drift/INPUT_CONFIG=job.yml.tmpl.
Adding one invariant config marked the whole dir as new, so the variants of
the configs that were merely changed scored as new too. A variant is now the
unit of selection: it carries its own score, and only the new config's variant
counts as new.

The command prints each selected test as a name go test accepts, expanded from
the variant matrix in the test's materialized config, so a line can be run as
printed. It is built by the harness like the CLI is, because tests run with a
sandboxed HOME that has no module cache.
The test built a tree of its own because a committed directory holding a file
named "script" would be picked up as a test case. Pointing -root at the real
tree instead drops that setup, exercises the real variant matrices, and prints
names that name existing tests.

The golden now moves when an invariant test dir or its matrix changes.
go build read the -buildvcs=false that Windows needs as a second package
path, because it was appended after the one being built, and every Windows
job failed on "malformed import path".
The command inferred the status of a bare path by running git itself. Now a
bare path counts as modified, so the only thing that talks to git is the
package, through the same call the test runner makes when the command is given
no arguments at all.
go test reads a test name as a prefix, so the variants below the one the
selection names do not need spelling out: a dir whose every variant runs is
named by the dir alone, and an invariant test by its config. One line per
selected test now, rather than one per variant of it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants