Skip to content

integration: share one workspace client across tests - #7555

Merged
denik merged 1 commit into
mainfrom
integ-share-workspace-client
Nov 12, 2026
Merged

denik merged 1 commit into
mainfrom
integ-share-workspace-client

Conversation

@denik

@denik denik commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Changes

Go integration tests now share one SDK workspace client per test process. acc.WorkspaceTest used to build a new one with databricks.NewWorkspaceClient() for every test.

Why

This is the same flaky failure that #7507 fixed for acceptance tests, here on the Go integration test path. Each new client repeats OIDC endpoint discovery before its first API call, and the SDK does not retry that request when it times out. If the workspace is slow for a moment, every test starting then fails at its first API call with default auth: cannot configure default credentials. The failures since #7507 merged all come from integration/internal/acc/fixtures.go.

A shared client authenticates once and refreshes its token in the background. The SDK does not cache a failed authentication (credentialsProvider is set only on success), so after a transient failure the next call on the shared client tries again. No integration test changes the client's config or the DATABRICKS_* auth env.

Dashboard

error/1224

fixtures.go:111:
    Error:      Received unexpected error:
                default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=[DATABRICKS_URL], actions_id_token_request_url=[ACTIONS_URL], actions_id_token_request_token=[TOKEN], client_id=[ID], client_secret=***. Env: DATABRICKS_HOST, ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN, DATABRICKS_CLIENT_ID, DATABRICKS_CLIENT_SECRET

Tests

Ran locally against AWS: integration/cmd/fs (25 tests: the 4 that failed plus others), integration/libs/filer (44) and integration/cmd/workspace (14). All pass.

This PR was created by an AI agent (harness_auto, opus5.5, isaac_claude).

This pull request and its description were written by Isaac.

Same failure as #7507, on the Go integration test path: acc.WorkspaceTest
built a client per test, so a timed-out OIDC discovery GET (not retried by
the SDK) failed every test starting at that moment with "cannot configure
default credentials".

Co-authored-by: Isaac <no-reply@databricks.com>
@denik denik added the ai-auto PRs made by AI loops & factories, label Nov 12, 2026
@github-actions github-actions Bot added the test-only-fix PRs that update failing of flaky tests without changing CLI code. label Nov 12, 2026
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 4aadef1

Run: 43230992338

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
🔄​ aws linux-2core-8gb 1 1 269 15 14:17
🔄​ aws-windows-latest-4core-16gb 1 1 271 13 11:46
🔄​ azure linux-2core-8gb 1 1 268 15 12:23
💚​ azure-windows-latest-4core-16gb 1 271 13 9:41
💚​ gcp linux-2core-8gb 1 270 15 11:35
💚​ gcp-windows-latest-4core-16gb 1 272 13 8:08
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🔄​ TestSyncIncrementalFileSync 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestSyncIncrementalSyncPythonNotebookDelete ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🔄​ TestSyncNestedFolderDoesntFailOnNonEmptyDirectory ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
Top 24 slowest tests (at least 2 minutes):
duration env testname
4:07 aws-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
4:00 azure linux-2core-8gb TestAccept
3:50 aws linux-2core-8gb TestAccept
3:43 gcp linux-2core-8gb TestAccept
3:42 gcp-windows-latest-4core-16gb TestAccept
3:39 azure-windows-latest-4core-16gb TestAccept
3:36 aws-windows-latest-4core-16gb TestAccept
2:53 aws-windows-latest-4core-16gb TestFilerReadWrite/workspace_files_extensions
2:51 aws linux-2core-8gb TestImportDirWithOverwriteFlag
2:49 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsStat
2:45 aws linux-2core-8gb TestFilerReadWrite/workspace_files_extensions
2:42 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:35 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:32 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:25 gcp linux-2core-8gb TestExportDir
2:19 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
2:14 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
2:14 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:09 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
2:07 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:06 azure-windows-latest-4core-16gb TestImportDirDoesNotOverwrite
2:04 aws linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
2:03 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
2:03 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsStat

@denik
denik marked this pull request as ready for review November 12, 2026 14:20
@denik
denik requested review from a team as code owners November 12, 2026 14:20
@denik
denik requested review from andrewnester, rauchy and rclarey and removed request for rauchy and rclarey November 12, 2026 14:20
@denik
denik added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit edbc9a7 Nov 12, 2026
28 checks passed
@denik
denik deleted the integ-share-workspace-client branch November 12, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-auto PRs made by AI loops & factories, 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