347 Commits

Author SHA1 Message Date
Sybren A. Stüvel
6c827ffc52 Shaman: only configure the root directory of the Shaman files
Flamenco v2 allowed separate configuration of the Shaman file store and
checkout paths. This is now just one setting for "the storage". The file
store will be in `{storage}/file-store` and the checkout will happen in
`{storage}/jobs`.
2022-03-25 14:32:42 +01:00
Sybren A. Stüvel
65fcf1f6c9 Manager: disable Shaman by default
The Shaman implementation isn't finished yet, so for now disable by
default. That way it's at least possible to merge to the main branch.
2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
724938c7ae Shaman: allow Manager to determine the final checkout path
The checkout request now responds with the final checkout path. This makes
it possible for the Manager to ensure the checkout is unique.
2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
21227c8046 More Shaman integration work
- Addon switches between filesystem-packing and Shaman-packing
  automatically, depending on whether the Manager has Shaman enabled.
- Actually using BAT for Shaman packing.

It doesn't work though, some error occurs when receiving Shaman response
from the Manager in the Addon.
2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
f9b7510c42 Streamlining Shaman protocol further, plus rough implementation for addon 2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
b2288e7f28 Manager: More work on Shaman support
This introduces some more conceptual changes to Shaman. The most important
one is that there is no longer a "checkout ID", but a "checkout path".
The Shaman client can request any subpath of the checkout directory,
so that it can handle things like project- or scene-specific prefixes.
2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
2b0d154a07 Manager: more work on Shaman integration 2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
6f35b3303d Manager: more work on porting Shaman code to Flamenco 3 2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
4df0543661 Manager: Implementation of Shaman OAPI interface
This hooks up the OpenAPI Shaman endpoints to a Shaman interface. This
interface doesn't have any implementation yet.
2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
86879aaaad Manager: adjust unit test to fit new command/task names in job compiler 2022-03-17 16:19:45 +01:00
Sybren A. Stüvel
b6a7a15582 Implement frames-to-video command
This finishes the "Simple Blender Render" job type, as it can now be run
fully by a Worker!
2022-03-17 16:18:10 +01:00
Sybren A. Stüvel
c989bce51e Implement move-directory command, and use it in Simple Blender Render 2022-03-17 15:39:52 +01:00
Sybren A. Stüvel
084712baba Simple Blender render: pass frame range in Blender notation
Pass the frame range in Blender notation (`n..m`) instead of "printer"
notation (`n-m`).
2022-03-17 13:08:37 +01:00
Sybren A. Stüvel
8d52a03648 Manager: fix bug in task scheduler
The task scheduler was handing out tasks for which any dependency (instead
of all dependencies) were completed.
2022-03-17 13:07:20 +01:00
Sybren A. Stüvel
c5a2a23f6e Manager: reduce log levels 2022-03-17 11:47:53 +01:00
Sybren A. Stüvel
ec77de886b Manager: remove invalid comment 2022-03-17 11:46:04 +01:00
Sybren A. Stüvel
517b007ae5 Manager: improve logging of created tasks 2022-03-17 11:45:56 +01:00
Sybren A. Stüvel
bedf7869f8 Manager: replace "direction=twoway" with "is_twoway=true" in config
A boolean provides less context to the setting, so it's not as easy to
understand. However, in this case the simple case will have `is_twoway=false` and be ommitted from the configuration file. This makes the simple case even simpler.
2022-03-17 11:33:41 +01:00
Sybren A. Stüvel
3c01c18634 Manager: remove unsupported settings & rename existing one
Comment out all unused-but-desired-in-the-future settings, remove some
settings that will never be used, and rename `ssdp_discovery` to
`autodiscoverable`.
2022-03-17 11:25:40 +01:00
Sybren A. Stüvel
882c5ee478 Manager: include the version of Flamenco Manager in the written config 2022-03-17 11:19:00 +01:00
Sybren A. Stüvel
50cc1e64d0 Manager: add -write-config CLI option to create config file and quit 2022-03-17 11:18:26 +01:00
Sybren A. Stüvel
dbc5109058 Manager: reduce logging of configuration service 2022-03-17 11:10:13 +01:00
Sybren A. Stüvel
22ea599554 Manager: periodically run the SQL VACUUM command 2022-03-17 11:03:29 +01:00
Sybren A. Stüvel
93616cef3a Manager: reduce log level of "worker requesting task" 2022-03-17 10:53:00 +01:00
Sybren A. Stüvel
9066fcacff Manager: reorder Simple Blender Render settings 2022-03-15 17:49:20 +01:00
Sybren A. Stüvel
2187464d5e Allow the render output path to have a {timestamp} field 2022-03-15 17:18:11 +01:00
Sybren A. Stüvel
09a476e11a Compute render output path when evaluating job settings
Compute render output path when evaluating job settings, which is done
within the Flamenco add-on, instead of in the job compiler script. This
allows the UI to show the render path, rather than it only being known
after the job has been submitted.
2022-03-15 16:56:44 +01:00
Sybren A. Stüvel
7bfde1df0b Manager: determine final render output path in job compiler
This might not be the best way to do things, but it is very flexible and
allows TDs to determine the behaviour in their own job compiler script.
It doesn't allow a preview of "this is what the final render path will be"
in the Blender GUI though.
2022-03-15 13:17:55 +01:00
Sybren A. Stüvel
2cf388566f Cleanup: manager, remove unused code 2022-03-15 13:16:21 +01:00
Sybren A. Stüvel
6d492a48b4 Manager: tooltip for frame range setting 2022-03-15 11:32:59 +01:00
Sybren A. Stüvel
4ca71d96ce Manager: fix pythonisms in JS code 2022-03-15 11:32:23 +01:00
Sybren A. Stüvel
e15f066dde Automatically evaluate hidden job settings
Job settings that are not visible and have an `eval` key will be
automatically evaluated when the job is submitted.
2022-03-15 10:56:58 +01:00
Sybren A. Stüvel
4e570d601c Manager: fix tests for recent change from filepath to blendfile setting
4196460c29a607e1d3d2d052bf2bf546d5c05616 changed the name of the job
setting used to communicate the input blend file path, but the tests
weren't updated for this.
2022-03-15 10:46:58 +01:00
Sybren A. Stüvel
a6ac331612 Allow Python evaluation for computing job settings in the addon 2022-03-14 18:44:39 +01:00
Sybren A. Stüvel
4196460c29 Automatically include input blend file path in job settings 2022-03-14 18:18:10 +01:00
Sybren A. Stüvel
7b090bdbd6 OAPI: job submission endpoint now returns Job instead of SubmittedJob 2022-03-14 16:59:59 +01:00
Sybren A. Stüvel
2e78e00a0b Manager: don't log an error when the config file doesn't exist
The configuration file is expected to not exist on many systems, and
thus logging an error (even when it's a very innocent one) will cause
confusion.
2022-03-14 13:00:27 +01:00
Sybren A. Stüvel
7181c2c4cf OAPI: allow job settings to have a tooltip/description 2022-03-11 17:30:27 +01:00
Sybren A. Stüvel
6d00d9cb34 Manager: sort job types to ensure a consistent order 2022-03-11 17:30:27 +01:00
Sybren A. Stüvel
b33db33d17 Manager: show error when there was an error loading configuration 2022-03-11 10:51:32 +01:00
Sybren A. Stüvel
d0b677ffe3 Add API endpoint /api/version to get the Flamenco Manager version
This will be used in the auto-discovery, to check that a discovered URL can
actually be reached & points to a Flamenco Manager.
2022-03-08 13:56:43 +01:00
Sybren A. Stüvel
9f5e4cc0cc License: license all code under "GPL-3.0-or-later"
The add-on code was copy-pasted from other addons and used the GPL v2
license, whereas by accident the LICENSE text file had the GNU "Affero" GPL
license v3 (instead of regular GPL v3).

This is now all streamlined, and all code is licensed as "GPL v3 or later".

Furthermore, the code comments just show a SPDX License Identifier
instead of an entire license block.
2022-03-07 15:26:46 +01:00
Sybren A. Stüvel
dbb9c71df8 Tests: more unified way to do database tests 2022-03-04 12:33:45 +01:00
Sybren A. Stüvel
f497ac8536 Cleanup: add and remove some comments 2022-03-04 12:19:19 +01:00
Sybren A. Stüvel
3bfd5a339f Fix database tests getting interrupted
The root cause was a 2nd `context.Context()` that was used in
`constructTestJob()`, which cancelled when that function returned.

The cancellation of the context caused an interrupt in the SQLite
driver, which got into a race condition and could cause an interrupt on
a subsequent database query.
2022-03-04 12:19:19 +01:00
Sybren A. Stüvel
de150567b0 Manager: avoid double error message 2022-03-04 11:37:29 +01:00
Sybren A. Stüvel
cd2fe8170e Errors: remove "error" prefix from message
Instead of returning an error "error doing X", just return "doing X". The
fact that it's returned as an error object says enough about that it's
an error.

This also makes it easier to chain error messages, without seeing the
word "error" in every part of the chain.
2022-03-04 11:30:31 +01:00
Sybren A. Stüvel
c91e7b1cac Manager: solve failing unittests by implementing some filepath functions
Both Go's standard `path` and `path/filepath` packages are too limiting to
work well for Flamenco. The former assumes Linux/POSIX paths, the latter
only works with platform-native paths. Neither can work with Windows paths
on Linux, or Linux paths on Windows.
2022-03-03 15:22:43 +01:00
Sybren A. Stüvel
b9609f8866 Cleanup: remove unused code 2022-03-03 13:52:57 +01:00
Sybren A. Stüvel
641ed7ace9 Manager: make Gorm use Zerolog for logging
A wrapper for Zerolog implements the Gorm logger interface. This gives
us coloured output on Windows, and uniform-looking logs in production.
2022-03-03 13:52:50 +01:00