1284 Commits

Author SHA1 Message Date
Sybren A. Stüvel
3b978ceda0 Cleanup: manager, name variable correctly
It was an old name from copy-pasted code, now it reflects the actual code.

No functional changes.
2022-08-01 18:55:08 +02:00
Sybren A. Stüvel
1469345f3a Manager: sort blocklist by worker name 2022-08-01 18:54:28 +02:00
Sybren A. Stüvel
023d392560 Web: resize the Tasks table after loading the job blocklist
Emit a 'reshuffled' event to let the job view resize the tasks table.
2022-08-01 18:44:50 +02:00
Sybren A. Stüvel
9d65f6f4de Web: use small font for job blocklist 2022-08-01 18:25:17 +02:00
Sybren A. Stüvel
b6d8882b8e Web: show job blocklist
The blocklist is now shown in the job details, in its own tab. The list
is only fetched when the tab is visible, and doesn't get dynamically
updated yet.
2022-08-01 18:24:01 +02:00
Sybren A. Stüvel
f3aab8611c Manager: include worker name when returning blocklist 2022-08-01 18:03:17 +02:00
Sybren A. Stüvel
1caa4c2a59 OAPI: regenerate code 2022-08-01 18:03:05 +02:00
Sybren A. Stüvel
e6f76f520b OAPI: include worker name in blocklist entries
To show the blocklist on the web interface, it's nice to identify workers
by their name and not just their UUID.
2022-08-01 18:02:21 +02:00
Sybren A. Stüvel
37477fc6bd Web: remove console.log calls
Remove a whole lot of `console.log()` calls. They were useful during
development, but not really suitable for production environments. Because
they also include (potentially large) objects, they can even slow down
the webapp itself.
2022-08-01 17:11:45 +02:00
Sybren A. Stüvel
e6b662b8cd README.md: remove most info from the README and direct to the website
The website (which is available in the sources as well) contains all the
information from the README already. Having only one source of information
is good for maintainability.
2022-08-01 16:56:40 +02:00
Sybren A. Stüvel
efff61c454 Website: add some documentation about the storage options
Basically it's "simple, efficient, isolated -- pick two".
2022-08-01 16:36:29 +02:00
Sybren A. Stüvel
1db1b06c9e Website: correct the OpenAPI commit guidelines
The OpenAPI-generated code no longer contains the git hash, so the docs
had to change for that.
2022-08-01 16:36:10 +02:00
Sybren A. Stüvel
fef3de28e1 Fix unit test
Fix unit test broken in rF449c83b9.

No functional changes.
2022-08-01 16:02:08 +02:00
Sybren A. Stüvel
642ef36778 Blender finder: fix compatibility with Windows Home
For some reason, calling `AssocQueryStringW` on Windows Home returns error
code 122, "The data area passed to a system call is too small", even when
the data area is large enough. Furthermore, the API actually describes that
in such cases `S_FALSE` is supposed to be returned, with `*pcchOut` set to
the required size. Because of this apparent violation of the documentation,
and because it just works, Flamenco now ignores this particular error and
just returns the obtained string.
2022-08-01 16:00:49 +02:00
Sybren A. Stüvel
350f4f60cb Worker: convert database interface to GORM
Convert the database interface from the stdlib `database/sql` package to
the GORM object relational mapper.

GORM is also used by the Manager, and thus with this change both Worker
and Manager have a uniform way of accessing their databases.
2022-08-01 14:29:14 +02:00
Sybren A. Stüvel
449c83b94a Manager: broadcast worker update after assigning task
The Manager now broadcasts a worker update to SocketIO clients when a
worker gets a new task assigned. This ensures the "current task" shown in
the worker details view is up to date.
2022-08-01 14:29:08 +02:00
Sybren A. Stüvel
cb1e991305 Bumped version to 3.0-dev1 2022-08-01 14:21:19 +02:00
Sybren A. Stüvel
eb0adc6407 make update-version: include more files in the version bump commit 2022-08-01 14:21:04 +02:00
Sybren A. Stüvel
a6c935a634 Fix T99421: Introducing an etag for job types
The etag prevents job submissions with old settings, when the job
compiler script has been edited. The etag is the SHA1 hash of the
`JOB_TYPE` dictionary (as defined by the JavaScript file). The hash is
computed in a way that's independent of the exact formatting in the
JavaScript file. Also the actual JS code itself is irrelevant, just the
`JOB_TYPE` dictionary is used.
2022-07-29 21:13:37 +02:00
Sybren A. Stüvel
48ca73f550 Refactor, manager: rename compilerForJobType to compilerVMForJobType
The function returns a `*VM`, which contains a compiler, and allows you
to run a compiler, but is not a compiler itself.
2022-07-29 14:26:54 +02:00
Sybren A. Stüvel
866513e06a Add-on: check connection with Flamenco on URL change
Whenever the URL to Flamenco Manager is updated, check it and report.

