2222 Commits

Author SHA1 Message Date
Srivathsav-Kyatham
84e4a28d6c Allow CORS requests from localhost for development (#104385)
Allow CORS requests from `http://localhost:<port>`. Some webbrowsers
(like Safari) are picky about hostname vs. IP addresses, and this
makes them work well with the webapp development server.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104385
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-04-24 15:23:09 +02:00
Srivathsav-Kyatham
d2bdc9690d Website: update file path of SocketIO handling
Change `webupdates/webupdates.go` to `eventbus/socketio.go`

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104381
2025-04-10 12:02:35 +02:00
Avi Gupta
0c811721fe Website: Add docs for MacOS under "utilities" in "getting started"
Add instructions for installing `make`.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104378
2025-04-07 11:28:20 +02:00
Sybren A. Stüvel
31096b34a7 Website: update GSoC text
I've taken out the plagiarism thing, and added a "become familiar with
Flamenco" thing.
2025-04-05 10:12:59 +02:00
Sybren A. Stüvel
f298e5d03b Website: add clause about the use of AI to the GSoC page 2025-04-03 15:28:30 +02:00
Sybren A. Stüvel
d2f63d4d68 Website: publish Flamenco 3.7 as latest release 2025-04-03 12:32:05 +02:00
Sybren A. Stüvel
0eae746b18 Bumped version to 3.8-alpha1 2025-04-03 12:26:13 +02:00
Sybren A. Stüvel
72c1bad4d0 Fix: actually use the correct rsync parameters
`-p ${WEBSERVER_SSH_PORT}` should be in a `"-e ssh ..."` parameter.
2025-04-03 12:23:48 +02:00
Sybren A. Stüvel
4c5cf91f8a Changelog: mark 3.7 as released today 2025-04-03 12:21:59 +02:00
Sybren A. Stüvel
c51266cce0 Makefile: also include SSH port in publish-release-packages step 2025-04-03 12:21:25 +02:00
Sybren A. Stüvel
d7eca92950 Bump version to 3.7 2025-04-03 12:16:42 +02:00
Sybren A. Stüvel
534e09d905 Makefile: include SSH port in .env file
Include the SSH port in the `.env` file, so that we can rsync to non-
default port numbers.
2025-04-03 12:14:36 +02:00
gitjeet
4a55b7feef Cleanup: fix typo StoreAuthoredJobTaks to ...Task (#104373)
No functional changes.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104373
2025-04-03 12:04:42 +02:00
Sybren A. Stüvel
f239046702 Website: remove linkTitle: GSoC
Remove the `linkTitle: GSoC` from the GSoC page front matter. It is not
used for the links in the navigation tree, which is why I put it there
to begin with.
2025-04-03 10:48:05 +02:00
Sybren A. Stüvel
a1f97e8f19 Website: link to Blender's 'contributing code' docs 2025-04-03 09:58:26 +02:00
Sybren A. Stüvel
8e5f6d006d Website: add GSoC section
Add a section for GSoC.
2025-04-03 09:57:54 +02:00
Nitin-Rawat-1
edc57ab392 Bump packaged FFmpeg version 5.1.2 -> 7.0.2
The previously-bundled version was so old, when packaging FFmpeg for
Windows release, FFmpeg could not be downloaded any more.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104351
2025-03-31 15:53:43 +02:00
Srivathsav-Kyatham
4be5c1ca5b Update Darwin system information implementation (#104361)
Instead of just showing "macOS", now show the name as declared by the
OS itself, the version, and the kernel/build version.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104361
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-03-25 10:45:57 +01:00
gitjeet
97109a6c92 Fix typo: from listerer to listener
No functional changes.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104368
2025-03-25 10:33:20 +01:00
Sybren A. Stüvel
f6d1d85722 Mage: Add gofmt to the Mage commands
Add two new mage commands:

- `mage format`: run `gofmt` on all the Go sources.
- `mage formatCheck`: run the formatter to check formatting issues. This
  will output the diff to make the code format-compliant.

These commands are also available via `make format` resp. `make
format-check`.
2025-03-24 18:12:27 +01:00
Sybren A. Stüvel
da4dd490d0 Cleanup: explicitly silence linter for empty else clause
The `else` block does contain a comment to explain what situation we're
in when the `if` condition is false. I like that construct, but
golangci-lint did not.

No functional changes.
2025-03-20 13:46:20 +01:00
Sybren A. Stüvel
5a5742ce60 Cleanup: explicitly ignore error when requesting shutdown
Explicitly ignore an error when requesting the Manager to shut down.
This was already ignored implicitly, but now it's explicit to make
linters happy.

No functional changes.
2025-03-20 13:45:12 +01:00
Sybren A. Stüvel
44470b892b Manager: handle job deletion errors more uniformly
Some error cases were returned, others were logged AND returned. Now all
errors are just returned, and the caller always logs them.
2025-03-20 13:40:17 +01:00
Sybren A. Stüvel
f1de595acc Manager: log an error when database rollback fails
Log an error when a database transaction rollback fails. I wouldn't know
how to test, because usually stuff Just Works, but it's good to have
this logged anyway.
2025-03-20 13:33:23 +01:00
Sybren A. Stüvel
5706fe435a Manager: fix issue in first-time setup wizard causing empty blender var
Fix an issue in the First-Time Setup wizard, which caused an empty `blender`
variable when using the system-default location for Blender.

Fixes #104366
2025-03-20 13:20:32 +01:00
Sybren A. Stüvel
a666b87f7f Manager: warn when the blender variable has no value
When the `blender` variable has no value, Flamenco will not be able to
run Blender, which is worth emitting a warning about early on.

This required a bit of a reshuffle of the configuration loading logic, to
avoid loading things twice (and thus warning twice).

Fixes part of #104366
2025-03-20 13:09:42 +01:00
Sybren A. Stüvel
0766074120 Website: set 3.7-alpha1 as last experimental version 2025-02-28 12:34:52 +01:00
Sybren A. Stüvel
b80bad12cd Bump version to 3.7-beta1 2025-02-28 12:32:40 +01:00
Sybren A. Stüvel
d10bb0a9d7 Manager: at startup check for stuck pause-requested jobs
When the Manager starts up, it now also checks whether `pause-requested`
jobs can actually go to `paused`.
2025-02-28 12:32:36 +01:00
Sybren A. Stüvel
ff29d2ef26 Manager: fix jobs getting stuck in pause-requested status
When a Worker would sign off while working on a task, and that task's
job would be in `pause-requested` state, it would always re-queue the
task. This in turn would not get detected, which caused the job to get
stuck.

Now tasks correctly go to `paused` when a Worker signs off, and
subsequently the job will be re-checked and go to `paused` when possible
as well.

Note that this does not handle already-stuck jobs. That'll be for the
following commit.
2025-02-28 12:26:01 +01:00
Sybren A. Stüvel
efdc5a5a20 Website: mark the 'single image' job type as for v3.6+
Now that v3.6 has been released, the overly-specific "v3.6-alpha+" can be
replaced with simply "v3.6".
2025-02-21 11:06:42 +01:00
Nitin-Rawat-1
e558883c7f Fix #104352: Nil reference panic when FFmpeg can be found (#104353)
Fix a `nil` dereference caused by an extra check on `err`.

Co-authored-by: Nitin Rawat <shvmnrwt@gmail.com>
Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104353
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2025-02-17 15:38:08 +01:00
Sybren A. Stüvel
eb7177388c Update CHANGELOG.md 2025-02-14 18:52:47 +01:00
Sybren A. Stüvel
3fb73c6c9a Make two-way variable replacement case-insensitive
The conversion from a known path prefix to a variable is now done in a
case-insensitive way. This means that if the variable `{storage}` has
value `S:\Flamenco`, a path `s:\flamenco\project\file.blend` will be
recognised and replaced with `{storage}\project\file.blend`.

This happens uniformly, regardless of the platform. So also on Linux,
which has a case-sensitive filesystem, this matching is done in a
case-insensitive way. It is very unlikely that a Flamenco configuration
has two separate variables, for paths that only differ in their case.

Fixes: #104336 Drive letter case mismatch causes two way variables not
to work correctly
2025-02-14 18:44:52 +01:00
Sybren A. Stüvel
fb65e55c98 Worker: improve warning when FFmpeg cannot be found
On Linux (at least my Ubuntu) the error from finding FFmpeg wasn't
identified as a "file not found" error, and thus the more abstract
"unexpected error" message was logged.

Now any error with "file not found" in the message is handled as such,
and just produces a warning without the word "error" in there.
2025-02-10 12:28:37 +01:00
Sybren A. Stüvel
e48fa4cc5f Manager: load job compiler scripts on demand, instead of at startup
The Manager now loads the JavaScript files for job types on demand,
instead of caching them in memory at startup.

This will make certain calls a bit less performant, but in practice this
is around the order of a millisecond so it shouldn't matter much.

Fixes: #104349
2025-02-10 12:07:55 +01:00
Sybren A. Stüvel
e3d5d6b041 Manager: avoid double-logging errors in job compiler scripts
Return a custom error type from `VM.getCompileJob()`, so that underlying
errors can be wrapped and more info can be given to the caller. This
replaces a local logger call, preventing both the function and its
caller logging the same error.
2025-02-10 12:07:47 +01:00
Sybren A. Stüvel
10b91422cc Website: upgrade NodeJS dependency from v18 to v22
The latest NodeJS LTS release (v22) seems to work fine. No need to stick
to older versions, from what I can see.
2025-02-10 12:07:47 +01:00
Sybren A. Stüvel
b845189dfc Manager: protect task state machine with a mutex
Protect the public functions of the task state machine with a mutex, so
that only one task/job state change is handled at a time.

This should avoid race conditions.
2025-01-09 15:28:06 +01:00
Sybren A. Stüvel
1c50837577 Makefile: remove unused phony targets 2025-01-09 14:46:43 +01:00
Sybren A. Stüvel
8b322e84f8 Manager: prevent error when fetching task that was never assigned
Prevent an error when fetching a task that was never assigned to a
worker.

The error:

```
WRN error fetching task worker
    error="fetching worker : worker not found: sql: no rows in result set"
```
2025-01-09 14:45:30 +01:00
Sybren A. Stüvel
234cfbf983 Manager: add mage target for building with the race condition checker
Run `mage FlamencoManagerRace` to build Flamenco Manager with the
race condition checker enabled.

See https://go.dev/doc/articles/race_detector
2025-01-09 14:39:21 +01:00
Sybren A. Stüvel
35d6b03a3b Manager: log warning when built with race condition checker enabled 2025-01-09 14:38:47 +01:00
Sybren A. Stüvel
94687f78e9 Website: prevent newline after shortcodes 2025-01-09 11:12:55 +01:00
Sybren A. Stüvel
e4692e77e8 Website: Add more links to the built-in job compiler scripts
I hope this makes them easier to find.
2025-01-09 11:00:17 +01:00
Sybren A. Stüvel
7be05afa11 Cleanup: remove unused code 2024-12-04 14:05:50 +01:00
Sybren A. Stüvel
531a0184f7 Transition from ex-GORM structs to sqlc structs (5/5)
Replace old used-to-be-GORM datastructures (#104305) with sqlc-generated
structs. This also makes it possible to use more specific structs that
are more taylored to the specific queries, increasing efficiency.

This commit deals with the remaining areas, like the job deleter, task
timeout checker, and task state machine. And anything else to get things
running again.

Functional changes are kept to a minimum, as the API still serves the
same data.

Because this work covers so much of Flamenco's code, it's been split up
into different commits. Each commit brings Flamenco to a state where it
compiles and unit tests pass. Only the result of the final commit has
actually been tested properly.

Ref: #104343
2024-12-04 14:00:22 +01:00
Sybren A. Stüvel
ddced5a823 Transition from ex-GORM structs to sqlc structs (4/5)
Replace old used-to-be-GORM datastructures (#104305) with sqlc-generated
structs. This also makes it possible to use more specific structs that
are more taylored to the specific queries, increasing efficiency.

This commit deals with the worker sleep schedule.

Functional changes are kept to a minimum, as the API still serves the
same data.

Because this work covers so much of Flamenco's code, it's been split up
into different commits. Each commit brings Flamenco to a state where it
compiles and unit tests pass. Only the result of the final commit has
actually been tested properly.

Ref: #104343
2024-12-04 14:00:19 +01:00
Sybren A. Stüvel
c04e4992e0 Transition from ex-GORM structs to sqlc structs (3/5)
Replace old used-to-be-GORM datastructures (#104305) with sqlc-generated
structs. This also makes it possible to use more specific structs that
are more taylored to the specific queries, increasing efficiency.

This commit deals with worker tags (on both workers and jobs).

Functional changes are kept to a minimum, as the API still serves the
same data.

Because this work covers so much of Flamenco's code, it's been split up
into different commits. Each commit brings Flamenco to a state where it
compiles and unit tests pass. Only the result of the final commit has
actually been tested properly.

Ref: #104343
2024-12-04 14:00:16 +01:00
Sybren A. Stüvel
84f93e7502 Transition from ex-GORM structs to sqlc structs (2/5)
Replace old used-to-be-GORM datastructures (#104305) with sqlc-generated
structs. This also makes it possible to use more specific structs that
are more taylored to the specific queries, increasing efficiency.

This commit mostly deals with workers, including the sleep schedule and
task scheduler.

Functional changes are kept to a minimum, as the API still serves the
same data.

Because this work covers so much of Flamenco's code, it's been split up
into different commits. Each commit brings Flamenco to a state where it
compiles and unit tests pass. Only the result of the final commit has
actually been tested properly.

Ref: #104343
2024-12-04 14:00:13 +01:00