Skip to content

Normalize bare hosts to HTTPS - #317

Open
parthban-db wants to merge 1 commit into
mainfrom
parthban-db/stack/sdk-js-fix-1
Open

Normalize bare hosts to HTTPS#317
parthban-db wants to merge 1 commit into
mainfrom
parthban-db/stack/sdk-js-fix-1

Conversation

@parthban-db

@parthban-db parthban-db commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🥞 Stacked PR

Use this link to review incremental changes.


Summary

Normalizes Databricks hosts at the generated transport boundary so every modular service client accepts scheme-less ClientOptions.host, configuration-profile host, and DATABRICKS_HOST values.

Why

Generated clients previously concatenated the configured host into request URLs without ensuring it was absolute. A bare host such as the value commonly supplied through DATABRICKS_HOST therefore reached fetch as a relative URL and failed with TypeError: Invalid URL, forcing consumers such as AppKit to normalize the host themselves.

What changed

Interface changes

  • ClientOptions.host now documents that HTTPS is used when the scheme is omitted; its TypeScript shape is unchanged.

Behavioral changes

  • Trim host input, prepend https:// when no HTTP(S) scheme is present, preserve explicit HTTP(S), and remove the trailing slash.
  • Pass the normalized host to default credentials so authentication discovery and API requests use the same endpoint.

Internal changes

  • Regenerate all 84 service transports from the updated generator and add table-driven coverage for environment, explicit, HTTPS, and local HTTP hosts.
  • Record the fix in the options package changelog.

How is this tested?

npm run build, npm run lint, npm run format:check, npm run typecheck, and npm test pass. The 298 browser tests in the browser-bearing packages also pass against the system-installed Chrome.

@parthban-db
parthban-db force-pushed the parthban-db/stack/sdk-js-fix-1 branch from ea5d4ab to 144f0f1 Compare September 4, 2026 09:57
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