Skip to content
This repository was archived by the owner on Jan 28, 2022. It is now read-only.
18 changes: 18 additions & 0 deletions controllers/run_controller_databricks.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,25 @@ func (r *RunReconciler) submit(instance *databricksv1alpha1.Run) error {
return err
}


// update the run state now, in case the RunsGetOutput call below fails
var pendingState dbmodels.RunLifeCycleState = dbmodels.RunLifeCycleStatePending
run.State = &dbmodels.RunState{
LifeCycleState: &pendingState,
}
instance.Status = &azure.JobsRunsGetOutputResponse{
Metadata: run,
}

err = r.Update(context.Background(), instance)
if err != nil {
return err
}



runOutput, err := r.getRunOutput(run.RunID)

if err != nil {
return err
}
Expand Down