Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix URI construction in ThriftBackend #303

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

NodeJSmith
Copy link
Contributor

closes #230

This pull request fixes the URI construction in the ThriftBackend class of the thrift_backend.py file. The current implementation does not handle the case where the server_hostname is provided with the https:// prefix, resulting in duplicate https:// in the URI. This PR addresses that issue by checking if the uri starts with https:// and adding it if necessary.

Additionally, this PR also fixes the case where the server_hostname is provided with a trailing backslash. The current implementation duplicates the trailing backslash in the URI, which is incorrect. This PR removes the duplicate backslash.

Lastly, this PR includes unit tests to verify the correctness of the URI construction.

Changes:

  • Updated the URI construction logic in the ThriftBackend class.
  • Added unit tests for the URI construction.

Please review and merge this pull request.

…st for this

Signed-off-by: Jessica <12jessicasmith34@gmail.com>
Signed-off-by: Jessica <12jessicasmith34@gmail.com>
Signed-off-by: Jessica <12jessicasmith34@gmail.com>
@susodapop susodapop self-assigned this Dec 26, 2023
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
Copy link
Contributor

@susodapop susodapop left a comment

Choose a reason for hiding this comment

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

Looks great. Thank you!

@susodapop
Copy link
Contributor

I've run our e2e tests for this change. Will merge once the PR checks pass.

@susodapop susodapop merged commit 918752f into databricks:main Jan 23, 2024
11 checks passed
@NodeJSmith NodeJSmith deleted the fix/https_in_host branch January 23, 2024 18:43
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.

server_hostname string should be less picky
2 participants