2242 Commits

Author SHA1 Message Date
Sybren A. Stüvel
d11cffc05a Manager: recreate the database schema.sql file
Use `go run ./cmd/sqlc-export-schema` to recreate the Manager's
`schema.sql` file. This way it is ensured that the sqlc code generator
sees the actual database schema as created by Goose.
2025-08-25 12:42:55 +02:00
Sybren A. Stüvel
c7f71c7e3c Make cmd/sqlc-export-schema work again
Make `cmd/sqlc-export-schema` work again, by having it look at the first
schema it can find (instead of requiring that there is only one).
2025-08-25 12:37:34 +02:00
Sybren A. Stüvel
478e5affae Add Goose to the go tools section of go.mod
Instead of needing to install Goose separately, the Makefile will now just
run `go tool goose`. The Go tooling automatically takes care of downloading
and building.

This also pulled in a few upgrades to our packages.
2025-08-25 12:35:26 +02:00
Sybren A. Stüvel
4375b04058 Upgrade dependencies for compatibility with Go 1.25
Upgrade `golang.org/x/tools` from 0.23.0 to 0.36.0, which pulled in some
other upgrades as well. This fixes an issue building mage:

```
# golang.org/x/tools/internal/tokeninternal
../../go/pkg/mod/golang.org/x/tools@v0.23.0/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)
Error: error compiling magefiles
```
2025-08-25 12:31:03 +02:00
Sybren A. Stüvel
d1dfe5f00c Add Gitea templates for merge messages
Copy the Gitea templates for merge messages from Blender, adjusting
the pull request URL so it points to Flamenco.
2025-08-21 12:57:13 +02:00
Vivian Leung
868c7d5a4c Add missing Manager Config definitions (#104424)
Add documentation for `database_check_period` and `clientID` to
[Manager Configuration Definitions][1].

[1]: https://flamenco.blender.org/usage/manager-configuration/#definitions

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104424
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-08-21 12:54:06 +02:00
Sybren A. Stüvel
80d921fb2a Update CHANGELOG.md 2025-08-21 11:20:48 +02:00
Sybren A. Stüvel
ebb322864f Webapp: prevent rewrapping the Manager name in the header
Longer names could get rewrapped, but there is not enough vertical space
for this. Now rewrapping is prevented. Of course a very long name can still
cause layout issues, but at least now slightly-long names work fine.
2025-08-21 11:19:47 +02:00
Vivian Leung
91e26b101e Webapp: Configuration Editor (#104399)
Add a new "Settings" view, to edit the Flamenco Manager configuration
via the web interface. Saving the form will write directly to
`flamenco-manager.yaml`. Depending on how they are used internally by
Flamenco Manager, some settings take effect immediately; most require
a restart of the Manager process, though.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104399
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-08-21 11:15:53 +02:00
Sybren A. Stüvel
790159d735 Webapp: nicer styling of the 'Delete Jobs' confirmation popover
By using the flexbox layout model better, I could remove the `<div
class="align-right">` elements. And by adding a more visual border and
shadow, the popover looks good without having its height set explicitly.
This in turn makes it look good also when it's wrapping due to a small
screen size.
2025-08-19 16:19:18 +02:00
Vivian Leung
af2f0ec520 Mass Job Selection (#104418)
Add a "Select Preceding Jobs" button to the job table button bar.
Users can select a job (or multiple jobs) and click "Select Preceding
Jobs" which will then select all jobs with an updated timestamp that
precedes the selected job(s) updated timestamp.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104418
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-08-19 16:17:56 +02:00
Sybren A. Stüvel
0d57d1e84d Webapp: use flexbox styling to handle button spacing
Instead of setting `margin-left` on all but the first button, use the
`gap` property to set the inter-button gap. This works properly when
buttons rewrap.
2025-08-19 11:14:29 +02:00
Vivian Leung
bd2ebac519 Workers table: Add multi-select and support actions for multiple items (#104395)
Add the following features:

- `Ctrl + Click` or `Cmd + Click` to toggle selection of additional workers
- `Shift + Click` to select a range of additional workers
- Ability to perform `Shutdown`, `Send To Sleep`, and `Wake Up` actions on multiple workers concurrently
- Notifications on how many workers successfully/failed to have an action performed

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104395
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-08-18 11:53:28 +02:00
Vivian Leung
29e0eefdd1 Project website: Fix typo, adjust spacing and heading size in the Manager Configuration page (#104420)
Decreased the heading size for Duration section to avoid competing
with the Definitions heading to respect the nesting hierarchy. Made a
few spacing tweaks and word additions.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104420
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-08-18 11:47:00 +02:00
Vivian Leung
1b54d54223 Backend: Add json values for Shaman.GarbageCollect in config (#104421)
Adds in the missing json values for the struct `Shaman.GarbageCollect`
in the config. Added json values for `period` and `maxAge`.

Related to https://projects.blender.org/studio/flamenco/pulls/104406

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104421
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-08-18 11:45:17 +02:00
Sybren A. Stüvel
8d2dd5f355 Manager: fix sleep scheduler unit test
The unit test was using a mocked "now" in a hardcoded timezone (UTC+2),
while the code under test was actually using the local timezone of the
computer.

Also the schedule computations are now explicitly only in local time.
2025-08-15 15:43:18 -07:00
Sybren A. Stüvel
01a97862db Website: update OpenAPI commit guidelines
Since the introduction of a `.gitattributes` file, tooling (like Gitea)
is aware of which files are generated. This means that all
OpenAPI-related changes (`pkg/api/flamenco-openapi.yaml`, re-generated
code, and changes to the implementation) can be commited together.

The downside is that tooling that is not aware of `.gitattributes` will
still show a big mix of hand-crafted and generated changes. The upside
is that each commit brings Flamenco from a valid, runnable state to
another valid, runnable state. This helps greatly when investigating
history (like bisecting) to find the source of a bug.
2025-08-07 10:45:17 +02:00
Vivian Leung
58e2745838 Backend YAML Config Editor (#104406)
Add a PUT method for `/api/v3/configuration/file`, which entirely
replaces `flamenco-manager.yaml` with the received JSON payload. This
will be used in the future to store configuration edited in the web
frontend.

Ref: #99426

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104406
2025-08-05 18:24:01 +02:00
Sybren A. Stüvel
0ee523a5d5 Update CHANGELOG 2025-08-04 15:45:04 +02:00
Sybren A. Stüvel
dbf23f1a41 Manager: allow absolute manager-local storage path
When an absolute path is used for the manager-local storage, use it
as-is. Before this, it would always be taken as relative to the manager
executable.
2025-08-04 15:43:28 +02:00
Sybren A. Stüvel
041453f401 Unify release package creation for Windows with other platforms
Take the same approach for Windows as for other platforms, so that the
commands in the Makefile are more similar (even though the ZIP for Windows
doesn't contain everything in a single directory, like the tarballs do).
This will make it easier to adjust things for all platforms later.
2025-08-04 15:20:53 +02:00
Sybren A. Stüvel
8e5adddafd Makefile: fix tools-linux target for non-GNU tar
`tar` on macOS has no `--strip-components=1`.

No actual functional changes.
2025-08-04 15:20:49 +02:00
Sybren A. Stüvel
5ec51aded3 Create sqlite directory if it doesn't exist yet
If the dir doesn't exist, sqlite will come back with a cryptic error
message "unable to open database file: out of memory (14)". Better to
just create it.
2025-08-01 17:50:57 +02:00
Sybren A. Stüvel
4b0cdfb735 Take release cycle from makefile instead of parsing the version
Take the release cycle from the `RELEASE_CYCLE` variable in the Makefile,
instead of parsing `VERSION`.

For alpha/beta/rc/release this doesn't matter, it was parsed correctly.
But other suffixes were all marked as "release", which wasn't correct.
2025-07-29 17:11:56 +02:00
Sybren A. Stüvel
cb8354f784 Update CHANGELOG 2025-07-29 17:06:14 +02:00
Sybren A. Stüvel
37b073b8d5 Worker: add JSON tags to config structs
Add JSON tags to the worker configuration structs. This way, the config
is converted to JSON the same as it is to YAML, which is reflected in how
the loaded configuration is logged at startup.
2025-07-29 17:04:55 +02:00
Sybren A. Stüvel
9cc7556720 Website: better redirect URL for SIGGRAPH 2025 2025-07-24 15:15:14 +02:00
Sybren A. Stüvel
5c9a9eacbc Website: replace SIGGRAPH 2023 page with one for 2025
I'm doing another SIGGRAPH talk about Flamenco, and it helps to have a
page on flamenco.blender.org to send people to.

It directs to my own website, as then I can use syncthing to control its
contents while I'm at the conference. Not needing access to the Blender
infrastructure seems safer to me.
2025-07-24 15:13:40 +02:00
Sybren A. Stüvel
fda68ddd33 Cleanup: remove commented-out code
Remove some commented-out old Python code.

No functional changes.
2025-07-22 17:55:04 +02:00
Vivian Leung
78dcd2bdc1 Website: add explanation of flamenco-manager.yaml settings (#104400)
Most of the definitions are based on the documentation in
`internal/manager/config/config.go` or inferred by labels and
descriptions from Flamenco v2 config pages.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104400
2025-07-22 15:14:24 +02:00
Vivian Leung
6284734521 Fix Workers and Tags view when window width is 960px or less (#104413)
Issue likely began after 7b31eba8d7614e82cfcc4583e1dd3c2f40f87944 as
it was an issue with header not being properly positioned.

Just needed to add `header-L` and `header-R` to `grid-template-areas`
and adjust the rest accordingly, and fix a class name typo.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104413
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-07-18 08:15:29 +02:00
Vivian Leung
dcb184e28e Prevent text in nav list items from wrapping onto multiple lines (#104411)
Force menu items to stay on one line.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104411
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-07-17 10:54:51 +02:00
Sybren A. Stüvel
4551be29f6 Fix #104412: Typo in tooltip ".blend_project" → ".blender_project" 2025-07-17 10:34:25 +02:00
Sybren A. Stüvel
0000619f67 Manager: improve "loading configuration" log message
Raise the log level from DEBUG to INFO, as it's quite important to be
explicit about which configuration file is loaded. Also ensure that the
file path is made absolute, so that it's again more explicit.
2025-07-15 10:54:48 +02:00
Vivian Leung
7e40e1bbb0 Also use our Duration in pkg/shaman (#104408)
Move the `Duration` struct from `internal/manager/config` to
`pkg/duration` so that it can be used by `pkg/shaman` as well.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104408
2025-07-11 16:41:41 +02:00
Sybren A. Stüvel
4a0c7b21db Upgrade BAT to 1.20
To get this:
16c208bc8e
2025-07-11 16:32:18 +02:00
Sybren A. Stüvel
f6338064ab Git-ignore temporary files from mockgen
Ignore files that can linger when [mockgen][1] fails to generate code.
They are indeed not meant to be committed.

[1]: https://github.com/golang/mock)
2025-07-07 11:03:14 +02:00
Sybren A. Stüvel
9e7e711ebd Update changelog 2025-07-04 11:23:36 +02:00
Vivian Leung
11a052d854 Web app: Add multi-select of jobs (#104391)
Add the following features:

- `Ctrl + Click` or `Cmd + Click` to toggle selection of additional jobs
- `Shift + Click` to select a range of additional jobs
- Ability to perform `Pause`, `Cancel`, `Requeue`, and `Delete` actions on multiple jobs concurrently
- Notifications on how many jobs successfully/failed to have an action performed

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104391
2025-07-04 11:18:48 +02:00
Vivian Leung
1044350b4b Remove unused code: ShamanGarbageCollect struct in config.go (#104407)
No functional changes.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104407
2025-07-03 09:24:28 +02:00
Sybren A. Stüvel
4492d824cb Manager: Add custom Duration type for the configuration file
Add a custom `time.Duration` wrapper that can be marshalled to JSON as
well. Go's built-in marshaller just treats it as an `int64` and
therefore the values are nanoseconds. This new wrapper keeps the JSON
representation the same as the YAML marshaller (which uses the
`time.Duration.String()` function).

In preparation for !104406.
2025-07-01 19:43:09 +02:00
Jonas Holzman
f0fca60427 Tasks Table: Add Worker column (#104402)
Add a `Worker` column to the Job Tasks Table. This lets artists quickly
visualize on which machine a task is currently running, giving better
insights on worker utilization, as well as better expectations on how
long a task might take to finish when running Flamenco on a Renderfarm
made of different slow / fast workers.

Similarly to the Task Details panel for the "Assigned To"  field
`LinkWorker` Vue element, the cell element contains an hyperlink to the
corresponding worker in the Workers page. Since the Worker page also
contains a backlink to the currently running task, this lets user
quickly navigate between the two pages, as seen in the screen recording
demo below.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104402
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-06-30 14:37:00 +02:00
Sybren A. Stüvel
8f8cd564f6 Mark sqlc-generated files as 'generated' in .gitattributes
No functional changes.
2025-06-30 14:30:35 +02:00
Sybren A. Stüvel
1b9b40728d Website: improve docs about installation of code generators
Link to the official Java installer, as that doesn't require XCode to be
installed (on macOS). And that works on Windows too.
2025-06-30 11:23:43 +02:00
Sybren A. Stüvel
65f391183e Add install-generators make target and improve documentation
Add Make target `install-generators` as alias for `mage installGenerators`
and update the documentation for it.
2025-06-30 11:01:15 +02:00
Sybren A. Stüvel
807f665587 Remove the Shaman's "extra checkout paths" feature
Remove the "extra checkout paths" feature in order to simplify the
configuration file, and thus also the upcoming web interface to edit it.

The "extra checkout paths" feature was added to aid in transition from
the Flamenco v2 shaman system to the v3 system. It is very unlikely that
there is still use of Flamenco v2 by people who will want to migrate to
v3 in the future. I expect that if they wanted to, they'd have done so
by now.

Ref: #104403
2025-06-25 10:14:50 +02:00
Sybren A. Stüvel
716ee49d7e Fix #104401: Worker Sign-On Failure after vulnerability library upgrade
Upgrade `github.com/getkin/kin-openapi` from v0.131.0 to v0.132.0, as that
fixes exactly this bug.
2025-06-19 12:41:24 +02:00
Sybren A. Stüvel
6f54cfc1b8 Update CHANGELOG 2025-06-19 12:11:07 +02:00
Vivian Leung
6c23d5966d Tasks Table: Freeze sorting on Shift key down (#104388)
Listen to the key press of the Shift key on the Tasks list and disable
any table sorting until it is released.

Related to #104386. When a user is performing multi-select, they hold
the Shift key down and intend to click the next row which determines
which rows are selected. To avoid unintended selections, the UI should
not update or shift around in the middle of the user interaction.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104388
2025-06-19 12:09:37 +02:00
Sybren A. Stüvel
0b50f154cc Website: remove the instructions to install make
`make` is no longer needed to build Flamenco, and so the installation
instructions (especially for Windows and macOS) can be made considerably
simpler.
2025-06-17 10:41:31 +02:00