Skip to content

Conversation

@shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Sep 7, 2025

Changes

This PR adds a notebook we can use to easily run and iterate on DBR tests.

Why

Simplifies the test setup and makes it easy to debug issues with the DBR testing framework itself. You just have to run make dbr_scratch to get started.

// If the test is being run on DBR, auth is already configured
// by the dbr_runner notebook by reading a token from the notebook context and
// setting DATABRICKS_TOKEN and DATABRICKS_HOST environment variables.
_, _, tmpDir = workspaceTmpDir(t.Context(), t)
Copy link
Contributor Author

@shreyas-goenka shreyas-goenka Sep 7, 2025

Choose a reason for hiding this comment

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

This was necesary to ensure the test directory gets cleaned up. Otherwise the context seems to be cancelled before t.Cleanup is executed.

Copy link
Contributor

Choose a reason for hiding this comment

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

The doc for testing.T.Context says as much: https://pkg.go.dev/testing#T.Context

Unless there is another context to use, it seems better to use context.Background() in the cleanup function directly, or other call sites will be prone to the same error.

@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Sep 7, 2025

Run: 18380840675

Env 🔄​flaky ✅​pass 🙈​skip
🔄​ aws linux 1 323 544
✅​ aws windows 325 543
🔄​ aws-ucws linux 9 431 440
🔄​ aws-ucws windows 9 432 439
✅​ azure linux 324 543
✅​ azure windows 325 542
🔄​ azure-ucws linux 9 431 439
🔄​ azure-ucws windows 9 432 438
🔄​ gcp linux 1 322 545
✅​ gcp windows 324 544
14 failing tests:
Test Name aws linux aws-ucws linux aws-ucws windows azure-ucws linux azure-ucws windows gcp linux
TestAccept/bundle/deploy/dashboard/detect-change ✅​p 🔄​f 🔄​f 🔄​f ✅​p ✅​p
TestAccept/bundle/deploy/dashboard/generate_inplace ✅​p 🔄​f 🔄​f 🔄​f 🔄​f ✅​p
TestAccept/bundle/deploy/dashboard/nested-folders ✅​p 🔄​f 🔄​f 🔄​f ✅​p ✅​p
TestAccept/bundle/deploy/dashboard/simple ✅​p 🔄​f 🔄​f 🔄​f 🔄​f ✅​p
TestAccept/bundle/deploy/dashboard/simple_outside_bundle_root ✅​p 🔄​f 🔄​f 🔄​f 🔄​f ✅​p
TestAccept/bundle/deploy/dashboard/simple_syncroot ✅​p 🔄​f 🔄​f 🔄​f 🔄​f ✅​p
TestAccept/bundle/deploy/registered_models/basic 🙈​s ✅​p ✅​p ✅​p 🔄​f 🙈​s
TestAccept/bundle/deploy/registered_models/basic/DATABRICKS_BUNDLE_ENGINE=direct-exp ✅​p ✅​p ✅​p 🔄​f
TestAccept/bundle/deployment/bind/dashboard ✅​p 🔄​f 🔄​f 🔄​f ✅​p ✅​p
TestAccept/bundle/deployment/bind/dashboard/recreation ✅​p 🔄​f 🔄​f 🔄​f ✅​p ✅​p
TestSetupDbrRunner 🔄​f ✅​p ✅​p ✅​p ✅​p 🔄​f
TestDashboardAssumptions_WorkspaceImport ✅​p 🔄​f 🔄​f 🔄​f 🔄​f ✅​p
TestFilerWorkspaceNotebook ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
TestFilerWorkspaceNotebook/rNb.r ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

This can live in a dbr subpackage under acceptance for more isolation.

// If the test is being run on DBR, auth is already configured
// by the dbr_runner notebook by reading a token from the notebook context and
// setting DATABRICKS_TOKEN and DATABRICKS_HOST environment variables.
_, _, tmpDir = workspaceTmpDir(t.Context(), t)
Copy link
Contributor

Choose a reason for hiding this comment

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

The doc for testing.T.Context says as much: https://pkg.go.dev/testing#T.Context

Unless there is another context to use, it seems better to use context.Background() in the cleanup function directly, or other call sites will be prone to the same error.


### Bundles
* Remove resources.apps.config section ([#3680](https://github.com/databricks/cli/pull/3680))
* Prompt for serverless compute in `dbt-sql` template (defaults to `yes`) ([#3668](https://github.com/databricks/cli/pull/3668))
Copy link
Contributor

@lennartkats-db lennartkats-db Sep 30, 2025

Choose a reason for hiding this comment

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

Please check, I think you're accidentally removing several changes from main (both in the changelog and actual changes in for example libs/template). Resolving conflicts might fix this.

@shreyas-goenka shreyas-goenka marked this pull request as draft October 27, 2025 15:57
@github-actions
Copy link

This PR has not received an update in a while. If you want to keep this PR open, please leave a comment below or push a new commit and auto-close will be canceled.

@github-actions github-actions bot added the Stale label Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants