1710 Commits

Author SHA1 Message Date
Sybren A. Stüvel
60fb20c0ff Fix #104245: Incorrect frame range formatting when crafting blender's cmd
Fix a bug in the translation from 'human' frame ranges ('A-B,C-D') to
'Blender' frame ranges ('A..B,C..D'). It required calling
`string.replaceAll()` instead of `string.replace()` in the job compiler
script, which in turn required an upgrade of the JavaScript engine Goja.
2023-08-23 19:55:49 +02:00
Michael Cook
bc7b434121 Always use local time for job compiler timestamp variable
The 'Simple Blender Render' job compiler script uses a `{timestamp}`
variable to determine the render output path. This variable is now set
to the local time, rather than UTC.

This fixes #104219: Unit tests are timezone-dependent

The solution uses Go `time.Local` timezone to satisfy unit tests
assertions using a Mock clock. The timezone of the local workstation
running the tests.
2023-08-23 16:08:01 +02:00
Sybren A. Stüvel
eb9f46dc9b Manager: fix sleep scheduler time zone handling
The sleep scheduler now always works in the local time zone.

This fixes the sleep scheduler part of #104219.
2023-08-23 13:54:02 +00:00
Sybren A. Stüvel
ef726da17b SocketIO broadcasting for worker tags CUD operations
Broadcast create/update/delete operations on worker tags via SocketIO.

