Skip to content
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

watch should probably exit if the job succeeds or (permanently) fails #200

Closed
itamarst opened this issue Oct 23, 2019 · 2 comments · Fixed by #259
Closed

watch should probably exit if the job succeeds or (permanently) fails #200

itamarst opened this issue Oct 23, 2019 · 2 comments · Fixed by #259

Comments

@itamarst
Copy link
Contributor

When aramdctl watch is watching a job live and it finishes, or it's called on an already finished job, it never exits:

$ ./bin/armadactl watch job-set-1                  
Watching job set job-set-1
Oct 23 17:54:39 | Queued:   0, Leased:   0, Pending:   0, Running:   0, Succeeded:   0, Failed
:   0, Cancelled:   0 | event: *api.JobSubmittedEvent, job id: 01dqww38n2japttpybyntwjnfc    
Oct 23 17:54:39 | Queued:   1, Leased:   0, Pending:   0, Running:   0, Succeeded:   0, Failed
:   0, Cancelled:   0 | event: *api.JobQueuedEvent, job id: 01dqww38n2japttpybyntwjnfc       
Oct 23 17:54:41 | Queued:   0, Leased:   1, Pending:   0, Running:   0, Succeeded:   0, Failed
:   0, Cancelled:   0 | event: *api.JobLeasedEvent, job id: 01dqww38n2japttpybyntwjnfc       
Oct 23 17:54:41 | Queued:   0, Leased:   0, Pending:   1, Running:   0, Succeeded:   0, Failed
:   0, Cancelled:   0 | event: *api.JobPendingEvent, job id: 01dqww38n2japttpybyntwjnfc      
Oct 23 17:54:43 | Queued:   0, Leased:   0, Pending:   0, Running:   1, Succeeded:   0, Failed
:   0, Cancelled:   0 | event: *api.JobRunningEvent, job id: 01dqww38n2japttpybyntwjnfc      
Oct 23 17:55:44 | Queued:   0, Leased:   0, Pending:   0, Running:   0, Succeeded:   1, Failed
:   0, Cancelled:   0 | event: *api.JobSucceededEvent, job id: 01dqww38n2japttpybyntwjnfc  
<just sits there>

I would expect success to result in exit code 0, and (permanent) failure to result in a non-0 exit code.

@jankaspar
Copy link
Collaborator

There is no easy way to know when the job set finished, we could introduce some flag to exit when there are no more active jobs. (You might want to start watching before you submit.)

@itamarst
Copy link
Contributor Author

Wouldn't transitioning to Success mean the job set is done? I can see failure being harder if it's going to be retried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants