You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.
I think it would be a good use case to add a -Wait switch for the Start-DatabricksJob (Or rename it to Execute-DatabricksJob) which keeps on waiting and outputs the status say every 30 seconds about the job.
-Pranav
The text was updated successfully, but these errors were encountered:
there is a similar thing around Add-DatabricksNotebookJob . It might be better to create a separate function that does something like this -
$runId=Add-DatabricksNotebookJob@DatabricksNotebookJobWrite-Host"Run ID - "$runIdWrite-Host"Running tests. This is the info for the job running the tests..."Get-DatabricksRun-RunId $runId$DatabricksJobRunState=$null$wait=1$currentStatus="INITIATED"Write-Host"There is a 20 minute timeout for test jobs."do {
Start-Sleep-Seconds 10$DatabricksJobRunState=Get-DatabricksRun-RunId $runId$DatabricksJobRunLifeCycleState=$DatabricksJobRunState.state.life_cycle_stateif ($currentStatus-ne$DatabricksJobRunLifeCycleState) {
Write-Host"Status has altered from $currentStatus to $DatabricksJobRunLifeCycleState."$currentStatus=$DatabricksJobRunLifeCycleState
}
if (($wait%5) -eq0) {
Write-Host"Job has not completed. Status is $DatabricksJobRunLifeCycleState."
}
$wait++
} until (($DatabricksJobRunLifeCycleState-notin"PENDING","RUNNING","TERMINATING","SKIPPED","INTERNAL_ERROR") -or ($wait-eq120))
Write-Host"Test Completed. Check here for the status of the job."$databricksRun=Get-DatabricksRun-RunId $runIdif ($databricksRun.state.result_state-ne"SUCCESS") {
$databricksRunWrite-Error"Job failed. Use url to open job and investigate"throw
}
Yeah, the -Wait would be beneficial in a lot of places. Right now, I am using this a similar logic as @RichieBzzzt mentioned in our scripts which is tedious. For example, cluster creation, library addition etc. It would be helpful in a lot of places :)
Thanks!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I think it would be a good use case to add a
-Wait
switch for theStart-DatabricksJob
(Or rename it to Execute-DatabricksJob) which keeps on waiting and outputs the status say every 30 seconds about the job.-Pranav
The text was updated successfully, but these errors were encountered: