Stop ug configure erroring on feature-disabled workspaces - #500
Open
david-siqi-liu wants to merge 1 commit into
Open
Stop ug configure erroring on feature-disabled workspaces#500david-siqi-liu wants to merge 1 commit into
ug configure erroring on feature-disabled workspaces#500david-siqi-liu wants to merge 1 commit into
Conversation
david-siqi-liu
marked this pull request as ready for review
September 4, 2026 19:52
lilly-luo
reviewed
Sep 4, 2026
lilly-luo
reviewed
Sep 4, 2026
lilly-luo
reviewed
Sep 4, 2026
david-siqi-liu
force-pushed
the
david/ug-configure-wording
branch
2 times, most recently
from
September 6, 2026 15:06
2ef3099 to
87045b6
Compare
ug configure erroring on feature-disabled workspaces; hide unramped managed commandsug configure erroring on feature-disabled workspaces
`refresh_managed_config` treated FEATURE_DISABLED like a transient read failure and fell back to a stale cached config with the feature-disabled flag unset, masking the disabled state. An admin was then routed into the managed setup flow, which re-read the workspace, got FEATURE_DISABLED, and raised the alarming circular error. Treat FEATURE_DISABLED as authoritative: return no config with the flag set and clear the persisted cache, so `ug configure` stays on the normal per-user flow, a launch does not re-apply a policy the workspace has turned off, and a later transient read or token failure cannot resurrect the disabled policy through the fallback. Also initialize the feature-disabled flag on the `--dry-run` path (a pre-existing UnboundLocalError when the local cache is empty). Co-authored-by: Isaac <no-reply@databricks.com>
david-siqi-liu
force-pushed
the
david/ug-configure-wording
branch
from
September 6, 2026 20:03
87045b6 to
75f90cb
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.
🥞 Stack (ug configure + managed-config)
ug configureerroring on feature-disabled workspaces #500 ⬅ this PRWhat did you change, and why?
Customers running
ug configureon a workspace where server-managed coding-agent config is disabled (FEATURE_DISABLED) hit an alarming, circular error and then dead-ended:Root cause:
refresh_managed_configtreated FEATURE_DISABLED like a transient read failure and fell back to a stale cached config, returning it with the feature-disabled flag unset. That masked the disabled state, so an admin got routed into the managed setup flow, which re-read the workspace, got FEATURE_DISABLED again, and raised the message.The fix is in
managed_config.py: FEATURE_DISABLED is now authoritative. It returns no config with the feature-disabled flag set and clears the persisted cache, soug configurestays on the normal per-user flow, a launch never re-applies a policy the workspace turned off, and a later transient read or token failure cannot resurrect the disabled policy through the fallback. Also initializes the feature-disabled flag on the--dry-runpath (a pre-existing UnboundLocalError on an empty local cache, surfaced by review).Hiding
ug setup/ug publishfrom help and pruning the README, previously bundled here, moved to standalone #510 since it has no dependency on this fix.How do you know it works?
Affected unit suites (managed_config, cli) green, including new coverage for the feature-disabled cache clear and the dry-run no-crash path. ruff check and format clean. PR CI green (test + e2e).
This pull request and its description were written by Isaac.