This required moving the 'ping manager' code into a separate function, as
calling an operator from an RNA update callback is not a good idea.
2022-07-29 14:25:47 +02:00
Sybren A. Stüvel
b1f13c47f7 Website: add some documentation for the shared storage
This still needs expanding.
2022-07-29 11:39:31 +02:00
Sybren A. Stüvel
0cca867195 Website: move job-compiler-scripts to job-types
The concept of "job types" is more important. The fact that they are
defined by scripts is secondary. I've also added more documentation about
the settings & task types.
2022-07-29 11:15:15 +02:00
Sybren A. Stüvel
139d635695 Website: add documentation about job settings
It's far from complete, but it's a start.
2022-07-29 11:04:27 +02:00
Sybren A. Stüvel
370f935f65 Simple-blender-render job: use absolute path for render_output_path
Blender cannot be told to only allow absolute path for an RNA property
(of type `string`, subtype `dir_path`), so as a workaround the final
`render_output_path` is now using `bpy.path.abspath()` to make the path
absolute.

This has as advantage that the render output path can be defined by artists
as a blendfile-relative path, and that it'll be resolved when submitting
the blend file.
2022-07-29 11:03:14 +02:00
Sybren A. Stüvel
764973f116 Cleanup: add-on, remove unused parameter
No functional changes.
2022-07-29 10:25:23 +02:00
Sybren A. Stüvel
8ddc03d6ef Add-on: evaluate visible job settings immediately
For each job setting, if it's visible and has an `eval` property, it is now
evaluated immediately when switching job types. This means that properties
like the frame range get filled in automatically.

If there is already a value, this process is skipped, in order to not
overwrite the user's choice.

This resolves a common issue where the render job was rejected because
the frame range was kept empty.
2022-07-29 10:25:02 +02:00
Sybren A. Stüvel
ca8a909e41 Add-on: refactor FLAMENCO_OT_submit_job.poll()
Refactor the `FLAMENCO_OT_submit_job.poll()` function to actually use the
`job_types.active_job_type()` function instead of reimplementing similar
logic.

No functional changes.
2022-07-29 10:10:44 +02:00
Sybren A. Stüvel
be1ddaa4eb Manager test: reduce timeout to practical value
The timeout was increased to aid debugging, but shouldn't have been
committed.
2022-07-29 09:59:54 +02:00
Sybren A. Stüvel
8c8855554e Manager: remove --factory-startup from default Blender arguments
Remove `--factory-startup` from the default Blender arguments. This makes
it simpler to configure each Worker to use its own GPU, without having to
inject Python code into the arguments.

Users can always add this when they need, but I think it's friendlier to
have Blender behave the same when they manually run it and when used by
Flamenco Worker.
2022-07-29 09:54:29 +02:00
Sybren A. Stüvel
4947712bec Worker: also log found Blender at startup
Similar to the logging of the found FFmpeg, log the version of Blender at
Worker startup.
2022-07-29 09:48:56 +02:00
Sybren A. Stüvel
377583c9e2 Cleanup: worker, move FFmpeg-finding at startup into its own file
Just a move of code from `main.go` to a dedicated file in the same package.

No functional changes
2022-07-29 09:47:30 +02:00
Sybren A. Stüvel
fb5501028d Add-on: use bat.bpathlib.make_absolute() for making paths absolute
This should resolve the issue where on Windows file paths to a network
share would be converted to UNC notation (and thus loose their drive
letter).
2022-07-28 17:49:01 +02:00
Sybren A. Stüvel
d4dfa2d071 Add release cycle to versioning of Flamenco
Include `RELEASE_CYCLE` in the Makefile. This is mentioned at startup of
Manager and Worker, and reflects in the software version they report.

