The docs listed the ffmpeg command as `create-video` but it seems that the actual command is `frames-to-video`.
Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104333
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
Convert most of the job blocklist queries from GORM to sqlc. The management
functions (add worker, remove worker, clear list, fetch list) have been
converted.
There was a missing condition, which meant that configuring any two-way
variable caused path separator normalisation on all job/task/command
parameters.
Include the current scene name in a hidden setting of the Simple Blender
Render, and pass that as CLI argument to Blender.
This ensures that the correct scene is rendered when working directly on
shared storage (as that does not have a copy of the blend file per job).
The job setting `"scene"` is still optional. If it's missing or empty,
the `--scene <scene name>` CLI arg will simply not be passed to Blender.
Skip writing the `.flamenco.blend` file when working directly on shared
storage. This was already the intended behaviour, but I think it got lost
in a recent refactor.
Easier to read logging when tests fail. I've just done this where I need
it, as there is no central place where Flamenco logs are initialised for
unit tests.
Replace `assert.True(t, errors.Is(err, errtype), ...)` with
`assert.ErrorIs(t, err, errtype, ...)`.
No functional changes to the test, except better failure reporting.
Manager: Instead of embedding the worker tag info in a fetched `Job`,
just include its UUID.
Webapp: fetch the worker tag by UUID, instead of using the embedded
info.
The OpenAPI changes in e561c8080e8f47b6fe792591033be4fab6faef42 did not
sit well with the generated Python code. The worker tag is now
communicated just as UUID (so that it's the same for the `SubmittedJob`
and `Job` types).
Show the worker tag name (and its description in a tooltip) in the job
details. When no worker tag is assigned, "All Workers" is shown in a more
dimmed colour.
This also renames the "Type" field to "Job Type". "Tag" and "Type" could
be confused, and now they're displayed as "Worker Tag" and "Job Type".
The UI in the add-on's submission interface is also updated for this, so
that that also shows "Worker Tag" (instead of just "Tag").
Add a checkbox to the submission interface to submit the job in
`paused` status.
Internally this translates the boolean value of the checkbox to the
desired state (`queued` or `paused`). A checkbox was chosen to
simplify the user interface; technically a drop-down could have been
used to select the initial state, but this would require more clicks
to get the same result.
Pull Request: https://projects.blender.org/studio/flamenco/pulls/104323
Flamenco treats assets differently, depending on whether they're referenced
by an absolute or a blendfile-relative path. This is now actually
documented.
The unit test was using the real clock, and depends on ordering by
last-updated timestamps. This means that sometimes two updates both fell
within the granularity of the timestamp in sqlite, which made the
ordering unreliable.
Switching to a mocked clock fixes this, as it moves forward with a hard-
coded pace, regardless of the execution speed of the test.
No functional changes to Flamenco itself.
A job first goes to `pause-requested` status, during which any `active` task
gets a chance to be completed. Once there are no more active tasks, the job
goes to `paused` state (or `failed`, if that is applicable).
Pull request: https://projects.blender.org/studio/flamenco/pulls/104313
Instead of explicitly checking errors / nil values and calling
`t.Fatal()`, just use `require.NoError()` or `require.NotNil()`.
No functional changes. The wording of test failures will be slightly
different though.
Some reorganisation to make it easier to convert a job & its tasks from
sqlc to gorm data structures.
The persistence layer is being converted to sqlc. Once that is done, the
remainder of the code can switch over from using gorm structs to sqlc
structs. Then this code will no longer be necessary.
Run the actually-doing-stuff parts of `RequestWorkerStatusChange()` and
`SetWorkerTags()` in a background context. That way the operation can
continue even when the HTTP client disconnects.
Improve the error handling on some worker management API calls, to deal
with closed HTTP connections better.
A new function, `api_impl.handleConnectionClosed()` can now be called when
`errors.Is(err, context.Canceled)`. This will only log at debug level, and
send a `419 I'm a Teapot` response to the client. This response will very
likely never be seen, as the connection was closed. However, in case this
function is called by mistake, this response is unlikely to be accepted
by the HTTP client.
Prevent a potential crash of Blender. Calling
`context.window_manager.modal_handler_add(self)` from an operator that does
not actually run modally can cause problems. So now that's called only
when running modally.