Ref: #104204
2023-08-23 13:54:02 +00:00
Sybren A. Stüvel
621f050a68 OAPI: regenerate code 2023-08-23 13:54:02 +00:00
Sybren A. Stüvel
56081e5572 OAPI: SocketIO broadcasting for worker tags CUD operations 2023-08-23 13:54:02 +00:00
Michael Cook
86cf30e44e Webapp: Clarification of Worker Maintenance section (#104229)
- fix spelling of 'adviced' for 'advised'
- fixed readability of sentence in error state.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104229
2023-08-23 15:23:50 +02:00
Sebastian Parborg
5f3c8c259d Makefile: Add a standalone recipe for building only the addon .zip (#104239)
Add `make flamenco-addon.zip` build target , making it easier to only
build and distribute the addon. Before this change, the only way to
generate the addon .zip via `make` was to also build the manager.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104239
2023-08-23 15:21:14 +02:00
Michael Cook
b9582f0ebd Doc: FAQ for when worker cannot find Blender executable
Document how to deal with the warning Flamenco Worker can show during
startup, about not being able to find Blender.
2023-08-23 15:15:36 +02:00
Sybren A. Stüvel
089bae5bf9 Webapp: import notifications on job details component
Errors getting worker tags were logged in the notifications area, but the
notifications Piña store weren't actually imported, causing a JS error.
2023-08-17 16:29:08 +02:00
Sybren A. Stüvel
e231f6f221 Manager: better logging of tag create/update/delete
Emit an info-level log message when worker tags are created, updated, or
deleted.
2023-08-15 10:36:54 +02:00
Sybren A. Stüvel
c477992467 Manager: tag update without description now keeps the description
Updating a tag without `description` field in the request body will keep
the tag's description as-is. Previously this caused it to become empty,
which is now still possible by using an explicit `description: ""`.
2023-08-15 10:29:44 +02:00
Sybren A. Stüvel
72ec9501b9 Website: add restart_exit_code to the worker config documentation 2023-08-14 17:40:36 +02:00
Sybren A. Stüvel
9a406f2e33 Website: better documentation of worker actions
Instead of explaining all the menu items, just explain the basic actions
(shut down, restart, sleep, wake up), and explain the 'after task is
finished' vs. 'immediately' separately.
2023-08-14 16:14:44 +02:00
Sybren A. Stüvel
97a909791c Website: make table cells v-align to top
This makes tables a little easier on the eyes.
2023-08-14 16:13:53 +02:00
Sybren A. Stüvel
3760b06066 Update CHANGELOG
Add the 'restartable workers' feature to the changelog.
2023-08-14 16:03:11 +02:00
Sybren A. Stüvel
0364a7ad79 Merge pull request 'Restartable workers' (#104242) from restartable-workers into main 2023-08-14 16:01:33 +02:00
Sybren A. Stüvel
3e72391cbf Restartable workers
When the worker is started with `-restart-exit-code 47` or has
`restart_exit_code=47` in `flamenco-worker.yaml`, it's marked as
'restartable'. This will enable two worker actions 'Restart
(immediately)' and 'Restart (after task is finished)' in the Manager web
interface. When a worker is asked to restart, it will exit with exit
code `47`. Of course any positive exit code can be used here.
2023-08-14 16:00:09 +02:00
Sybren A. Stüvel
1eb7764d00 OAPI: regenerate code 2023-08-14 16:00:06 +02:00
Sybren A. Stüvel
7cfc2aa9e7 OAPI: Restartable workers
Extend the data model so that Workers can mark themselves as 'restartable'
at sign-on.
2023-08-14 14:57:00 +02:00
Sybren A. Stüvel
9009b60379 Website: add list of supported commands
Document the commands currently implemented in Flamenco Worker.
2023-08-09 10:55:58 -07:00
Sybren A. Stüvel
4e31ccb31c Add SIGGRAPH 2023 redirect
Add a HTTP redirect for the SIGGRAPH hands-on class. It redirects to
https://siggraph.stuvel.eu/ so that I can easily update the website while
at SIGGRAPH itself.
2023-08-01 17:35:21 +02:00
Sybren A. Stüvel
b2c49492f1 Makefile: get proper git hash when directly on tag + dirty
When the current `HEAD` is tagged, and the work directory is 'dirty', the
`GITHASH` variable now contains the actual Git hash. Before this change it
would only be the word "dirty".
2023-08-01 13:57:37 +02:00
Sybren A. Stüvel
100e8e404e Rename add-on to flamenco-addon.zip
Rename the add-on from `flamenco3-addon.zip` to `flamenco-addon.zip`.

It still contains the same files as before, and in Blender the name of
the add-on has not changed.
2023-08-01 13:05:02 +02:00
Sybren A. Stüvel
02fac6a4df Change Go package name from git.blender.org to projects.blender.org
Change the package base name of the Go code, from
`git.blender.org/flamenco` to `projects.blender.org/studio/flamenco`.

The old location, `git.blender.org`, has no longer been use since the
[migration to Gitea][1]. The new package names now reflect the actual
location where Flamenco is hosted.

[1]: https://code.blender.org/2023/02/new-blender-development-infrastructure/
2023-08-01 12:42:31 +02:00
Sybren A. Stüvel
cac030e9d4 Bump version of FFmpeg to 5.1
The 5.0 binaries that were bundled could no longer be downloaded from the
original URLs, so I took the opportunity to upgrade a minor version.

Unfortunately there is a discrepancy between the last version of FFmpeg
(according to https://ffmpeg.org/download.html#release_5.1) and the
binaries that are offered for download. Because of this, Linux is at 5.1.1,
where Windows and macOS (darwin) are on 5.1.2.
2023-07-31 17:07:44 +02:00
Sybren A. Stüvel
dae5b1a571 Fix #104237: fix issue with drive-only paths on Windows
Fix an issue where a shared storage path on Linux, that maps via two-way
variables to a drive root on Windows, caused problems with the path
translation system.

Windows paths that consist only of a drive letter (`F:`) cannot just be
concatenated to a relative path, as that will result in `F:path\to\file`,
which is still a relative path of sorts. This is now handled correctly,
and should result in `F:\path\to\file`.

This fixes #104237.
2023-07-31 15:28:07 +02:00
Sybren A. Stüvel
7dc3def1d5 Manager: simplify variable expansion
Simplify the variable expansion code. Instead of using a separate goroutine
and two channels, use a struct + a simple function call.

No functional changes.
2023-07-31 15:15:20 +02:00
Sybren A. Stüvel
7d1ce8131a Manager: simplify value-to-variable replacement
Simplify the code for the two-way variables' value-to-variable replacement.

Instead of using a goroutine and two channels, use a separate struct and
call a function on that directly.

No functional changes.
2023-07-31 13:58:43 +02:00
Sybren A. Stüvel
7d72653c93 Extra tests for backslashed two-way variables 2023-07-31 12:32:42 +02:00
Sybren A. Stüvel
dc6d5d9b8e Makefile: explicitly specify Git hash length
Explicitly specify the Git hash length to use, to ensure consistent version
info regardless of version of Git or platform to build on.
2023-07-24 15:58:45 +02:00
Sybren A. Stüvel
e8ae0c3cf2 Website: Fix 'report a bug' link 2023-07-24 14:53:18 +02:00
Sybren A. Stüvel
1dd2e165c8 Webapp: show Manager name in the window title
Show the configured Manager name in the webapp browser window title. This
helps me to distinguish the production farm from my development install.
2023-07-22 13:44:02 +02:00
Sybren A. Stüvel
1ef9a81094 Cleanup: remove TODO
Remove a TODO (the work was done in cdf1cff4).
2023-07-22 13:40:38 +02:00
Sybren A. Stüvel
c7a709bbd3 Manager: change default name to 'Flamenco'
Change the default Manager name from "Flamenco Manager" to just "Flamneco".

The Manager is the central 'thing', and the web interface should just
show "Flamenco". There is no more Flamenco Server (which was a component
in Flamenco v2), and there is no other Flamenco component with a web
interface anyway.
2023-07-22 13:26:40 +02:00
Sybren A. Stüvel
3aeb7f6e48 Update CHANGELOG.md 2023-07-21 17:18:26 +02:00
Eveline Anderson
cdf1cff41b Fix #99410: SocketIO Reconnect Web Interface (#104235)
Fix #99410: Web: fetch version on SocketIO reconnect (and maybe reload)

After losing the SocketIO connection and subsequently reconnecting, the
webapp should re-fetch the Flamenco Manager version and display it in
the top-right corner. If it's different from before, then it will log a
notification about the upgrade and refresh the entire page to ensure the
new version is loaded properly.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104235
2023-07-21 17:16:49 +02:00
Sybren A. Stüvel
ef68f71d54 Manager: actually include manager name in version API call
The API call `GetVersion` should return the Manager name, but it returned
the hard-coded application name `"Flamenco"` instead.
2023-07-21 17:08:10 +02:00
Sybren A. Stüvel
ff2d24274c Webapp: delay useNotifs() call in socket-status.js
Instead of calling `useNotifs()` from the main body of `socket-status.js`,
defer that call until the notifications are actually used.

This decouples the two Pina stores at startup, making it possible to load
`socket-status.js` from `App.vue` without conflicts.
2023-07-21 17:02:48 +02:00
Sybren A. Stüvel
2f3712a077 CHANGELOG: add database integrity checks
Document that the checks are there, and that the periodic checking can
be configured.
2023-07-18 16:35:01 +02:00
Sybren A. Stüvel
63634361ce Manager: make periodic database integrity check configurable
Instead of always performing the periodic integrity check, make it possible
to disable it or run it at different intervals.

Currently for the Blender Studio it's crunch time, so the check should
really only run when there is someone looking at the system (i.e. at
restarts for upgrade purposes).
2023-07-18 16:33:01 +02:00
Sybren A. Stüvel
1a79c19583 Manager: improve logging of database consistency checks
The log messages now all start with `database: `.

No functional changes.
2023-07-18 16:12:26 +02:00
Sybren A. Stüvel
4121c899c3 Manager: perform database integrity check every hour
Perform a database integrity check every hour. This check was already
performed at startup, in the main goroutine.
2023-07-18 16:10:17 +02:00
Sybren A. Stüvel
5eb57427fc Manager: better logging of schedule changes
Log more details of schedule changes, from within the sleep scheduler
(instead of the API implementation).
2023-07-18 15:55:51 +02:00
Sybren A. Stüvel
3def3d2260 Worker: make -version CLI option show the 'extended' version
`flamenco-worker -version` now shows the 'extended' version. This is just
the application version when running a release build. Otherwise it will
be like `3.3-alpha0 (v3.2-nn-ghhhhhh)`, where `nn` is the number of commits
since the last-tagged version (`v3.2` in this example), and `ghhhhhh` is
the Git hash. This can optionally be suffixed by `-dirty` if there were
any uncommitted changes when Flamenco was built.
2023-07-13 15:38:39 +02:00
Sybren A. Stüvel
ebd40dbcd5 Update CHANGELOG 2023-07-13 15:19:44 +02:00
Sybren A. Stüvel
b24d748840 Add-on: use the 'eval' description in the 'eval now' button as well
In the tooltip of the 'evaluate now' button (the one with the Python
icon), include the description provided by the job type in its
`evalInfo.description` field. This makes it explicit what the button
will do when pressed.
2023-07-13 15:14:39 +02:00
Sybren A. Stüvel
6994413ed6 Use new property names for 'use automatic values' button
Adjustment of the job settings property names, making them more widely
usable than just the 'use automatic values' button (also known as
'eval-on-submit').
2023-07-13 15:02:00 +02:00
Sybren A. Stüvel
4b53c06467 OAPI: regenerate code 2023-07-13 15:00:34 +02:00
Sybren A. Stüvel
6686ba3610 OAPI: yet another refactor of 'eval-on-submit' behavior for job settings
The data is still the same, but the names of the properties have changed
a bit so that they're more generic, declarative, instead of specific to
one bit of functionality.

The goal is to have the `evalInfo.description` field usable for the
'evaluate now' button in the add-on as well. That way it should be
clearer what that does.

This commit just updates the OpenAPI definition.
2023-07-13 14:59:22 +02:00