-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functionality to restart always running jobs #715
Conversation
Codecov Report
@@ Coverage Diff @@
## master #715 +/- ##
==========================================
+ Coverage 83.49% 83.56% +0.06%
==========================================
Files 87 87
Lines 8015 8060 +45
==========================================
+ Hits 6692 6735 +43
- Misses 842 843 +1
- Partials 481 482 +1
|
@@ -573,7 +573,9 @@ func (j Job) ID() string { | |||
|
|||
// RunParameters ... | |||
type RunParameters struct { | |||
// TODO: if we add job_id, it can be also a request to RunNow | |||
// a shortcut field to reuse this type for RunNow | |||
JobID int64 `json:"job_id,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be tf:"computed"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this entity is not exposed to TF - just internal comms
compute/resource_job.go
Outdated
@@ -15,13 +17,14 @@ import ( | |||
|
|||
// NewJobsAPI creates JobsAPI instance from provider meta | |||
func NewJobsAPI(ctx context.Context, m interface{}) JobsAPI { | |||
return JobsAPI{m.(*common.DatabricksClient), ctx} | |||
return JobsAPI{m.(*common.DatabricksClient), ctx, 20 * time.Minute} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to make timeout configurable? I have seen the situations when stopping the stream could take a significant amount of time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexott stopping the stream as in cancelling the job? could you check? there's no way to call dataplane apis, as they require WebUI token instead of PAT or AAD.
we can add the same timeout configuration as for clusters/workspaces.
* Implements feature #389 * Functionality is triggered only if `always_running` attribute is present * Uses RunsList, RunsCancel and RunNow methods from Jobs API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
always_running
attribute is present