Repository navigation
Raise the databricks --version probe timeout to 30s - #1337
Closed
michaelp-db wants to merge 1 commit into
Closed
michaelp-db wants to merge 1 commit into
michaelp-db wants to merge 1 commit into
Conversation
On a loaded arca box the dbexec-wrapped CLI can take more than 10s to answer `--version`. The timeout reads as an unparseable version, so the launch fails with "Could not parse Databricks CLI version" even though the re-probe for the error message returns a valid one. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Author
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.
What did you change, and why?
Raised the
databricks --versionprobe timeout from 10s to 30s (new constant_DATABRICKS_CLI_VERSION_TIMEOUT_SECONDS). Both_read_databricks_cli_versionand the re-probe thatensure_databricks_cli_versionruns for its error message now use it.On a loaded arca machine,
databricks --versionthrough the dbexec wrapper can take longer than 10s. On arca,/usr/local/bin/databricksis a wrapper (exec /usr/local/bin/dbexec repo run databricks "$@"), not the raw binary, so every call pays dbexec overhead and contends with other dbexec tools that start at the same time.Failure seen on arca on 2026-10-27, when isaac was launched from OpenUI:
The version string is valid: the parser regex handles it and the minimum is 1.0.0. What happened is that
_read_databricks_cli_versionreturnsNoneonTimeoutExpired, just as it does for unparseable output.ensure_databricks_cli_versionthen saw no parsed versions and ran--versionagain only to fill in the message. That second run succeeded, so the message shows a good version and blames parsing. The first probe had timed out.Measured on arca (32 cores, load avg ~14 at the time):
_discover_databricks_clis(use_cache=False)took 0.07–1.1s when idle.databricks --versioncalls: min 0.10s, max 7.24s.So moderate concurrency alone reaches ~7.7s, before any other machine load. When several isaac/OpenUI sessions start at once on a loaded box, the probe goes past 10s. The normal case is unaffected because the timeout only matters when the CLI is slow.
Possible follow-up (not in this PR): when the probe times out, the error should say "timed out" instead of "could not parse".
How do you know it works?
A new unit test checks that
_read_databricks_cli_versionpasses the new timeout.tests/test_databricks.pyandtests/test_desktop_auth.pypass (509 tests), andjust lintis clean.This pull request and its description were written by Isaac.