WIP: Allow jobs to be submitted in paused status #104318

Closed
David Zhang wants to merge 32 commits from David-Zhang-10/flamenco:submit-as-paused into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Collaborator

Overview
This pull request implements Issue #99439 Allow jobs to be submitted in paused status and builds upon PR #104313 Support pausing jobs.

Deliverables

  • A new option on the addon side that allows users to choose whether they would like the job to be submitted in paused status before submission to Flamenco Manager.
  • Updates in relevant API implementation.
  • If the user does wish to submit a job in paused status, the job shows up correctly in the web interface.
**Overview** This pull request implements [Issue #99439 Allow jobs to be submitted in paused status](https://projects.blender.org/studio/flamenco/issues/99439) and builds upon [PR #104313 Support pausing jobs](https://projects.blender.org/studio/flamenco/pulls/104313). **Deliverables** - A new option on the addon side that allows users to choose whether they would like the job to be submitted in `paused` status before submission to Flamenco Manager. - Updates in relevant API implementation. - If the user does wish to submit a job in `paused` status, the job shows up correctly in the web interface.
David Zhang added 22 commits 2024-06-20 01:41:39 +02:00
David Zhang added 1 commit 2024-06-20 20:57:37 +02:00
David Zhang added 4 commits 2024-06-20 21:59:49 +02:00
David Zhang added 1 commit 2024-06-22 15:04:27 +02:00
David Zhang added 1 commit 2024-06-22 15:05:54 +02:00
David Zhang added 1 commit 2024-06-22 15:15:07 +02:00
David Zhang added 1 commit 2024-06-22 15:15:30 +02:00
David Zhang added 1 commit 2024-06-22 16:39:22 +02:00
Sybren A. Stüvel reviewed 2024-06-26 17:43:59 +02:00
Sybren A. Stüvel left a comment
Owner

Deliverables

  • A new option on the addon side that allows users to choose whether they would like the job to be submitted in paused status before submission to Flamenco Manager.

It's better to keep the add-on out of this PR, and focus only on the API side.

  • Updates in relevant API implementation.
  • If the user does wish to submit a job in paused status, the job shows up correctly in the web interface.

These are good to have in this PR.

This was just a partial review, I haven't actually tried the code yet. I'll do that once #104313 lands and we can disentangle the two PRs.

> **Deliverables** > - A new option on the addon side that allows users to choose whether they would like the job to be submitted in `paused` status before submission to Flamenco Manager. It's better to keep the add-on out of this PR, and focus only on the API side. > - Updates in relevant API implementation. > - If the user does wish to submit a job in `paused` status, the job shows up correctly in the web interface. These are good to have in this PR. This was just a partial review, I haven't actually tried the code yet. I'll do that once #104313 lands and we can disentangle the two PRs.
@ -20,2 +20,3 @@
"type": "echo-sleep-test",
"submitter_platform": "manager"
"submitter_platform": "manager",
"initial_status": "paused"

Change this to queued so that the semantics of the script don't change.

For these kind of "I need a slightly different script" cases, I ususally just make a copy, then add its filename to .git/info/exclude so I don't accidentally commit it.

Change this to `queued` so that the semantics of the script don't change. For these kind of "I need a slightly different script" cases, I ususally just make a copy, then add its filename to `.git/info/exclude` so I don't accidentally commit it.
@ -59,6 +59,7 @@ require (
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
golang.org/toolchain v0.0.1-go1.9rc2.windows-amd64 // indirect

How did this new dependency get added?

How did this new dependency get added?
@ -92,7 +92,9 @@ func (f *Flamenco) SubmitJob(e echo.Context) error {
logger = logger.With().Str("job_id", authoredJob.JobID).Logger()
// TODO: check whether this job should be queued immediately or start paused.

This TODO can now be removed.

This TODO can now be removed.
@ -132,2 +132,4 @@
}
if sj.InitialStatus != nil {
aj.Status = *sj.InitialStatus

What's the reason to handle this here, rather than in func (f *Flamenco) SubmitJob(e echo.Context) error? I think it's better to keep the status as under-construction while the job is still under construction, and then let it go to its initial status afterwards (like the current under-constructionqueued transition).

What's the reason to handle this here, rather than in `func (f *Flamenco) SubmitJob(e echo.Context) error`? I think it's better to keep the status as `under-construction` while the job is still under construction, and then let it go to its initial status afterwards (like the current `under-construction` → `queued` transition).
David Zhang closed this pull request 2024-07-02 20:46:13 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.