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: 17950332831

Env ✅​pass 🔄​flaky 🙈​skip
✅​ aws linux 311 530
🔄​ aws windows 306 6 529
🔄​ aws-ucws linux 421 2 428
✅​ aws-ucws windows 424 427
✅​ azure linux 311 529
🔄​ azure windows 309 3 528
✅​ azure-ucws linux 423 427
✅​ azure-ucws windows 424 426
✅​ gcp linux 310 531
✅​ gcp windows 311 530
10 failing tests:
Test Name aws windows aws-ucws linux azure windows
TestAccept ✅​pass 🔄​flaky 🔄​flaky
TestAccept/bundle/deploy/mlops-stacks ✅​pass 🔄​flaky ✅​pass
TestAccept/bundle/destroy/jobs-and-pipeline 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/destroy/jobs-and-pipeline/DATABRICKS_BUNDLE_ENGINE=direct-exp 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/resources/pipelines/update/DATABRICKS_BUNDLE_ENGINE=direct-exp 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/resources/pipelines/update/DATABRICKS_BUNDLE_ENGINE=terraform 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/templates/default-python/combinations/classic 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=yes/PY=no 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/templates/default-python/integration_classic ✅​pass ✅​pass 🔄​flaky
TestAccept/bundle/templates/default-python/integration_classic/DATABRICKS_BUNDLE_ENGINE=terraform/UV_PYTHON=3.13 ✅​pass ✅​pass 🔄​flaky

@shreyas-goenka shreyas-goenka marked this pull request as ready for review September 8, 2025 08:39
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.

Sign up for free to 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.

4 participants