Repository navigation
aitools: raise the plugin probe timeout from 5s to 20s #7472
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +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)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,13 @@ var lookPath = exec.LookPath | |
|
|
||
| const ( | ||
| // pluginProbeTimeout bounds the `<agent> plugin --help` capability check. | ||
| pluginProbeTimeout = 5 * time.Second | ||
| // Agent CLIs are large Node/Rust binaries whose cold start (first run, | ||
| // antivirus scan, slow container disk) can take several seconds, and a probe | ||
| // that times out reports the agent as unavailable, so leave headroom. | ||
| // It also bounds `<agent> plugin marketplace list` in marketplaceRegistered, | ||
| // where a timeout means the marketplace is assumed already registered, so | ||
| // install does not record it and uninstall leaves it registered. | ||
| pluginProbeTimeout = 20 * time.Second | ||
|
Comment on lines
22
to
+29
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] This comment explains 20s by the cold start of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment now also covers
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nice to have]
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed it's worth doing, but I'd keep it out of this PR, which only changes the timeout value. Two reasons:
I'll call out the Windows caveat in the Merge Danger section of the description.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, it isn't in the stack yet. As I answered above, it stays a follow-up rather than part of this PR, which only changes the timeout value. Agreed that a tracking issue would keep it from getting lost. |
||
| // pluginCmdTimeout bounds an install/update/uninstall command, which may | ||
| // clone the marketplace repo, so it gets more headroom than the probe. | ||
| pluginCmdTimeout = 60 * time.Second | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nice to have]
libs/aitools/agents/detect.go:20still has its ownpluginProbeTimeout = 5 * time.Secondfor the same<agent> plugin --helpprobe in(*Agent).ProbePlugin. After this PR, two constants with the same name disagree (5s vs 20s). Only tests callProbePlugintoday. Its doc, though, says it is "meant to be called once, for a selected agent, right before install", so wiring it in later would bring back the 5s false "unavailable" result this PR fixes. Please either raise that constant too, or deleteProbePluginwith its constant and tests so only one probe is left.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raised
pluginProbeTimeoutinlibs/aitools/agents/detect.goto 20s as well, with a comment saying it matches the installer probe, soProbePluginno longer disagrees if it gets wired in. I keptProbePluginrather than deleting it, to keep this PR to the timeout change. (410f869)