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

Properly detect Azure China and Azure GovCloud #331

Merged
merged 1 commit into from
Mar 9, 2023
Merged

Properly detect Azure China and Azure GovCloud #331

merged 1 commit into from
Mar 9, 2023

Conversation

fjakobs
Copy link
Contributor

@fjakobs fjakobs commented Mar 9, 2023

Needed for databricks/databricks-vscode#544

Tested manually:

Before

% DATABRICKS_HOST=https://adb-XXXXX.3.databricks.azure.cn/ DATABRICKS_AUTH_TYPE=azure-cli ../../bricks/bricks sync . /Repos/fabian.jakobs@XXXXX.cn/hackathon-q1-2023.ide --watch
2023/03/09 13:11:39 [INFO] Ignoring server auth, because azure-cli is preferred
2023/03/09 13:11:39 [INFO] Ignoring pat auth, because azure-cli is preferred
2023/03/09 13:11:39 [INFO] Ignoring basic auth, because azure-cli is preferred
2023/03/09 13:11:39 [INFO] Ignoring oauth-m2m auth, because azure-cli is preferred
2023/03/09 13:11:39 [INFO] Ignoring bricks-cli auth, because azure-cli is preferred
2023/03/09 13:11:39 [INFO] Ignoring azure-msi auth, because azure-cli is preferred
2023/03/09 13:11:39 [INFO] Ignoring azure-client-secret auth, because azure-cli is preferred
2023/03/09 13:11:39 [INFO] Ignoring google-credentials auth, because azure-cli is preferred
2023/03/09 13:11:39 [INFO] Ignoring google-id auth, because azure-cli is preferred
Error: default auth: cannot configure default credentials. Config: host=https://adb-XXXXX.3.databricks.azure.cn, bricks_cli_path=../../bricks/bricks. Env: DATABRICKS_HOST, BRICKS_CLI_PATH

After

% DATABRICKS_HOST=https://adb-XXXXX.3.databricks.azure.cn/ DATABRICKS_AUTH_TYPE=azure-cli ../../bricks/bricks sync . /Repos/fabian.jakobs@XXXXX.cn/hackathon-q1-2023.ide --watch
2023/03/09 13:15:10 [INFO] Ignoring pat auth, because azure-cli is preferred
2023/03/09 13:15:10 [INFO] Ignoring basic auth, because azure-cli is preferred
2023/03/09 13:15:10 [INFO] Ignoring oauth-m2m auth, because azure-cli is preferred
2023/03/09 13:15:10 [INFO] Ignoring bricks-cli auth, because azure-cli is preferred
2023/03/09 13:15:10 [INFO] Ignoring azure-msi auth, because azure-cli is preferred
2023/03/09 13:15:10 [INFO] Ignoring azure-client-secret auth, because azure-cli is preferred
2023/03/09 13:15:10 [INFO] Refreshed OAuth token for XXXXX from Azure CLI, which expires on 2023-03-09 14:08:18.000000
2023/03/09 13:15:10 [INFO] Using Azure CLI authentication with AAD tokens
2023/03/09 13:15:10 [INFO] Refreshed OAuth token for XXXXX from Azure CLI, which expires on 2023-03-09 14:08:18.000000
2023/03/09 13:15:13 [INFO] Initial Sync Complete

@fjakobs fjakobs requested review from pietern and nfx March 9, 2023 12:22
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

Logic LGTM but line length is too long.

@fjakobs
Copy link
Contributor Author

fjakobs commented Mar 9, 2023

@pietern fixed the line length. Disappointed at gofmt. I'm so used to just his "save" and not care about formatting.

@fjakobs fjakobs merged commit df5956f into main Mar 9, 2023
@fjakobs fjakobs deleted the fabian branch March 9, 2023 12:54
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.

2 participants