databrickslabs / databrickslabs/lsql
[TECH DEBT] Replace the `make_dashboard` integration test fixture with `make_directory`
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Instead of creating an empty, unpublished dashboard in the integration test to overwrite later. A temporary remote directory can be passed as parent path to the deploy dashboard:
- Overwriting an empy, unpublished dashboard is a bit of hack
- The remote directory can get a purge suffix so that it will be deleted by watch dog in case it is not cleaned up properly
Copy from ucx:
@pytest.fixture
def make_directory(ws, make_random):
def create(*, path: str | None = None):
if path is None:
path = f"/Users/{ws.current_user.me().user_name}/lsql-{make_random(4)}-{get_purge_suffix()}"
ws.workspace.mkdirs(path)
return path
yield from factory("directory", create, lambda x: ws.workspace.delete(x, recursive=True))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the integration test that uses the make_dashboard fixture and inspect the deploy-dashboard setup around it. Compare the requested make_directory fixture with the provided ucx example, then verify that the integration tests create and clean up a temporary remote directory instead of overwriting an empty unpublished dashboard.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100