If `RELEASE_CYCLE == "release"`, Manager and Worker report their version
as `ApplicationVersion`. If it's any other string, the Git hash will get
appended.
2022-07-28 15:10:27 +02:00
Sybren A. Stüvel
8c86d4c1a9 Worker: Wait for subprocess even when it failed
The Worker now always waits for subprocesses. When faced with multiple
errors (like I/O reading from stdout and a returned error status from
the process) will return the most important one (in this case the exit
status of the process).

Subprocesses need to be waited for, even when they crashed, otherwise
they will linger around as "defunct" processes. This caused
out-of-memory errors, because several defunct Blenders were eating up
the memory.
2022-07-28 14:36:01 +02:00
Sybren A. Stüvel
c79fe55068 Worker: Refactor the running of subprocesses
Blender and FFmpeg were run in the same way, using copy-pasted code. This
is now abstracted away into the CLI runner, which in turn is moved into
its own subpackage.

No functional changes.
2022-07-28 14:34:33 +02:00
Sybren A. Stüvel
c42665322b Cleanup: add a comment
Just a comment that explains why an error is ignored.

No functional changes.
2022-07-28 14:28:02 +02:00
Sybren A. Stüvel
b26374d480 Manager: when worker goes to sleep, log in task log which worker
When a worker's tasks get requeued because it goes to sleep, the task log
will now mention the worker identification (name + UUID). This aids in
figuring out what happened to tasks.
2022-07-28 14:27:44 +02:00
Sybren A. Stüvel
3f3f5d782f Website: fix link 2022-07-28 12:10:18 +02:00
Francesco Siddi
3a0ace2122 Setup Assistant: Drop debounce function
The checkBlenderExePath function is now executed only once the Next
button is pressed. This is the same behavior as for the storage
selection step.
2022-07-26 19:13:42 +02:00
Sybren A. Stüvel
920420c10e Website: write comparison between Flamenco v2 and v3
Manifest Task: T99698
2022-07-26 18:59:32 +02:00
Sybren A. Stüvel
574198aa13 Website: document a bit more about job compiler scripts 2022-07-26 18:59:06 +02:00
Sybren A. Stüvel
e481213e4a Website: write some 'getting started' steps
Still too many steps, we need to simplify!
2022-07-26 18:58:54 +02:00
Sybren A. Stüvel
4cb0a6fb14 Blender Finder: allow passing the directory instead of the executable
Blender Finder now understands that directory paths should be suffixed
with `blender` (Linux, macOS) or `blender.exe` (Windows).

Giving the Setup Assistant a path like `C:\Program files\Blender
Foundation\Blender 3.2` will now just work. This is considerably simpler
for many users, as copy-pasting a directory from a file explorer is
simpler than obtaining/typing the path to the executable.
2022-07-26 18:18:02 +02:00
Sybren A. Stüvel
1e3a2b5480 Blender Finder: better reporting on timeout errors
Instead of just `signal: killed`, report that it actually took too long.
2022-07-26 17:40:28 +02:00
Sybren A. Stüvel
fa79b81d5b Blender Finder: support multi-line output of blender --version
When compiled without OpenColorIO, Blender will first complain "Color
management: Error could not find role data role." before showing the
actual version number. This is now handled by looking for a "Blender "
prefix instead of just returning the first line of output.

This has as a side-effect that when no such line can be found, we know
it's not Blender, and thus an error can be returned (instead of the
version of whatever binary was being run).
2022-07-26 17:25:50 +02:00
Sybren A. Stüvel
cb6a3a5a88 Manager: test error with errors.Is() instead of ==
It's just a better way to test errors.
2022-07-26 17:25:50 +02:00
Sybren A. Stüvel
859a2e6eda Manager: better logging when trying to find Blender 2022-07-26 17:25:50 +02:00
Sybren A. Stüvel
3f6dd9be8b Blender Finder: add timeout to blender --version invocation
Make sure that the command execution doesn't hang indefinitely.
2022-07-26 17:25:50 +02:00
Sybren A. Stüvel
0c8409eb2e Start of Q&A page on the website 2022-07-26 17:25:50 +02:00