databricks / databricks-sql-go

Golang database/sql driver for Databricks SQL.
Apache License 2.0
34 stars 37 forks source link

Fixed the AzureTenantId in oauth.go #210

Closed tubiskasarus closed 2 months ago

tubiskasarus commented 2 months ago

AzureTenantId was hardcoded as a constant which was linked to ".staging.azuredatabricks.net". Therefore, if the host URL was for example from ".azuredatabricks.net", it failed to detect ClientId. I replaced the const value with a map to find the AzureTenantId based on the DSN host.

tubiskasaroos commented 2 months ago

Apologies for submitting the pull request using my test account. I have now transferred the ownership of the forked repository to my main account. I wanted to clarify this to avoid any suspicion. 🙏

kravets-levko commented 2 months ago

@tubiskasaroos can you please rebase your branch? Looks it contains some irrelevant changes

tubiskasaroos commented 2 months ago

@kravets-levko, I’m a bit apprehensive because this is my first time contributing on GitHub. I’ve pushed a change from a forked repository to the original one, and I attempted to rebase and address the previous issue related to signing off. However, I lack confidence in whether my actions were correct. Would it be possible to receive some assistance, or should I create a separate fork and submit another pull request?

kravets-levko commented 2 months ago

@tubiskasaroos sorry if my message feels rude - there was no such intention at all. Of course I can help you.

Go to your fork, select main branch in dropdown. Under that dropdown there's a message "This branch is 2 commits behind databricks/databricks-sql-go:main", and next to it is a "Sync fork" button. Click it and select "Update branch".

Next, go to terminal/command line on your computer, and run these commands:

git checkut main
git pull
git checkout patch-1
git pull
git merge main
git push

There should be no conflicts, but in a case of any - resolve them.

I'll keep an eye on this PR. Please feel free to ping me if any questions.

Sync fork screenshot ![image](https://github.com/databricks/databricks-sql-go/assets/12139186/d11948ec-5cb4-47c2-9f8e-fb69f2b361a2)
kravets-levko commented 2 months ago

Much better now 🙂 Thank you!

tubiskasaroos commented 2 months ago

All good. Thank you so much for your help!