Skip to content

Delete integration tests for sqlexec covered by acceptance - #8198

Merged
denik merged 2 commits into
mainfrom
intdep-sqlexec-rest
Nov 30, 2026
Merged

denik merged 2 commits into
mainfrom
intdep-sqlexec-rest

Conversation

@denik

@denik denik commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Deletes the last two tests in integration/libs/sqlexec, and with them the package:

deleted integration test verdict now covered by
TestSQLExecNullParameter PORTED in #8072 experimental/aitools/tools/query/null-parameter (Cloud = true, every cloud)
TestSQLExecFailedStatement PORTED in #8072 and here experimental/aitools/tools/query/failed-statement (Cloud = true, every cloud), pipelines/show/failed-statement (now Cloud = true, every cloud)

#8072 added these acceptance tests and kept the two integration tests only because each also checked code with no production caller. #8113 removed that code and the checks. Nothing else in the package is left, and no helper was used only by it (newClient lived in the deleted file).

pipelines/show/failed-statement now runs on cloud too. These two tests were the only cloud check of sqlexec's synchronous Execute (submit with a 10s server-side wait), which pipelines show uses. The aitools tools query tests from #8072 submit with 0s and poll instead. The test runs pipelines show on a missing table.

  • Both runs: it asserts the stable prefix statement failed: BAD_REQUEST: and pins the request (wait_timeout: 10s, on_wait_timeout: CONTINUE). Changing the wait timeout in libs/sqlexec fails it locally.
  • On cloud: it also requires [TABLE_OR_VIEW_NOT_FOUND], so the real API must accept Execute's request and answer with a FAILED statement.
  • Locally: it uses the testserver's default FAILED answer, with no stub.

The UC-warehouse gate that the SQL cloud tests share moves from experimental/aitools/tools/script.prepare to require_uc_warehouse in acceptance/script.prepare, so pipelines/show/failed-statement calls the same gate instead of a copy.

Why

The integration tree is deprecated (integration/README.md): cloud coverage moves to acceptance tests with Cloud = true. Follow-up to #8072 and #8113; same method as #6113, #6140, #6223, #6316 and #7251.

Coverage proof

Both tests' coverage was recorded on AWS at a6c8694 with -coverpkg=github.com/databricks/cli/... (one passing run each). It was compared block by block with acceptance coverage at the same commit: local runs of experimental/aitools/tools/*, pipelines/show/* and selftest/*, plus AWS runs of the query and statement tests.

integration test verdict blocks run covered by acceptance harness-only acceptance tests
TestSQLExecNullParameter PORTED 78 64 14 query/null-parameter, pipelines/show/rendering
TestSQLExecFailedStatement PORTED 68 54 14 query/failed-statement, pipelines/show/failed-statement

"Harness-only" blocks are integration/internal/acc and internal/testutil, the integration tests' own setup. No real-gap blocks. Client.Execute, which only these tests and pipelines show call, is covered by the pipelines/show tests.

Assertion map
integration test fact acceptance check where
TestSQLExecNullParameter a statement with an empty-valued parameter succeeds query/null-parameter: command succeeds both
TestSQLExecNullParameter an empty value is sent without value and bound as SQL NULL (true) query/null-parameter: wire {"name":"maybe"}, result is_null = true both (cloud pins the binding)
TestSQLExecFailedStatement a missing table returns a typed FAILED statement error, through Execute pipelines/show/failed-statement: musterr, statement failed: BAD_REQUEST: (cloud: and [TABLE_OR_VIEW_NOT_FOUND]); query/failed-statement: the same through Submit/Poll both
both the real API accepts Execute's request (wait_timeout: 10s, on_wait_timeout: CONTINUE) pipelines/show/failed-statement: wire line, and the cloud run gets the backend's FAILED answer both
TestSQLExecFailedStatement error code and message are non-empty query/failed-statement: BAD_REQUEST, the TABLE_OR_VIEW_NOT_FOUND message and SQLSTATE: 42P01 both
both run only on UC workspaces with a warehouse require_uc_warehouse in acceptance/script.prepare cloud

Runtime

The two integration tests took about 1s each on AWS. Added: the cloud run of pipelines/show/failed-statement, under 2s on AWS.

