Skip to content

Add hostMetadata type and getHostMetadata helper#1499

Open
hectorcast-db wants to merge 1 commit intomainfrom
hectorcast-db/stack/config-auto-complete-1
Open

Add hostMetadata type and getHostMetadata helper#1499
hectorcast-db wants to merge 1 commit intomainfrom
hectorcast-db/stack/config-auto-complete-1

Conversation

@hectorcast-db
Copy link
Contributor

@hectorcast-db hectorcast-db commented Feb 25, 2026

🥞 Stacked PR

Use this link to review incremental changes.


Changes

Ported from databricks-sdk-py#1288.

Add hostMetadata type and getHostMetadata helper to config/.

The getHostMetadata function fetches the /.well-known/databricks-config
discovery endpoint and returns a hostMetadata struct containing:

  • OIDCEndpoint — raw OIDC endpoint (may contain {account_id} template)
  • AccountID — account ID (if present)
  • WorkspaceID — workspace ID (if present)

This is the foundation for auto-completing config fields from the host's
well-known metadata.

Tests

Unit tests in config/host_metadata_test.go cover:

  • Workspace host returning a static OIDC endpoint with account/workspace IDs
  • Account host returning an OIDC endpoint template with {account_id} placeholder
  • HTTP error returns a descriptive error message

Adds the hostMetadata struct and getHostMetadata function for
fetching and parsing the /.well-known/databricks-config discovery
endpoint. Returns raw metadata with no placeholder substitution,
keeping it a pure discovery primitive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hector Castejon Diaz <hector.castejon@databricks.com>
@hectorcast-db hectorcast-db force-pushed the hectorcast-db/stack/config-auto-complete-1 branch from cfa5625 to f6fe7e3 Compare February 25, 2026 08:40
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1499
  • Commit SHA: f6fe7e3aa25bce0135cf1cff721dff5b8d168979

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant