Skip to content

Use t.Context() instead of context.Background() in tests#4655

Merged
pietern merged 2 commits intomainfrom
testing-context
Mar 5, 2026
Merged

Use t.Context() instead of context.Background() in tests#4655
pietern merged 2 commits intomainfrom
testing-context

Conversation

@pietern
Copy link
Contributor

@pietern pietern commented Mar 4, 2026

Summary

Go 1.24 added t.Context() / b.Context() which return a context scoped to the test lifetime. This replaces all context.Background() usage in tests and test helpers with the scoped alternative.

  • Replace ~1000 occurrences across ~290 files
  • Add Context() to the TestingT interface
  • Add a ruleguard lint rule to prevent context.Background() in _test.go files

Test plan

Tests pass.

🤖 Generated with Claude Code

Go 1.24 added t.Context() which returns a context scoped to the
test lifetime. Use it everywhere instead of context.Background().

Add a ruleguard lint rule to prevent context.Background() from
being reintroduced in test files.

Add Context() to the TestingT interface so test helpers that
accept it can use t.Context() as well.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Mar 4, 2026

Commit: f8e6423

Run: 22690667496

Env 🪲​BUG ❌​FAIL 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 7 268 778 7:34
🟨​ aws windows 7 1 7 270 776 6:56
💚​ aws-ucws linux 8 7 365 693 8:01
🔄​ aws-ucws windows 2 7 7 366 691 7:02
🪲​ azure linux 1 8 1 1 9 262 776 144:37
🪲​ azure windows 1 8 1 1 9 264 774 145:53
🪲​ azure-ucws linux 1 8 1 2 9 360 689 148:01
🪲​ azure-ucws windows 1 8 1 1 9 363 687 145:35
🪲​ gcp linux 1 8 1 1 9 258 779 144:53
🪲​ gcp windows 1 8 1 1 9 260 777 145:29
25 interesting tests: 8 FAIL, 7 KNOWN, 7 SKIP, 2 flaky, 1 BUG
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 🔄​f 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
🪲​ TestAccept/bundle/deployment/bind/alert 🙈​s 🙈​s 🙈​s 🙈​s 🪲​B 🪲​B 🪲​B 🪲​B 🪲​B 🪲​B
❌​ TestAccept/bundle/deployment/bind/alert/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/deployment/bind/alert/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/generate/alert ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/generate/alert/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/generate/alert/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/with_file ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/with_file/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/with_file/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/ssh/connect-serverless-gpu 🙈​s 🙈​s ✅​p 🔄​f 🙈​s 🙈​s 🔄​f ✅​p 🙈​s 🙈​s
🔄​ TestAccept/ssh/connection 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f 🔄​f 💚​R 💚​R
Top 21 slowest tests (at least 2 minutes):
duration env testname
5:04 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:45 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:42 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:35 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:29 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:11 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:07 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:55 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:50 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:50 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:46 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:44 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:42 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:41 aws-ucws linux TestAccept
2:16 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:16 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:14 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:13 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:12 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:09 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:09 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

t.Context() is cancelled just before t.Cleanup() functions run,
so cleanup functions that make API calls need a non-cancelled context.
Use context.WithoutCancel() to preserve auth/config values while
removing the cancellation signal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pietern pietern temporarily deployed to test-trigger-is March 4, 2026 21:41 — with GitHub Actions Inactive
@pietern pietern merged commit 47d9694 into main Mar 5, 2026
22 of 23 checks passed
@pietern pietern deleted the testing-context branch March 5, 2026 09:01
pietern added a commit that referenced this pull request Mar 5, 2026
## Summary
- Add a gorules lint rule that flags `context.Background()` usage in all
files except `main.go`, suggesting `t.Context()` in tests or passing
context from the caller
- Add context guidelines to AGENTS.md

Builds on #4655, #4656, and #4657.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@eng-dev-ecosystem-bot
Copy link
Collaborator

Commit: 47d9694

Run: 22710303968