Gaps and risks

  • Review: the loop's independent reviewers (Astra, and Fable as its fallback) could not run, because the shared AI gateway budget was exhausted. The equivalence and devil's-advocate passes were done by the authoring session alone; they found the Execute gap fixed above.
  • pipelines/show/failed-statement relies on default resolving in the workspace's current catalog. Checked on AWS; azure and gcp run through this PR's cloud: line.
  • Risk: low (deletes integration tests; one acceptance test gains a cloud run; one shared acceptance helper added, require_uc_warehouse, used only by SQL cloud tests).

This PR was created by the integration-deprecation loop.

🤖 AI agent (opus5.5, isaac_claude)

This pull request and its description were written by Isaac.

TestSQLExecNullParameter and TestSQLExecFailedStatement check NULL
parameter binding and the FAILED statement error, which the acceptance
tests added in #8072 check on every cloud. Their checks of unused API went
with #8113. This removes the last tests in integration/libs/sqlexec.

They were also the only cloud check of sqlexec's synchronous Execute, which
pipelines show uses, so pipelines/show/missing-table runs that path on
cloud against a missing table.

cloud: TestAccept/pipelines/show/missing-table TestAccept/experimental/aitools/tools/query/null-parameter TestAccept/experimental/aitools/tools/query/failed-statement

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the test-only-fix PRs that update failing of flaky tests without changing CLI code. label Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: df0dd99fa | Workflow run

Selected 1 changed tests (limit=20, 0 not selected)

7 tests: regression=0 unreleased=0 coverage=7 failing=0
test branch main (3442593) latest (v1.28.0)
TestAccept/experimental/aitools/tools/query/columns-rows ✅ ✅ ✅
TestAccept/experimental/aitools/tools/query/failed-statement ✅ ✅ ✅
TestAccept/experimental/aitools/tools/query/null-parameter ✅ ✅ ✅
TestAccept/experimental/aitools/tools/query/parameters ✅ ✅ ✅
TestAccept/experimental/aitools/tools/query/scalar ✅ ✅ ✅
TestAccept/experimental/aitools/tools/statement/submit-cancel ✅ ✅ ✅
TestAccept/pipelines/show/failed-statement ✅ ✅ ✅

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: df0dd99

Run: 46425234121

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 96 6 2:24
✅​ aws-windows-latest-4core-16gb 96 6 3:21
✅​ azure linux-2core-8gb 96 6 2:58
✅​ azure-windows-latest-4core-16gb 96 6 3:19
✅​ gcp linux-2core-8gb 96 6 3:42
✅​ gcp-windows-latest-4core-16gb 96 6 3:18
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:10 aws-windows-latest-4core-16gb TestAccept
3:09 azure-windows-latest-4core-16gb TestAccept
3:06 gcp-windows-latest-4core-16gb TestAccept

@denik
denik marked this pull request as ready for review November 30, 2026 12:33
@denik
denik requested review from a team as code owners November 30, 2026 12:33
@denik
denik requested review from Sankalp-Mittal, andrewnester and mihaimitrea-db and removed request for mihaimitrea-db November 30, 2026 12:33

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review at daba3aa. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) below.

This PR deletes the last two integration/libs/sqlexec tests and adds acceptance/pipelines/show/missing-table, a Cloud = true test of sqlexec's synchronous Execute path. The deletion matches the integration-tree deprecation, and the new test does check the request shape and the real FAILED reply. I have two non-blocking points about how the test is set up. It repeats coverage and gating logic that already exist, where it could extend the existing test and reuse the helper.

Fold the cloud check of sqlexec's synchronous Execute into the existing
pipelines/show/failed-statement test, which now relies on the testserver's
default FAILED answer locally instead of a stub. Share the UC warehouse gate
as require_uc_warehouse in acceptance/script.prepare.

cloud: TestAccept/pipelines/show/failed-statement TestAccept/experimental/aitools/tools/query TestAccept/experimental/aitools/tools/statement

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the aitools AI tools (databricks aitools) related changes label Nov 30, 2026
@denik
denik requested a review from andrewnester November 30, 2026 13:09
@denik
denik added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 9e5ad79 Nov 30, 2026
30 checks passed
@denik
denik deleted the intdep-sqlexec-rest branch November 30, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aitools AI tools (databricks aitools) related changes factory-generated test-only-fix PRs that update failing of flaky tests without changing CLI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants