Skip to content

Commit

Permalink
fix delete post data bug, add PENDING message info
Browse files Browse the repository at this point in the history
Signed-off-by: Future Outlier <[email protected]>
  • Loading branch information
Future Outlier committed Nov 5, 2023
1 parent 814b697 commit 1596536
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase
}
return pluginsCore.PhaseInfoFailure(string(rune(statusCode)), message, taskInfo), nil
}

if lifeCycleState == "PENDING" {
return core.PhaseInfoInitializing(time.Now(), core.DefaultPhaseVersion, message, taskInfo), nil
}

Check warning on line 242 in flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/plugins/webapi/databricks/plugin.go#L240-L242

Added lines #L240 - L242 were not covered by tests

return core.PhaseInfoRunning(pluginsCore.DefaultPhaseVersion, taskInfo), nil
case http.StatusBadRequest:
fallthrough
Expand Down Expand Up @@ -283,7 +288,7 @@ func buildRequest(
var err error
if isCancel {
databricksURL += "/cancel"
data = []byte(fmt.Sprintf("{ run_id: %v }", runID))
data = []byte(fmt.Sprintf("{ \"run_id\": %v }", runID))
} else if method == post {
databricksURL += "/submit"
mJSON, err := json.Marshal(databricksJob)
Expand Down

0 comments on commit 1596536

Please sign in to comment.