Make auth profiles --skip-validate fully offline#5530
Merged
simonfaltum merged 3 commits intoJun 10, 2026
Conversation
EnsureResolved unconditionally fetches <host>/.well-known/databricks-config, so --skip-validate still made one network call per profile and warned when offline. Stub the host metadata resolver in the skip path so the listing resolves from the config file alone. Co-authored-by: Isaac
Co-authored-by: Isaac
janniklasrose
approved these changes
Jun 10, 2026
Collaborator
|
Commit: 5c57663
22 interesting tests: 15 SKIP, 7 KNOWN
Top 28 slowest tests (at least 2 minutes):
|
deco-sdk-tagging Bot
added a commit
that referenced
this pull request
Jun 10, 2026
## Release v1.3.0 ### Notable Changes * The `direct` deployment engine is now Generally Available and the default for new deployments. To opt out, set `engine: terraform` under `bundle` in your `databricks.yml` or set `DATABRICKS_BUNDLE_ENGINE=terraform`. Existing deployments keep their current engine; see https://docs.databricks.com/aws/en/dev-tools/bundles/direct to migrate. ### CLI * Added the `databricks quickstart` command, a short introduction to the CLI that prints a human-friendly guide interactively and an agent-oriented version when run non-interactively ([#5464](#5464)). * Add `databricks version --check` to report whether a newer CLI version is available and print the upgrade command for the detected install method ([#5469](#5469)). * `databricks auth describe` now verifies credentials against both the workspace and account endpoints before reporting a failure, fixing false "Unable to authenticate" errors for account console profiles ([#5479](#5479)). * `databricks auth login` no longer prompts for workspace selection when logging in to an account console host (`https://accounts.*`). Pass `--workspace-id` explicitly to store a workspace ID on such a profile ([#5504](#5504)). * `databricks auth profiles --skip-validate` no longer makes any network calls; the host metadata fetch is skipped along with validation ([#5530](#5530)). ### Bundles * Set the default `data_security_mode` to `DATA_SECURITY_MODE_AUTO` in bundle templates ([#5452](#5452)). * Mark vector search index index_subtype as backend_default to prevent drift after deployment ([#5454](#5454)). * `bundle deployment migrate`: handle resources added to or removed from `databricks.yml` since the last Terraform deploy ([#5463](#5463)). * Add the `genie_spaces` bundle resource for managing Databricks Genie spaces as code, plus `bundle generate genie-space` to import an existing space. Direct deployment engine only ([#5282](#5282)). * Fix spurious recreate of schemas and volumes whose names use mixed case ([#5531](#5531)).
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.
Why
databricks auth profiles --skip-validateis the "fast, offline" way to list profiles, but it still makes one network call per profile: config resolution unconditionally fetches<host>/.well-known/databricks-configto enrich the config. On a cold cache (or withDATABRICKS_CACHE_ENABLED=false) that means a fan-out of HTTP fetches from a command that promises not to touch the network, and offline machines getWarn: [hostmetadata] failed to fetch host metadata ...for a plain listing. Tools that shell out to the CLI at startup (editor integrations, agent hooks) need a listing that is guaranteed not to hang or warn.Changes
Before:
--skip-validateskipped the per-profile auth probes (Workspaces.List/CurrentUser.Me) but still resolved host metadata over HTTP. Now it makes no network calls at all.profileMetadata.LoadstubsHostMetadataResolveron the per-profile config when validation is skipped, soEnsureResolvedresolves from the config file alone. Cloud detection falls back to host-pattern inference, which is the same fallback that already applied whenever the metadata fetch failed. Output shape is unchanged.The
acceptance/auth/host-metadata-cachetest usedauth profiles --skip-validateas its fetch vehicle; it now runs full validation so it keeps exercising the disk cache (still exactly one recorded/.well-known/databricks-configrequest across two invocations). Thecmd/auth/profilesgolden loses the spurious offline warning; the JSON is unchanged.Test plan
TestProfileLoadSkipValidateMakesNoRequests: an httptest server backing the profile host receives zero requests when loading withskipValidatego test ./cmd/authauth/host-metadata-cache,cmd/auth/profiles,cmd/auth/switch(regeneratedhost-metadata-cacheandprofilesgoldens)./task checksandgolangci-lint run ./cmd/authThis pull request and its description were written by Isaac.