acceptance: prefix unique test resource names with "cli-"#5453
Open
hectorcast-db wants to merge 1 commit into
Open
acceptance: prefix unique test resource names with "cli-"#5453hectorcast-db wants to merge 1 commit into
hectorcast-db wants to merge 1 commit into
Conversation
Contributor
Waiting for approvalBased on git history, these people are best suited to review:
Eligible reviewers: Suggestions based on git history. See OWNERS for ownership rules. |
Collaborator
|
Commit: f8b8e0f Ignoring .gh-logs/27022107241/update-check-action/action.yml: cannot extract env
22 interesting tests: 15 SKIP, 4 flaky, 3 RECOVERED
Top 25 slowest tests (at least 2 minutes):
|
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>
0a81ff4 to
f8b8e0f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Prefix the per-run
uniqueNameused by the acceptance test harness withcli-.This name is exported to tests as
$UNIQUE_NAMEand 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
uniqueNameis generated, so every resource named via$UNIQUE_NAMEbenefits, 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. Verifiedgo build ./...andgofmt. CI runs the acceptance suite.This pull request and its description were written by Isaac.