-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Labels
Description
Describe the issue
When using azure-devops-oidc authentication in Azure DevOps pipelines, CLI commands like databricks current-user me and databricks bundle validate work correctly. However, databricks bundle deploy fails during the Terraform apply phase. The error message is as follows:
Error: terraform apply: exit status 1
Error: cannot create job: failed during request visitor: azure-devops-oidc auth: not calling from Azure DevOps Pipeline: missing env var SYSTEM_TEAMFOUNDATIONCOLLECTIONURI. Config: host=https://adb-xxxx.azuredatabricks.net, client_id=<CLIENT_ID>. Env: DATABRICKS_HOST, DATABRICKS_CLIENT_ID
with databricks_job.gnaf_dlt_orchestrator_job,
on bundle.tf.json line 54, in resource.databricks_job.gnaf_dlt_orchestrator_job:
54: },
I was actually facing issue #4047 yesterday and once it has been fixed, the current issue started to appear.
Steps to reproduce the behavior
- Configure a Databricks service principal with Azure DevOps OIDC federation policy
- Set up an Azure DevOps pipeline like the following :
steps:
- task: Bash@3
inputs:
targetType: 'inline'
script: |
databricks bundle deploy -t dev
displayName: 'Deploy Bundle'
env:
DATABRICKS_HOST: $(DATABRICKS_HOST)
DATABRICKS_CLIENT_ID: $(DATABRICKS_CLIENT_ID)
DATABRICKS_AUTH_TYPE: azure-devops-oidc
SYSTEM_ACCESSTOKEN: $(System.AccessToken)- Run the pipeline
Expected Behavior
databricks bundle deploy should deploy the bundle successfully.
Actual Behavior
Bundle deployment fails and the DevOps task fails with error ##[error]Bash exited with code '1'
OS and CLI version
- Databricks CLI v0.281.0
- Ubuntu (Azure DevOps hosted agent vmImage: ubuntu-latest)
Is this a regression?
- Unknown
Debug Logs
Error: terraform apply: exit status 1
Error: cannot create job: failed during request visitor: azure-devops-oidc auth: not calling from Azure DevOps Pipeline: missing env var SYSTEM_TEAMFOUNDATIONCOLLECTIONURI. Config: host=https://adb-xxxx.azuredatabricks.net, client_id=<CLIENT_ID>. Env: DATABRICKS_HOST, DATABRICKS_CLIENT_ID
with databricks_job.gnaf_dlt_orchestrator_job,
on bundle.tf.json line 54, in resource.databricks_job.gnaf_dlt_orchestrator_job:
54: },