Allow jobs to be submitted in paused
status
#104322
No reviewers
Labels
No Label
Good First Issue
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Job Type
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: studio/flamenco#104322
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "David-Zhang-10/flamenco:submit-as-paused"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
This pull request implements Issue #99439 Allow jobs to be submitted in paused status and builds upon PR #104313 Support pausing jobs.
Deliverables
paused
status, the job shows up correctly in the web interface.@ -94,2 +94,2 @@
// TODO: check whether this job should be queued immediately or start paused.
authoredJob.Status = api.JobStatusQueued
submittedJob := api.SubmittedJob(job)
if *submittedJob.InitialStatus == api.JobStatusPaused {
If
submittedJob.InitialStatus
isnil
, dereferencing the pointer will cause a panic.@ -96,0 +95,4 @@
if *submittedJob.InitialStatus == api.JobStatusPaused {
authoredJob.Status = api.JobStatusPaused
} else {
authoredJob.Status = api.JobStatusQueued
This will cause a job with
initialStatus: "failed"
to be accepted, and silently its initial status will be overwritten. I don't this is a good approach. I think this is sufficient:If you want to do more validation you could, but I don't think it's necessary. In that case, a global variable declared at the top could help:
WIP: Allow jobs to be submitted in `paused` statusto Allow jobs to be submitted in `paused` statusLooking good!
01d5b42e9b
to0ab9f47aad
0ab9f47aad
to00848a3755
The split-up into three commits looks good! And for me it's also confirming that the choice to do these splits is a good one. Now there is a clear overview of what changed in the API definition, and what was necessary to implement that change. Without the noise of all the generated files, this gets much clearer.
Please press the 'Rebase then fast-forward' button :)