Skip to content

Conversation

@mwojtyczka
Copy link
Contributor

@mwojtyczka mwojtyczka commented Oct 16, 2025

Changes

  • Increased the number of random characters used when creating resources from 4 to 8. In larger projects like DQX, which rely heavily on PyTester, collisions are occurring too frequently with the previous shorter identifiers
  • Bumped hatch version to avoid click compatibility issues

Tests

Changes covered by regression testing.

  • manually tested
  • added unit tests
  • added integration tests
  • verified on staging environment (screenshot attached)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR increases the length of random identifiers used in test resource names from 4 to 8 characters to reduce naming collisions when running tests in parallel. This change addresses resource name clashes encountered in larger projects using pytester extensively.

  • Increases random identifier length from 4 to 8 characters across all test fixtures
  • Affects resource naming for workspace objects, secrets, queries, ML components, IAM resources, compute resources, and catalog objects
  • Maintains existing naming patterns while reducing collision probability

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/databricks/labs/pytester/fixtures/workspace.py Updates random ID length for notebook, file, directory, and repo creation
src/databricks/labs/pytester/fixtures/secrets.py Updates random ID length for secret scope names
src/databricks/labs/pytester/fixtures/redash.py Updates random ID length for query names
src/databricks/labs/pytester/fixtures/ml.py Updates random ID length for ML experiments, models, and serving endpoints
src/databricks/labs/pytester/fixtures/iam.py Updates random ID length for user and group names
src/databricks/labs/pytester/fixtures/compute.py Updates random ID length for cluster policies, clusters, instance pools, jobs, pipelines, and warehouses
src/databricks/labs/pytester/fixtures/catalog.py Updates random ID length for catalog, schema, table, function, and volume names

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 16, 2025

✅ 40/40 passed, 6 skipped, 5m27s total

Running from acceptance #220

@mwojtyczka mwojtyczka changed the title Increased the number of random letter to use when creating resources Increased the number of random characters used when creating resources to minimize collisions Oct 16, 2025
@mwojtyczka mwojtyczka requested a review from Copilot October 16, 2025 12:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@alexott alexott merged commit 963c8af into main Oct 17, 2025
8 checks passed
@alexott alexott deleted the improve_random branch October 17, 2025 07:29
sundarshankar89 added a commit that referenced this pull request Oct 17, 2025
* Increased the number of random characters used when creating resources to minimize collisions ([#214](#214)). The library has been updated to increase the number of random characters used when creating resources from 4 to 8, minimizing collisions in larger projects that heavily rely on PyTester. This change affects various resource creation methods, including the generation of names for tables, schemas, catalogs, functions, storage credentials, volumes, users, groups, experiments, models, endpoints, and queries. The `make_random` function is now called with an argument of 8 to generate longer and more unique identifiers. Additionally, the hatch version has been updated from 1.9.4 to 1.15.0 to avoid compatibility issues with click. These changes are covered by regression testing and have been manually tested to ensure their effectiveness in reducing the frequency of collisions and improving the overall stability of the system.
sundarshankar89 added a commit that referenced this pull request Oct 17, 2025
* Increased the number of random characters used when creating resources to minimize collisions ([#214](#214)). The continuous integration workflow has been updated to install a newer version of the hatch tool, specifically version 1.15.0, replacing the previous version 1.9.4, to avoid compatibility issues with click. Additionally, the code has been modified to increase the number of random characters used when creating resources from 4 to 8, aiming to minimize collisions, particularly in larger projects that rely heavily on PyTester. This change affects various resource creation methods and is intended to reduce the likelihood of name collisions and improve the overall stability of the system. The changes are covered by regression testing and have been manually tested to ensure their correctness and effectiveness.
@sundarshankar89 sundarshankar89 mentioned this pull request Oct 17, 2025
mwojtyczka pushed a commit that referenced this pull request Oct 17, 2025
* Increased the number of random characters used when creating resources
to minimize collisions
([#214](#214)). The
continuous integration workflow has been updated to install a newer
version of the hatch tool, specifically version 1.15.0, replacing the
previous version 1.9.4, to avoid compatibility issues with click.
Additionally, the code has been modified to increase the number of
random characters used when creating resources from 4 to 8, aiming to
minimize collisions, particularly in larger projects that rely heavily
on PyTester. This change affects various resource creation methods and
is intended to reduce the likelihood of name collisions and improve the
overall stability of the system. The changes are covered by regression
testing and have been manually tested to ensure their correctness and
effectiveness.
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