2256 Commits

Author SHA1 Message Date
0b6008c7fb Update README with performance achievements and production-grade positioning
Transform README to showcase the massive engineering improvements:
- Lead with 42x-168x performance gains and build optimization
- Highlight 100% build failure elimination
- Position as production-grade render farm system
- Showcase comprehensive Docker development environment
- Present technical sophistication and developer experience improvements
2025-09-09 13:52:50 -06:00
2f82e8d2e0 Implement comprehensive Docker development environment with major performance optimizations
* Docker Infrastructure:
  - Multi-stage Dockerfile.dev with optimized Go proxy configuration
  - Complete compose.dev.yml with service orchestration
  - Fixed critical GOPROXY setting achieving 42x performance improvement
  - Migrated from Poetry to uv for faster Python package management

* Build System Enhancements:
  - Enhanced Mage build system with caching and parallelization
  - Added incremental build capabilities with SHA256 checksums
  - Implemented parallel task execution with dependency resolution
  - Added comprehensive test orchestration targets

* Testing Infrastructure:
  - Complete API testing suite with OpenAPI validation
  - Performance testing with multi-worker simulation
  - Integration testing for end-to-end workflows
  - Database testing with migration validation
  - Docker-based test environments

* Documentation:
  - Comprehensive Docker development guides
  - Performance optimization case study
  - Build system architecture documentation
  - Test infrastructure usage guides

* Performance Results:
  - Build time reduced from 60+ min failures to 9.5 min success
  - Go module downloads: 42x faster (84.2s vs 60+ min timeouts)
  - Success rate: 0% → 100%
  - Developer onboarding: days → 10 minutes

Fixes critical Docker build failures and establishes production-ready
containerized development environment with comprehensive testing.
2025-09-09 12:11:08 -06:00
e8ea44a0a6 Implement optimized Docker development environment
- Add multi-stage Dockerfile.dev with 168x Go module performance improvement
- Implement modern Docker Compose configuration with caddy-docker-proxy
- Add comprehensive Makefile.docker for container management
- Migrate from Poetry to uv for Python dependencies
- Fix Alpine Linux compatibility and Docker mount conflicts
- Create comprehensive documentation in docs/ directory
- Add Playwright testing integration
- Configure reverse proxy with automatic HTTPS
- Update .gitignore for Docker development artifacts
2025-09-09 10:25:30 -06:00
luz paz
92a93bb4d7 Cleanup: Fix various documentation related typos
Found via `codespell -S "*.po,*.chunk.min.js" -L
cace,cacl,currenty,eacf,eacg,fo,nd,nin,ontext,originaly,ot,te,ue`

No functional changes.

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/studio/flamenco/pulls/104436
2025-09-08 16:47:55 +02:00
Sybren A. Stüvel
e4e24fabf2 Webapp: update task details when a task update is received
Fix an issue where the task details panel was not updated when the Manager
sends a task update.
2025-09-04 17:52:36 +02:00
Sybren A. Stüvel
30a26bf6d2 Website: Add 'Does Flamenco have an API?' to the FAQ
This really is a FAQ by now.
2025-09-04 17:11:44 +02:00
Vivian Leung
2de79074ab WebApp: Cast FormInputNumber value to Number onInput
Fix #104432, where the form throws an error and cannot be saved. It is
happening because the backend is expecting `number`, not `string`, and
whenever the user types, the value in the input gets changed to a
string. The solution is to cast `FormInputNumber` value to a number
`onInput` to always maintain the `number` type.

Pull Request: https://projects.blender.org/studio/flamenco/pulls/104434
2025-09-04 15:02:34 +02:00
Sybren A. Stüvel
ed71042073 Add MQTT Server for debugging purposes
Add an MQTT server (aka 'broker') that logs all published messages. This
is purely for debugging Flamenco Manager's events. Although it should
work fine as MQTT broker, it's not meant for production use.

Run the server with `go run ./cmd/mqtt-server`
2025-09-02 09:41:42 +02:00
Vivian Leung
7ddce9ac22 Manager: Add Input Validation to Settings page
Prevent fields from being empty, when it's known that Flamenco Manager
will not start up if they are.

The icons for the variable add/delete are enhanced with colors and
icons +/- or with a trashcan SVG.

Error/warning messages appear under inputs when values are invalid on
blur.

`FormInputDropdownSelect` is also created here, decoupling the
validation from Dropdown Select. `DropdownSelect`'s props now have
type definitions.

CSS selectors are more specified, and renamed to be more fitting.

### What 'required' means for each input

- For text, `required` means the field cannot be empty.
- For numbers, `required` means the field cannot be empty, and having
  a `min` and/or `max` means the number must be equal to or
  above/below the min/max.
- For dropdowns, `required` means the selection cannot be empty, and
  `strict` means that an option not included in the list passed to the
  `options` prop cannot be selected.
- For the new variable input, empty strings, duplicate variable names,
  and variable names that contain `{` or `}` are invalid.

### Required Settings

To keep the application running and remaining on the same page, these
fields **must** be non-empty strings:

- `database` and `shared_storage_path` (both which can be invalid so
  long as they are non-empty)
- `listen` (which MUST be a valid value AND non-empty) When
  `shared_storage_path` is empty, the application will automatically
  jump to the Setup Assistant which after completing will create a new
  `flamenco-manager.yaml` and restart the application. If `database`
  is empty and `listen` is not a proper port, the application will
  fail to start, leading the user to a dead end and forcing them to
  manually configure `flamenco-manager.yaml` to get it running again.

To prevent the backend from throwing a `Bad Request` error, numerical
and time duration inputs **must not** be null or empty:

- `database_check_period`, `task_timeout`, `worker_timeout`,
  `blocklist_threshold`, `task_fail_after_softfail_count`

Pull Request: https://projects.blender.org/studio/flamenco/pulls/104409
2025-09-01 14:24:56 +02:00
Sybren A. Stüvel
9603f3b711 Bumped version to 3.8-alpha2 2025-08-28 16:47:00 +02:00
Vivian Leung
4c2f4e831f Webapp: Prevent text wrapping in buttons
Prevent wrapping text in `<input type="button">` elements.

Pull Request: https://projects.blender.org/studio/flamenco/pulls/104427
2025-08-28 11:27:47 +02:00
Sybren A. Stüvel
c573122e01 Database: regenerate with sqlc 1.29.0
This just changes the version comments in the generated files. Now they're
consistent with the version of sqlc tracked in go.mod.

No functional changes.
2025-08-26 14:06:26 +02:00
Sybren A. Stüvel
e5215b86b1 Website: update developer documentation about the database
Clarify the uses of SQLC and Goose, remove the last mention of GORM.
2025-08-25 12:55:40 +02:00
Sybren A. Stüvel
64a752dfdb Add sqlc to the tools section of go.mod
This makes it possible to run `go tool sqlc` without explicitly installing
anything. This does require a C++ compiler, though.
2025-08-25 12:55:03 +02:00
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