Repository navigation
Narrow "not enabled" to 404, memoize the gateway probe, and quiet the sudo note - #1336
Open
guidobouman wants to merge 2 commits into
Open
guidobouman wants to merge 2 commits into
guidobouman wants to merge 2 commits into
Conversation
guidobouman
marked this pull request as ready for review
October 28, 2026 11:34
lilly-luo
self-requested a review
October 28, 2026 11:40
lilly-luo
reviewed
Oct 28, 2026
lilly-luo
left a comment
Collaborator
There was a problem hiding this comment.
Nice fix overall. The 404-only "not enabled" message and the probe memoization both address real UX problems, and the tests cover the new paths well. A few things to look at:
- Retries have no backoff (
databricks.py:2177): the probe now retries 429 and 5xx back-to-back, with noRetry-Afterhandling, against an endpoint we already know is overloaded. - Worst-case latency (
databricks.py:3748): the comment says the worst case stays near the old 10s, but a hanging page 0 now takes about 40s under the spinner. - Other definitive 4xx errors fall into the "transient" message (
databricks.py:3845): worth confirming what a workspace without UG actually returns. - Cache key (
databricks.py:3827): keyed on workspace only, and it also caches empty/inconclusive "reachable" results. Fine for today's single-profile flow; a short note or a(workspace, token)key would make that explicit. - Nit: the
test_cli.pyreformat of theHTTP 401tuple is unrelated churn.
The sudo-note change looks good to me. As a side benefit, sudo -n true succeeds as root, so the note no longer appears when ug runs as root either.
lilly-luo
reviewed
Oct 28, 2026
guidobouman
force-pushed
the
guido-b/gateway-probe-fixes
branch
from
October 28, 2026 20:11
6d3f2d9 to
9654f2c
Compare
Author
|
Scoped it down, but think this set still makes sense. Your take? |
lilly-luo
approved these changes
Oct 29, 2026
Author
|
Thanks for the approval, @lilly-luo! I don't have write access to this repo, so I can't add it to the merge queue myself. Could you queue it when you get a chance? |
… sudo note - Only an HTTP 404 from the model-services probe is reported as "not enabled on this workspace". Any other non-transient, non-auth failure now says the gateway could not be verified, without claiming it is disabled or transient. - Memoize successful gateway probes per workspace for the process, so the second configure pass (auto-setup, then launch) does not re-probe a gateway that just answered. Failures are never cached. - Skip the "Enter password" note when sudo is passwordless. The probe's retry of transient errors comes from databricks#1246; this change does not alter it. Co-authored-by: Isaac <no-reply@databricks.com>
…cessible results Co-authored-by: Isaac <no-reply@databricks.com>
guidobouman
force-pushed
the
guido-b/gateway-probe-fixes
branch
from
October 29, 2026 22:48
b2c0137 to
f4abce1
Compare
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.
Summary
ug codexconfigures once for auto-setup and again on the launch path. Re-probing a gateway that had just answered only gave the flaky model-services listing another chance to fail. Failures are never cached.The probe's retry of transient errors now comes from #1246, so this PR no longer changes retry or timeout behavior.
Tests
configure_shared_statein one process doesn't re-probe.ruff format,ruff checkandty checkare clean.test_agents_init.py::TestInstallToolBinary,test_e2e_user_agent.py,test_smart_router.py). Before the rebase, the same 11 also failed on an unmodified checkout.This pull request and its description were written by Isaac.