Skip to content

acceptance: prefix unique test resource names with "cli-"#5453

Open
hectorcast-db wants to merge 1 commit into
mainfrom
add-cloud-resource-name-prefix
Open

acceptance: prefix unique test resource names with "cli-"#5453
hectorcast-db wants to merge 1 commit into
mainfrom
add-cloud-resource-name-prefix

Conversation

@hectorcast-db
Copy link
Copy Markdown
Contributor

Changes

Prefix the per-run uniqueName used by the acceptance test harness with cli-.

This name is exported to tests as $UNIQUE_NAME and used to name resources. When acceptance tests run against a real workspace (cloud mode), some of those resources are real Databricks objects (SQL warehouses, clusters, schemas, ...). Previously the name was a bare lowercased base32 string, e.g. ricmuzymnfab5hj5z2r43mck2u.

Why

Shared test workspaces accumulate resources created by many different test suites and tools. A bare base32 name makes CLI-created resources indistinguishable from everyone else's, so when something leaks (e.g. a deploy whose cleanup didn't run) it's hard to attribute it to the CLI acceptance suite or to find and clean it up. A stable cli- prefix makes these resources greppable and attributable, matching the convention other suites already use for their own resources.

The change is intentionally at the single point where uniqueName is generated, so every resource named via $UNIQUE_NAME benefits, not just one fixture.

Tests

No behavior change for test output: the replacement is registered on the full value (repls.Set(uniqueName, "[UNIQUE_NAME]")), so output normalization to [UNIQUE_NAME] is unchanged and no golden output files change. Verified go build ./... and gofmt. CI runs the acceptance suite.

This pull request and its description were written by Isaac.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Waiting for approval

Based on git history, these people are best suited to review:

  • @denik -- recent work in acceptance/

Eligible reviewers: @andrewnester, @anton-107, @pietern, @renaudhartert-db, @shreyas-goenka, @simonfaltum

Suggestions based on git history. See OWNERS for ownership rules.

@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

eng-dev-ecosystem-bot commented Jun 5, 2026

Commit: f8b8e0f

Run: 27022107241

Ignoring .gh-logs/27022107241/update-check-action/action.yml: cannot extract env
Ignoring .gh-logs/27022107241/gh-report-action/gh_pr_comment.py: cannot extract env
Ignoring .gh-logs/27022107241/gh-report-action/action.yml: cannot extract env

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🔄​ aws linux 4 3 15 261 923 7:50
💚​ aws windows 7 15 263 921 8:24
💚​ aws-ucws linux 7 15 357 837 6:56
💚​ aws-ucws windows 7 15 359 835 10:01
💚​ azure linux 1 17 264 921 6:05
💚​ azure windows 1 17 266 919 7:47
💚​ azure-ucws linux 1 17 362 833 7:06
💚​ azure-ucws windows 1 17 364 831 10:07
💚​ gcp linux 1 17 260 924 6:30
💚​ gcp windows 1 17 262 922 9:52
22 interesting tests: 15 SKIP, 4 flaky, 3 RECOVERED
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 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🔄​f 💚​R 💚​R 💚​R
🔄​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🔄​f 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🔄​f 💚​R 💚​R 💚​R
🔄​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🔄​f 💚​R 💚​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/replace_existing 🙈​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/basic 🙈​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/postgres_projects/update_display_name 🙈​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/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 25 slowest tests (at least 2 minutes):
duration env testname
5:07 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:56 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:48 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:30 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:40 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:37 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:22 gcp windows TestAccept
3:21 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:18 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:17 aws windows TestAccept
3:14 azure windows TestAccept
3:13 azure-ucws windows TestAccept
3:09 aws-ucws windows TestAccept
3:09 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:04 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:50 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:49 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:45 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:45 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:41 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:38 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:36 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:36 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:35 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:34 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

Cloud acceptance tests create real Databricks resources (SQL warehouses,
clusters, schemas, ...) named from the per-run uniqueName. With a bare
base32 name, these are indistinguishable from other tooling's leaked test
resources in shared test workspaces, which makes attribution and cleanup hard.

Prefix the unique name with "cli" so CLI-created cloud resources are
identifiable. The prefix has no separator on purpose: the name feeds both
bundle/project names (which allow only [a-zA-Z0-9_]) and app hostnames (which
disallow underscores), so a separator-less alphanumeric prefix is the only
form valid in every context. The replacement keys on the full value, so output
normalization to [UNIQUE_NAME] is unchanged and no golden outputs change.

Signed-off-by: Hector Castejon Diaz <hector.castejon@databricks.com>
@hectorcast-db hectorcast-db force-pushed the add-cloud-resource-name-prefix branch from 0a81ff4 to f8b8e0f Compare June 5, 2026 14:51
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.

2 participants