Skip to content

acc: replace DATABRICKS_TEST_SKIPLOCAL with DATABRICKS_TEST_SELECT_CHANGED=N - #6248

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

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

Conversation

@denik

@denikdenik 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.

…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: 8d2a4b3

Run: 32121256968

Env🟨​KNOWN🤯​MISS🔄​flaky💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
🟨​aws linux31287166:46
🟨​aws windows41289136:24
🟨​azure linux211286166:28
🟨​azure windows311288136:01
💚​gcp linux11287166:15
🟨​gcp windows111289135:25
Test Nameaws linuxaws windowsazure linuxazure windowsgcp linuxgcp windows
🟨​TestAccept💚​R🟨​K💚​R🟨​K💚​R🟨​K
🤯​TestAccept/selftest/selection🙈​s🤯​M🙈​s🤯​M🙈​s🤯​M
🟨​TestFetchRepositoryInfoAPI_FromRepo🟨​K🟨​K🟨​K🟨​K🙈​S🙈​S
🟨​TestFetchRepositoryInfoAPI_FromRepo/root🟨​K🟨​K🔄​f🟨​K
🟨​TestFetchRepositoryInfoAPI_FromRepo/subdir🟨​K🟨​K🟨​K🔄​f
Top 3 slowest tests (at least 2 minutes):
durationenvtestname
3:50aws linuxTestAccept
3:49azure linuxTestAccept
3:48gcp linuxTestAccept

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 queueAug 13, 2026
@denik
denik removed this pull request from the merge queue due to a manual request Aug 13, 2026
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 queueAug 17, 2026
@denik
denik removed this pull request from the merge queue due to a manual request Aug 17, 2026
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.
Sign up for freeto 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

@denik@eng-dev-ecosystem-bot@andrewnester