Skip to content

Commit 5cb043a

Browse files
anton-107Isaac
andcommitted
aitools: raise the plugin probe timeout from 5s to 20s
`databricks aitools install` runs `<agent> plugin --help` to check that the agent's CLI can install plugins. Agent CLIs are large Node/Rust binaries, and a cold start (first run, antivirus scan, slow container disk) can take several seconds. When the probe times out, the agent is reported as unavailable. ```diff // libs/aitools/installer/plugin.go -pluginProbeTimeout = 5 * time.Second +pluginProbeTimeout = 20 * time.Second ``` The same constant also bounds `<agent> plugin marketplace list`. Changelog fragment: `.nextchanges/cli/aitools-plugin-probe-timeout.md`. Co-authored-by: Isaac <no-reply@databricks.com>
1 parent 151571c commit 5cb043a

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* `databricks aitools install` and `databricks aitools update` now wait up to 20 seconds instead of 5 for a coding agent's CLI to answer the plugin capability check, so a slow first start is less likely to report the agent as unavailable. ([#7472](https://github.com/databricks/cli/pull/7472))

‎libs/aitools/agents/detect.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import (
1616
var lookPath = exec.LookPath
1717

1818
// pluginProbeTimeout bounds the `<agent> plugin --help` capability probe so a
19-
// hung agent CLI cannot stall install.
20-
const pluginProbeTimeout = 5 * time.Second
19+
// hung agent CLI cannot stall install. It matches the probe timeout in
20+
// libs/aitools/installer, which leaves headroom for a slow agent CLI cold start.
21+
const pluginProbeTimeout = 20 * time.Second
2122

2223
// DisplayState describes how an agent should be presented in the install
2324
// picker. It combines the two cheap presence signals (binary on PATH and

‎libs/aitools/installer/plugin.go‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ var lookPath = exec.LookPath
2020

2121
const (
2222
// pluginProbeTimeout bounds the `<agent> plugin --help` capability check.
23-
pluginProbeTimeout = 5 * time.Second
23+
// Agent CLIs are large Node/Rust binaries whose cold start (first run,
24+
// antivirus scan, slow container disk) can take several seconds, and a probe
25+
// that times out reports the agent as unavailable, so leave headroom.
26+
// It also bounds `<agent> plugin marketplace list` in marketplaceRegistered,
27+
// where a timeout means the marketplace is assumed already registered, so
28+
// install does not record it and uninstall leaves it registered.
29+
pluginProbeTimeout = 20 * time.Second
2430
// pluginCmdTimeout bounds an install/update/uninstall command, which may
2531
// clone the marketplace repo, so it gets more headroom than the probe.
2632
pluginCmdTimeout = 60 * time.Second

0 commit comments

Comments
 (0)