Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly detect Azure China and Azure GovCloud (#331)
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 ```
- Loading branch information