From 71d96e4caadbb711b4e405903227b3083081ed02 Mon Sep 17 00:00:00 2001 From: Anton Nekipelov <226657+anton-107@users.noreply.github.com> Date: Fri, 20 Nov 2026 15:27:48 +0000 Subject: [PATCH 1/2] aitools: run aitools-dependent cmd tests and goldens in test-exp-aitools ## Changes `task test-exp-aitools` now also runs the tests that depend on aitools but live outside the aitools directories: - Unit tests: adds the `cmd`, `cmd/apps`, `cmd/experimental`, `cmd/root` and `cmd/version` packages and the root package (`.`) to the `gotestsum` package list. - Acceptance tests: extends the `-run` pattern with `TestAccept/help$`, `TestAccept/cmd/version`, `TestAccept/quickstart`, `TestAccept/air/help`, `TestAccept/air/config-help` and `TestAccept/air/image-push`. The task's `sources:` stay the same. Comments in `Taskfile.yml` explain why each addition is there. ## Why CI uses the `sources:` of `test-exp-aitools` to decide which job to run. A change that touches only aitools code runs `test-exp-aitools` and skips the general `test` job. Some code outside the aitools directories still depends on aitools: - `cmd/root` runs aitools hooks on every command. - `cmd`, `cmd/apps` and `cmd/version` print aitools text, and the root package imports aitools. - The goldens for `help`, `cmd/version`, `quickstart` and `air` help contain aitools text. - `air/image-push` starts a child process with the aitools self-exec environment. So an aitools-only change could break these tests and still pass CI. Running them inside `test-exp-aitools` catches that on the PR. `cmd/air` unit tests are left out on purpose. The only aitools call there is already covered by the `air/image-push` golden, and its unit tests take over a minute without touching aitools. ## Tests - Ran `./task test-exp-aitools` locally with no `DATABRICKS_*` variables set. Both the unit and acceptance steps pass, and the new packages and goldens run. - Checked that every added `-run` prefix matches an existing directory under `acceptance/`. Co-authored-by: Isaac --- Taskfile.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 8b51dcf89dd..bfa5b69c087 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -708,18 +708,26 @@ tasks: - acceptance/experimental/aitools/** - "{{.EMBED_SOURCES}}" cmds: + # cmd/root runs aitools hooks on every command, cmd, cmd/apps and + # cmd/version print aitools text, and the root package imports aitools, + # so their tests run here too: a change under the sources above does not + # trigger the `test` job. cmd/air is left out: its only aitools call is + # covered by the air/image-push golden below, and its unit tests take + # over a minute without touching aitools. - | {{.GO_TOOL}} gotestsum \ --format ${GOTESTSUM_FORMAT:-pkgname-and-test-fails} \ --no-summary=skipped \ - --packages "./cmd/aitools/... ./libs/aitools/... ./experimental/aitools/..." \ + --packages "./cmd/aitools/... ./libs/aitools/... ./experimental/aitools/... ./cmd ./cmd/apps ./cmd/experimental ./cmd/root ./cmd/version ." \ -- -timeout=${LOCAL_TIMEOUT:-60m} + # The goldens of help, cmd/version, quickstart and air help print aitools text; + # air/image-push runs a child process with the aitools self-exec environment. - | {{.GO_TOOL}} gotestsum \ --format ${GOTESTSUM_FORMAT:-pkgname-and-test-fails} \ --no-summary=skipped \ --packages ./acceptance/... \ - -- -timeout=${LOCAL_TIMEOUT:-60m} -run "TestAccept/apps|TestAccept/cmd/aitools|TestAccept/experimental/aitools" + -- -timeout=${LOCAL_TIMEOUT:-60m} -run "TestAccept/apps|TestAccept/cmd/aitools|TestAccept/experimental/aitools|TestAccept/help$|TestAccept/cmd/version|TestAccept/quickstart|TestAccept/air/help|TestAccept/air/config-help|TestAccept/air/image-push" test-exp-ssh: desc: Run experimental SSH unit and acceptance tests From 678c5fbc725acf382a41c0e9cef34236338352cc Mon Sep 17 00:00:00 2001 From: Anton Nekipelov <226657+anton-107@users.noreply.github.com> Date: Fri, 20 Nov 2026 16:07:49 +0000 Subject: [PATCH 2/2] aitools: explain cmd/experimental in test-exp-aitools and anchor the added -run patterns Co-authored-by: Isaac --- Taskfile.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index bfa5b69c087..b4e865bdbf8 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -709,7 +709,8 @@ tasks: - "{{.EMBED_SOURCES}}" cmds: # cmd/root runs aitools hooks on every command, cmd, cmd/apps and - # cmd/version print aitools text, and the root package imports aitools, + # cmd/version print aitools text, cmd/experimental registers the + # experimental aitools command, and the root package imports aitools, # so their tests run here too: a change under the sources above does not # trigger the `test` job. cmd/air is left out: its only aitools call is # covered by the air/image-push golden below, and its unit tests take @@ -727,7 +728,7 @@ tasks: --format ${GOTESTSUM_FORMAT:-pkgname-and-test-fails} \ --no-summary=skipped \ --packages ./acceptance/... \ - -- -timeout=${LOCAL_TIMEOUT:-60m} -run "TestAccept/apps|TestAccept/cmd/aitools|TestAccept/experimental/aitools|TestAccept/help$|TestAccept/cmd/version|TestAccept/quickstart|TestAccept/air/help|TestAccept/air/config-help|TestAccept/air/image-push" + -- -timeout=${LOCAL_TIMEOUT:-60m} -run "TestAccept/apps|TestAccept/cmd/aitools|TestAccept/experimental/aitools|TestAccept/help$|TestAccept/cmd/version$|TestAccept/quickstart$|TestAccept/air/help$|TestAccept/air/config-help$|TestAccept/air/image-push$" test-exp-ssh: desc: Run experimental SSH unit and acceptance tests