DataThirstLtd / databricks.vsts.tools

VSTS Deployment Tasks for Databricks Objects
MIT License
18 stars 3 forks source link

Databricks Deploy Cluster task outputs invalid variables #18

Closed lapellaniz closed 4 years ago

lapellaniz commented 4 years ago

Description:

"Databricks Deploy Cluster" task is returning an invalid value for the cluster ID. Sometimes the output variable will contain the full JSON REST response payload returned from the create call, and sometimes the variable is empty.

Actual: The Azure DevOps variable $(DatabricksClusterId) outputs the following:

@{cluster_id=0403-200058-slaoe570}

For existing clusters, even if the JSON definition doesn't change, the logic in the task finds the cluster but also determines that the cluster has changed.

Expected:

MrCandle commented 4 years ago

Same thing is happening to me

MrCandle commented 4 years ago

I was looking at the code and it says the following: "description": "This is the ClusterId created/edited for use in other requests reference as $(ClusterId) or $env:ClusterId in PS Scripts"

It was also empty in my case

MrCandle commented 4 years ago

According to the powershell code, it should still be DatabricksClusterId: Write-Host "##vso[task.setVariable variable=DatabricksClusterId;]$ClusterId" Write-Host "##vso[task.setVariable variable=Extension.DatabricksClusterId;]$ClusterId"

simondmorias commented 4 years ago

Deployed a fix for this. Thanks for reporting.