Fix : [ISSUE] databricks auth login - Invalid Databricks Account configuration when host does not specify scheme #1403#1196
Conversation
…iguration when host does not specify scheme databricks#1403
…iguration when host does not specify scheme databricks#1403
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
|
Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. If this PR is still relevant, please leave a comment or push new changes to keep it open. Thank you for your contributions. |
|
Hi @lakshiya, sorry for the very late response on this. Thanks for taking the time to investigate this and put together a fix. The issue you identified was real -- That said, this has since been addressed differently. Closing this as superseded. Thanks again for the contribution. |
What changes are proposed in this pull request?
This PR addresses an issue where the Databricks authentication process fails when the host URL does not explicitly include the https:// scheme.
WHAT
The following changes were made:
IsAccountClientfunction in[./config/config.go](config/config.go)to account for host URLs without thehttps://scheme (e.g.,accounts.cloud.databricks.com).https://scheme.https://scheme.WHY
Previously, the authentication failed for users who did not specify https:// in their host URL, even though this should have been allowed. The change ensures that authentication works seamlessly even when the URL is missing the scheme, avoiding unnecessary errors.
How is this tested?
Added unit tests functions in
[./config/config_test.go](config/config_test.go)to validate the changes:TestIsAccountClient_WithoutHTTPSInHost_AWSAccount: Validates that the IsAccountClient function works for AWS accounts without the https:// scheme.TestIsAccountClient_WithoutHTTPSInHost_AwsDodAccount: Tests the same functionality for AWS DOD accounts.After:
Before: