Skip to content

Conversation

@nikhilsuri-db
Copy link
Contributor

@nikhilsuri-db nikhilsuri-db commented Dec 30, 2025

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Other

Description

Problem
Feature flag and telemetry endpoints were double-prepending https:// when server_hostname already included the protocol, causing https://https://host.com URLs. This broke telemetry for dbt-databricks users who configure hostnames with https:// prefix.

Solution
Added normalize_host_with_protocol() utility to handle protocol normalization
Updated feature flag and telemetry clients to use: normalize_host_with_protocol(host) + "/path"
Handles hostnames with/without protocol and trailing slashes

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually
  • N/A

Related Tickets & Documents

#709

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

1 similar comment
@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

Signed-off-by: Nikhil Suri <nikhil.suri@databricks.com>
Signed-off-by: Nikhil Suri <nikhil.suri@databricks.com>
Signed-off-by: Nikhil Suri <nikhil.suri@databricks.com>
@github-actions
Copy link

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

Signed-off-by: Nikhil Suri <nikhil.suri@databricks.com>
Signed-off-by: Nikhil Suri <nikhil.suri@databricks.com>
Copy link
Contributor

@samikshya-db samikshya-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor comments, thanks!

(common with dbt-databricks users copying URLs from their browser).

Args:
host: Connection hostname which may or may not include a protocol prefix (https:// or http://)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit : case insensitivity should be considered

normalize_host_with_protocol("https://myserver.com") -> "https://myserver.com"
"""
# Remove trailing slash
host = host.rstrip("/")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit : check for NPE

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.

3 participants