Env 💥​PANIC 🪲​BUG ❌​FAIL 🟨​KNOWN 🤯​MISS 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 7 493 733 63:46
🟨​ aws windows 7 1 7 465 741 61:39
💥​ aws-ucws linux 1 9 29 23 1 725 579 120:00
❌​ aws-ucws windows 6 1 1 23 1 717 592 126:33
🪲​ azure linux 1 25 1 1 9 470 731 102:13
🪲​ azure windows 1 28 1 1 9 439 739 97:57
💥​ azure-ucws linux 1 1 22 40 4 8 678 584 120:00
💥​ azure-ucws windows 1 1 27 12 4 8 664 595 120:00
🪲​ gcp linux 1 11 1 1 9 467 739 239:33
🪲​ gcp windows 1 11 1 2 1 9 437 747 236:55
120 interesting tests: 46 MISS, 45 FAIL, 17 RECOVERED, 7 KNOWN, 3 PANIC, 1 BUG, 1 SKIP
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🤯​M 🟨​K 🟨​K 🟨​K 🤯​M 🤯​M 🟨​K 🟨​K
🪲​ TestAccept/bundle/deployment/bind/alert 🙈​s 🙈​s 🙈​s 🙈​s 🪲​B 🪲​B 🪲​B 🪲​B 🪲​B 🪲​B
❌​ TestAccept/bundle/deployment/bind/alert/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/deployment/bind/alert/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/generate/alert ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/generate/alert/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/generate/alert/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/integration_whl/interactive_cluster ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/integration_whl/interactive_cluster/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ❌​F ✅​p ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/integration_whl/interactive_cluster/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p 🔄​f
❌​ TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=direct/DATA_SECURITY_MODE=SINGLE_USER ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=direct/DATA_SECURITY_MODE=USER_ISOLATION ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p 🔄​f
❌​ TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=terraform/DATA_SECURITY_MODE=SINGLE_USER ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=terraform/DATA_SECURITY_MODE=USER_ISOLATION ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/integration_whl/interactive_single_user ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/integration_whl/interactive_single_user/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/integration_whl/interactive_single_user/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/alerts/basic ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ✅​p ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/basic/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ✅​p ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/basic/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ✅​p ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/with_file ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ✅​p ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/with_file/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ✅​p ❌​F ❌​F
❌​ TestAccept/bundle/resources/alerts/with_file/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ✅​p ❌​F ❌​F
❌​ TestAccept/bundle/resources/clusters/deploy/update-after-create ✅​p ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ❌​F ✅​p ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/clusters/run/spark_python_task ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/clusters/run/spark_python_task/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/clusters/run/spark_python_task/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ❌​F ❌​F ✅​p ❌​F ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/change-serialized-dashboard ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/change-serialized-dashboard/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/change-serialized-dashboard/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/dataset-catalog-schema ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/dataset-catalog-schema/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/dataset-catalog-schema/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/delete-trashed-out-of-band ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/delete-trashed-out-of-band/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/delete-trashed-out-of-band/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/destroy ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/destroy/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/destroy/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/detect-change ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/detect-change/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/detect-change/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/generate_inplace ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/generate_inplace/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/generate_inplace/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/nested-folders ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/nested-folders/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/nested-folders/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M 🤯​M ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple_outside_bundle_root ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple_outside_bundle_root/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple_outside_bundle_root/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple_syncroot ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple_syncroot/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/simple_syncroot/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/unpublish-out-of-band ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/unpublish-out-of-band/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/dashboards/unpublish-out-of-band/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/database_catalogs/basic 🙈​s 🙈​s 🤯​M ✅​p 🙈​s 🙈​s 🤯​M 🤯​M 🙈​s 🙈​s
💥​ TestAccept/bundle/resources/database_catalogs/basic/DATABRICKS_BUNDLE_ENGINE=direct 🤯​M ✅​p 🤯​M 💥​P
🤯​ TestAccept/bundle/resources/database_catalogs/basic/DATABRICKS_BUNDLE_ENGINE=terraform 🤯​M ✅​p 🤯​M 🤯​M
🤯​ TestAccept/bundle/resources/database_instances/single-instance 🙈​s 🙈​s 🤯​M ✅​p 🙈​s 🙈​s 🤯​M 🤯​M 🙈​s 🙈​s
💥​ TestAccept/bundle/resources/database_instances/single-instance/DATABRICKS_BUNDLE_ENGINE=direct 🤯​M ✅​p 💥​P 🤯​M
🤯​ TestAccept/bundle/resources/database_instances/single-instance/DATABRICKS_BUNDLE_ENGINE=terraform 🤯​M ✅​p 🤯​M ✅​p
🤯​ TestAccept/bundle/resources/grants/registered_models 🙈​s 🙈​s 🤯​M ✅​p 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s
💥​ TestAccept/bundle/resources/grants/registered_models/DATABRICKS_BUNDLE_ENGINE=direct 💥​P ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/grants/registered_models/DATABRICKS_BUNDLE_ENGINE=terraform 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/model_serving_endpoints/running-endpoint 🙈​s 🙈​s 🤯​M ✅​p 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s
🤯​ TestAccept/bundle/resources/model_serving_endpoints/running-endpoint/DATABRICKS_BUNDLE_ENGINE=direct 🤯​M ✅​p ✅​p ✅​p
🤯​ TestAccept/bundle/resources/model_serving_endpoints/running-endpoint/DATABRICKS_BUNDLE_ENGINE=terraform 🤯​M ✅​p ✅​p ✅​p
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🤯​ TestAccept/bundle/resources/permissions/factcheck ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M 🤯​M 🙈​s 🙈​s
🤯​ TestAccept/bundle/resources/permissions/factcheck/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🤯​M 🤯​M
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/postgres_branches/basic/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_branches/basic/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/postgres_branches/recreate/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_branches/recreate/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/postgres_branches/update_protected/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_branches/update_protected/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/postgres_branches/without_branch_id/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_branches/without_branch_id/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R
❌​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​s 🙈​s ❌​F ❌​F 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/postgres_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F
❌​ TestAccept/bundle/resources/postgres_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ❌​F
💚​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
❌​ TestAccept/bundle/resources/postgres_endpoints/update_autoscaling 🙈​s 🙈​s ❌​F ❌​F 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/postgres_endpoints/update_autoscaling/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F
❌​ TestAccept/bundle/resources/postgres_endpoints/update_autoscaling/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ❌​F
❌​ TestAccept/bundle/resources/quality_monitors/change_table_name 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s ❌​F ❌​F 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/quality_monitors/create 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s ❌​F ✅​p 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/quality_monitors/create/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ❌​F ✅​p
💚​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/synced_database_tables/basic/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/synced_database_tables/basic/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
❌​ TestAccept/bundle/run/app-with-job ✅​p ✅​p ❌​F ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
❌​ TestAccept/bundle/run/app-with-job/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ❌​F ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
❌​ TestAccept/bundle/templates/default-python/combinations/serverless ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=direct/DLT=no/NBOOK=yes/PY=no/READPLAN=1 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s ✅​p ❌​F 🙈​s 🙈​s
❌​ TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=direct/DLT=no/NBOOK=yes/PY=yes/READPLAN= 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s ✅​p ❌​F 🙈​s 🙈​s
❌​ TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=direct/DLT=yes/NBOOK=no/PY=no/READPLAN= 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s ✅​p ❌​F 🙈​s 🙈​s
❌​ TestAccept/ssh/connect-serverless-gpu 🙈​s 🙈​s ❌​F 🔄​f 🙈​s 🙈​s ❌​F ✅​p 🙈​s 🙈​s
💚​ TestAccept/ssh/connection 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🤯​ TestDbrAcceptance 🙈​s 🙈​s 🤯​M 🙈​s 🙈​s 🙈​s 🤯​M 🤯​M 🙈​s 🙈​s
🤯​ TestInprocessMode 🙈​s 🙈​s 🤯​M 🙈​s 🙈​s 🙈​s 🤯​M 🤯​M 🙈​s 🙈​s
❌​ TestSyncIncrementalFileOverwritesFolder ✅​p ✅​p ✅​p ✅​p ✅​p ❌​F ✅​p ✅​p ✅​p ✅​p
Top 50 slowest tests (at least 2 minutes):
duration env testname
20:10 azure windows TestAccept/bundle/resources/permissions/factcheck/DATABRICKS_BUNDLE_ENGINE=terraform
17:11 azure-ucws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
14:52 azure linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
14:52 azure linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
12:56 gcp linux TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=terraform/DATA_SECURITY_MODE=SINGLE_USER
12:54 azure windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=direct
12:51 azure-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=terraform
12:24 aws-ucws windows TestAccept/bundle/invariant/migrate/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=synced_database_table.yml.tmpl
12:02 aws windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=terraform
11:41 azure windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=terraform
10:36 gcp linux TestAccept/bundle/integration_whl/interactive_single_user/DATABRICKS_BUNDLE_ENGINE=terraform
10:27 gcp windows TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=terraform/DATA_SECURITY_MODE=SINGLE_USER
10:18 aws-ucws windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=direct
10:07 gcp linux TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=terraform
9:55 aws-ucws windows TestAccept/bundle/resources/model_serving_endpoints/running-endpoint/DATABRICKS_BUNDLE_ENGINE=terraform
9:54 aws windows TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=terraform/DATA_SECURITY_MODE=SINGLE_USER
9:42 aws-ucws linux TestAccept/bundle/integration_whl/interactive_cluster/DATABRICKS_BUNDLE_ENGINE=terraform
9:41 aws-ucws linux TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=terraform
9:37 aws windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=direct
9:36 azure windows TestAccept/bundle/integration_whl/custom_params/DATABRICKS_BUNDLE_ENGINE=terraform
9:32 azure linux TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_15.4_LTS
9:29 azure-ucws linux TestSparkJarTaskDeployAndRunOnVolumes/Databricks_Runtime_15.4_LTS
9:28 aws-ucws linux TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=terraform/DATA_SECURITY_MODE=SINGLE_USER
9:26 aws-ucws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=synced_database_table.yml.tmpl
9:21 aws-ucws windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=terraform
9:02 azure windows TestAccept/bundle/integration_whl/interactive_cluster/DATABRICKS_BUNDLE_ENGINE=direct
9:02 aws windows TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=terraform/DATA_SECURITY_MODE=USER_ISOLATION
8:56 azure linux TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_14.3_LTS
8:46 aws-ucws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=synced_database_table.yml.tmpl
8:34 gcp linux TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=direct
8:33 aws-ucws linux TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=direct/DATA_SECURITY_MODE=SINGLE_USER
8:24 gcp windows TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_15.4_LTS
8:22 aws-ucws windows TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=direct/DATA_SECURITY_MODE=USER_ISOLATION
8:16 aws linux TestAccept/bundle/integration_whl/interactive_cluster/DATABRICKS_BUNDLE_ENGINE=direct
8:14 gcp linux TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_15.4_LTS
8:05 aws linux TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_15.4_LTS
8:04 gcp linux TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_14.3_LTS
8:04 aws-ucws linux TestAccept/bundle/integration_whl/interactive_single_user/DATABRICKS_BUNDLE_ENGINE=terraform
8:03 aws-ucws linux TestSparkJarTaskDeployAndRunOnVolumes/Databricks_Runtime_15.4_LTS
8:03 gcp windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=terraform
8:01 aws-ucws linux TestAccept/bundle/run/app-with-job/DATABRICKS_BUNDLE_ENGINE=direct
8:01 aws-ucws linux TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=direct/DATA_SECURITY_MODE=USER_ISOLATION
8:00 aws-ucws windows TestAccept/bundle/resources/model_serving_endpoints/running-endpoint/DATABRICKS_BUNDLE_ENGINE=direct
7:58 gcp windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=direct
7:57 aws windows TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=direct/DATA_SECURITY_MODE=SINGLE_USER
7:56 aws windows TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_15.4_LTS
7:56 azure-ucws linux TestAccept/bundle/resources/clusters/run/spark_python_task/DATABRICKS_BUNDLE_ENGINE=direct
7:55 aws-ucws windows TestSparkJarTaskDeployAndRunOnVolumes/Databricks_Runtime_15.4_LTS
7:54 azure-ucws windows TestAccept/bundle/integration_whl/base/DATABRICKS_BUNDLE_ENGINE=terraform
7:49 aws linux TestAccept/bundle/integration_whl/interactive_cluster_dynamic_version/DATABRICKS_BUNDLE_ENGINE=terraform/DATA_SECURITY_MODE=SINGLE_USER

mihaimitrea-db pushed a commit that referenced this pull request Mar 5, 2026
Go 1.24 added `t.Context()` / `b.Context()` which return a context
scoped to the test lifetime. This replaces all `context.Background()`
usage in tests and test helpers with the scoped alternative.

- Replace ~1000 occurrences across ~290 files
- Add `Context()` to the `TestingT` interface
- Add a ruleguard lint rule to prevent `context.Background()` in
`_test.go` files

Tests pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants