2233 Commits

Author SHA1 Message Date
Sybren A. Stüvel
816046663e Manager: remove GORM from database interface
Remove all calls to GORM from the database interface code.

Ref: #104305
2024-09-26 22:58:11 +02:00
Sybren A. Stüvel
f1a72903a0 Manager: rename sql/integrity.go to sql/pragma.go
The file contains pragma queries only, and I'm about to add more pragma
queries that aren't related to database integrity.
2024-09-26 22:43:30 +02:00
Sybren A. Stüvel
8513e2fdc8 Manager: replace GORM 'now' function with our own implementation
GORM implicitly sets 'created at', 'updated at' and 'deleted at' timestamps
to 'now' by calling a 'now function'. This is now implemented by Flamenco
directly, instead of relying on GORM.

Ref: #104305
2024-09-26 22:38:17 +02:00
Sybren A. Stüvel
29419cb30e Manager: convert final sleep schedule queries to sqlc
Ref: #104305
2024-09-26 22:26:30 +02:00
Sybren A. Stüvel
906880ae2c Manager: replace queries in task scheduler test
Ref: #104305
2024-09-26 21:36:00 +02:00
Sybren A. Stüvel
2cc049c52c Manager: convert final 'last rendered' queries to sqlc
Ref #104305
2024-09-26 21:26:38 +02:00
Sybren A. Stüvel
d43947898d Manager: replace final job-related queries with sqlc
Ref: #104305
2024-09-26 21:20:01 +02:00
Sybren A. Stüvel
ede5eb1d46 Manager: bump Go version to 1.23.1 2024-09-26 21:17:40 +02:00
Sybren A. Stüvel
71bbaaeae0 Manager; convert fetching of sleep schedules to sqlc
This also corrects the sleep schedule schema to actually store the
`is_active` field as `boolean` (it was `numeric`, which is the same
underlying field type in SQLite, but produces a different struct field
in the sqlc-generated Go code).

Ref: #104305
2024-09-18 21:11:54 +02:00
Sybren A. Stüvel
777a417cc0 Manager: convert timeout checks to sqlc
Ref: #104305
2024-09-18 20:39:03 +02:00
Sybren A. Stüvel
ebf1693a7c Manager: convert busy-timeout query to sqlc
Ref: #104305
2024-09-18 16:49:01 +02:00
Sybren A. Stüvel
40bfa91018 Manager: improve test stability
In a time-dependent test, wait a little longer to make it more stabler.
2024-09-18 16:40:35 +02:00
Sybren A. Stüvel
4bd6dc64b0 Manager: convert worker tag queries to sqlc
Ref: #104305
2024-09-18 16:07:43 +02:00
Sybren A. Stüvel
35313477a0 Manager; convert QueryJobTaskSummaries and SummarizeJobStatuses to sqlc
Ref: #104305
2024-09-18 14:54:49 +02:00
Sybren A. Stüvel
cda0b916fb Manager: replace queryJobs with fetchJobs operation
See the previous two commits for the motivation.
2024-09-18 14:29:15 +02:00
Sybren A. Stüvel
aebfaf4631 OAPI: regenerate code 2024-09-18 14:28:27 +02:00
Sybren A. Stüvel
c71ae574f1 OAPI: replace queryJobs operation with fetchJobs
Replace the `queryJobs` operation (which takes a query object to do
filtering & pagination) with the new `fetchJobs` operation (which just
returns all jobs without filtering).

The reason for this is that the querying that this operation supported
was never used by the front-end. And now it's getting in the way of other
development work, so it has to go.
2024-09-18 14:27:47 +02:00
Sybren A. Stüvel
3a872370df Manager: convert job blocklist queries from GORM to sqlc
Ref: #104305
2024-09-18 10:40:29 +02:00
Sybren A. Stüvel
a015408486 Manager: convert foreign key integrity check to sqlc
Ref: #104305
2024-09-18 10:17:31 +02:00
Sybren A. Stüvel
476d4059bf Manager: convert pragma foreign key command to sqlc
No functional changes.

Ref: #104305
2024-09-18 10:17:27 +02:00
Sybren A. Stüvel
96cc8255e7 Manager: simplify use of sqlc
Instead of returning an error when getting the sqlc queries object, just
panic. This'll make the calling code quite a bit simpler. The situation
in which it might error out is so rare that I've never seen it, and I
don't even know if it will ever be possible to happen with the SQLite
implementation we use now. Furthermore, once we get rid of GORM, it
should just always work anyway.

Ref: #104305
2024-09-18 10:17:20 +02:00
Sybren A. Stüvel
af6f7103c4 Manager: convert DB integrity check to sqlc
Convert the database integrity check from GORM to sqlc.

No functional changes.

Ref: #104305
2024-09-18 10:17:08 +02:00
Sybren A. Stüvel
7b592950e4 Bumped version to 3.6-alpha4 2024-09-10 10:59:10 +02:00
Sybren A. Stüvel
80a19d0dc9 Website: Mark 3.6-alpha3 as latest experimental release 2024-09-10 10:58:51 +02:00
Sybren A. Stüvel
8dd5086adb Bump Go version to 1.22.7 to get security fix 2024-09-10 10:56:23 +02:00
Mateus Abelli
0aa39356f1 Website: Write the Flamenco Upgrading Guide
Add the upgrading guide documentation to the Flamenco website.

Fixes #104324

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104337
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2024-09-09 11:28:14 +02:00
Mateus Abelli
6baa132c43 Manager: allow setup to finish without Blender
Add an option to the setup assistant to skip configuring the path to
Blender. It will just use the `default` option, which causes the Workers
to try and find Blender on their own.

Fixes #104306

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104306
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2024-09-09 11:22:16 +02:00
Mateus Abelli
0a98fd2b96 OAPI: regenerate code 2024-09-09 11:22:16 +02:00
Mateus Abelli
eeb79f4feb OpenAPI: Add a default option for Blender's location in the setup assist
The setup assistant configuration can now contain `source: default` to
indicate that the default `blender` command should be used (which in
turn tells the Worker to find whatever Blender is available on the
system).

Choosing this option will make the setup assistant skip the path check,
and just trust that the Workers will find Blender.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104306
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2024-09-09 11:22:16 +02:00
Sybren A. Stüvel
3fa15eaa0c Fix test that ensures all expected job types are embedded
It was missing the 'single image render' job type.
2024-09-09 11:21:54 +02:00
Mateus Abelli
6eb4b12840 Addon: add 'disabled' message on submit button when no job type is selected
Add a 'disabled' message on the Submit Job button when no job type has
been selected yet.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104326
2024-09-05 14:46:10 +02:00
Sybren A. Stüvel
423c5c29d7 Shaman: use relative paths for symlinks (#104332)
Use relative paths for symlinks, so that the Shaman storage can be mounted
on different locations on the Worker without the symlinks breaking.

Fixes studio/flamenco#104328

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104332
2024-09-05 12:12:44 +02:00
David Zhang
60872c89f9 Manager: distributed rendering of single images
Add a new job type that can render a single image. It is broken up
into separate tiles, each of which can be rendered independently by a
worker. Only tested with Cycles.

Adaptive sampling is supported. For this, each tile is expanded by 16
pixels in each direction, which is later cropped off before merging
the tiles.

Denoising is not (yet) supported, as Blender/Cycles does not output
all the necessary data into EXR layers.

Tile sizes should (for now) be a power of 2, to avoid alignment
issues.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104327
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2024-09-03 06:47:45 +02:00
Sybren A. Stüvel
acf721c6d8 Add-on & README: Change "Flamenco 3" to just "Flamenco"
When Flamenco 3 was just released, it was important to indicate the
difference between the Flamenco 2 panel (which was just labeled
"Flamenco"), and the new Flamenco 3 panel. The release of v3.0 was
almost two years ago, so it's time to remove the "3" from the titles and
just name things "Flamenco".
2024-08-26 18:24:24 +02:00
Sybren A. Stüvel
329640aa62 Cleanup: rename CreateVideoParams to FramesToVideoParams
The command used to be `create-video`, but got renamed to
`frames-to-video`. This cleanup renames the `CreateVideoParams` struct
to `FramesToVideoParams`.

No functional changes.
2024-08-26 18:16:04 +02:00
waterwheels
8d57a60114 update ffmpeg command in docs (#104333)
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>
2024-08-26 18:15:14 +02:00
Sybren A. Stüvel
4073c34b0d Website: update another chat link
I missed a link in my previous commit.
2024-08-26 18:05:12 +02:00
Sybren A. Stüvel
2df4f91b68 Website: update link to Blender Chat
Blender Chat moved to Matrix, and with that to a new URL.

https://chat.blender.org/#/room/#flamenco:blender.org
2024-08-25 14:53:04 +02:00
TrevorSmale
819ded5406 Fixed some grammar.
Check out the diff, just made a few minor grammatical adjustments.
2024-08-07 20:49:02 +02:00
Sybren A. Stüvel
1f7cab0ef2 Manager: convert job blocklist management queries to sqlc
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.
2024-08-02 12:50:17 +02:00
Sybren A. Stüvel
e758f8c79d Cleanup: fix typo in comment
No functional changes.
2024-08-02 11:39:59 +02:00
Sybren A. Stüvel
280e6643a5 Fix #104331: Path separator normalisation replaces too much
There was a missing condition, which meant that configuring any two-way
variable caused path separator normalisation on all job/task/command
parameters.
2024-08-02 11:39:59 +02:00
Sybren A. Stüvel
6841a99a90 Simple Blender Render: include scene name in job settings
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.
2024-08-01 14:55:17 +02:00
Sybren A. Stüvel
6704f6619d Add-on: don't write a .flamenco.blend when already on shared storage
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.
2024-08-01 14:41:54 +02:00
Sybren A. Stüvel
b68e51976d Manager: actually respect autodiscoverable: false in configuration
The Manager configuration has an option to disable the UPnP/SSDP server,
and now it actually listens to it.
2024-08-01 13:52:41 +02:00
Sybren A. Stüvel
3f86364fa4 Shaman tests: colorise log output on some tests
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.
2024-08-01 13:52:41 +02:00
Sybren A. Stüvel
466abf1387 Shaman test: replace assert.True(...) with assert.ErrorIs()
Replace `assert.True(t, errors.Is(err, errtype), ...)` with
`assert.ErrorIs(t, err, errtype, ...)`.

No functional changes to the test, except better failure reporting.
2024-08-01 13:52:41 +02:00
Sybren A. Stüvel
3b6102fe3a Shaman: replace deprecated function with its modern replacement
Replace `ioutil.TempDir()` with `os.MkdirTemp()`.

No functional changes.
2024-08-01 13:52:41 +02:00
Sybren A. Stüvel
5da5edd333 Manager: modernise Shaman unit test code
Replace calls to `assert.NoError()` with `require.NoError()`
2024-08-01 13:51:43 +02:00
Sybren A. Stüvel
8f9ed0cc28 Manager & Webapp: code changes to handle the new worker tag info in Job
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.
2024-07-30 11:03:03 +02:00