Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Files.for_cli unusably slow in unit tests #1127

Closed
1 task done
ericvergnaud opened this issue Mar 26, 2024 · 1 comment
Closed
1 task done

[BUG]: Files.for_cli unusably slow in unit tests #1127

ericvergnaud opened this issue Mar 26, 2024 · 1 comment

Comments

@ericvergnaud
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Calling Files.for_cli from a unit test with a workspace_client_mock takes minutes (or maybe more, I was never patient enough)

Expected Behavior

It should be fast enough so we can use it in unit tests.

Steps To Reproduce

Use Pycharm
In test_files.py, uncomment test_files_for_cli
Run the test

Cloud

AWS

Operating System

macOS

Version

latest via Databricks CLI

Relevant log output

No response

@nfx
Copy link
Collaborator

nfx commented Mar 26, 2024

perhaps you need to mock out the call to SqlExecution API. see https://github.com/databrickslabs/lsql tests. You can also create StatementExecutionBackend in cli.py & inject it into the method together with WorkspaceClient. and use MockBackend for tests.

@github-project-automation github-project-automation bot moved this to Triage in UCX Apr 22, 2024
@nfx nfx closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
@github-project-automation github-project-automation bot moved this from Triage to Archive in UCX Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants