Commit Graph

1455 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
920420c10e Website: write comparison between Flamenco v2 and v3
Manifest Task: T99698
2022-07-26 18:59:32 +02:00
574198aa13 Website: document a bit more about job compiler scripts 2022-07-26 18:59:06 +02:00
e481213e4a Website: write some 'getting started' steps
Still too many steps, we need to simplify!
2022-07-26 18:58:54 +02:00
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
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
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
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
859a2e6eda Manager: better logging when trying to find Blender 2022-07-26 17:25:50 +02:00
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
0c8409eb2e Start of Q&A page on the website 2022-07-26 17:25:50 +02:00
f71bfdfafe Manager: fix unit test
Fix the unit test I broke in rF736ca103c3d7f37557ed541ca70117bc95bef932
2022-07-26 17:25:50 +02:00
Francesco Siddi
35591b174b Web: Sleep schedule UX updates 2022-07-26 16:51:51 +02:00
Pablo Vazquez
85eb17e434 Web: Layout adjustments to sleep schedule 2022-07-26 16:51:51 +02:00
Pablo Vazquez
bd20ba7d6b Web: Fix two-column layout outside of Workers page 2022-07-26 16:51:51 +02:00
Pablo Vazquez
f0a592a9ba Web: Style and layout to Sleep Schedule management
* Use full-width form
  Fitting an input inside a <dl> makes it jump around
* Add button to toggle schedule on/off
* Add button to cancel editing the schedule
* Use time type inputs for Start/End Time fields
* Add help text to "Days of Week" to explain it's only the first 2 letters
2022-07-26 16:51:51 +02:00
Pablo Vazquez
68370a1df4 Web: Use two-column layout 2022-07-26 16:51:51 +02:00
Francesco Siddi
3b719dca77 Web: UI for Worker schedule editing 2022-07-26 16:51:51 +02:00
Francesco Siddi
d6f419a683 Web: Rename link components
No functional change, just name the components with their type first,
so that all 'link' related components are more discoverable and next
to each other.
2022-07-26 16:33:05 +02:00
Francesco Siddi
9129427e29 Setup Assistant: Display Blender version
Replace the [preview output] with the actual Blender version, and
update the tooltip to describe where the version comes from.
2022-07-26 11:48:40 +02:00
Francesco Siddi
792909dc49 Setup Assistant: Make intro screen more compact
Additionally, use clearer wording in the shared storage section about
what the storage is used for.
2022-07-26 11:48:40 +02:00
Francesco Siddi
36e0a6052f Web: Let WorkerTaskLink support undefined tasks
Fixes an error when the component is passed an undefined or missing
workerTask property.
2022-07-26 11:22:32 +02:00
736ca103c3 Manager: show current/last task in worker details
The Task details component already linked to the Worker it was assigned
to last, and now the Worker links back to the task.

There's only one task shown in the Worker details. If the Worker is
actively working on a task, that one's shown. Otherwise it's the
last-updated task that was assigned to the worker.
2022-07-26 10:36:02 +02:00
2a4e557bd9 OAPI: regenerate code 2022-07-26 10:28:28 +02:00
ed1a968691 OAPI: include "task" in fetchWorker response
Include the worker's current/last task in the response of the
`fetchWorker` operation.
2022-07-26 10:27:57 +02:00
Francesco Siddi
9948fdab71 Rename First Time Wizard to Setup Assistant
This commit does not introduce functional changes, besides renaming
every mention of 'wizard' with 'setup assistant'. In order to run the
manager setup assistant use:

./flamenco-manager -setup-assistant

The change was introduced to favor more neutral and descriptive working
for this functionality. Thanks to Sybren for helping to get this done!
2022-07-25 17:17:04 +02:00
Francesco Siddi
a2bd8a5615 OAPI: generate code 2022-07-25 17:16:53 +02:00
Francesco Siddi
3c22becc18 OAPI: rename wizard to setup-assistant
No functional changes, just a rename.
2022-07-25 17:14:21 +02:00
3206842fe8 Manager: log "own URLs" last, to make them more visible
Logging the URLs at which the Manager can be reached as the last thing
when starting up, in the hope that this makes them more noticable and
inviting to actually visit.
2022-07-25 17:10:41 +02:00
858089a1c3 Makefile: add release-package target
Add Makefile target for building release packages. There are individual
targets `release-package-{linux,darwin,windows}` for specific OSses. The
`release-package` targets just runs all of them.

The `release-package-darwin` builds only for AMD64/x64 CPUs, since there
are no static builds fo FFmpeg for that platform:
https://evermeet.cx/ffmpeg/apple-silicon-arm

Manifest Task: T99411
2022-07-25 16:53:25 +02:00
45542ef84c OAPI: regenerate code
Regenerate the OpenAPI code to reflect the new version number handling.

See rFc1a728dc for more info.
2022-07-25 16:12:27 +02:00
76f99d9f7d Change flamenco.io → flamenco.blender.org in a few places
Update the add-on's documentation URL and the README for the static website
so that they refer to https://flamenco.blender.org/
2022-07-25 16:10:39 +02:00
c1a728dc2f Version updates via Makefile
Flamenco now no longer uses the Git tags + hash for the application
version, but an explicit `VERSION` variable in the `Makefile`.

After changing the `VERSION` variable in the `Makefile`, run
`make update-version`.

Not every part of Flamenco looks at this variable, though. Most
importantly: the Blender add-on needs special handling, because that
doesn't just take a version string but a tuple of integers. Running
`make update-version` updates the add-on's `bl_info` dict with the new
version. If the version has any `-blabla` suffix (like `3.0-beta0`) it
will also set the `warning` field to explain that it's not a stable
release.
2022-07-25 16:08:07 +02:00
a0b4fc18e6 Makefile: quiet the generator for JS and Python code
The OpenAPI generator is very noisy, so it now logs to a file instead
of to stdout. The file is git-ignored. This was easier than redirecting
to `/dev/null`, as that's not available on Windows.
2022-07-25 16:08:07 +02:00
ab8ecc24cc Cleanup: Add missing license specifiers
Add license specifiers to Go files that were missing them:

```
// SPDX-License-Identifier: GPL-3.0-or-later
```

No functional changes.
2022-07-25 16:08:07 +02:00
c7987a8500 Makefile: remove PKG_LIST variable
The `$PKG_LIST` variable was only used for running `go test`, and can be
replaced with `./...`.
2022-07-25 16:08:07 +02:00
bcbe35a7c7 Run Go tests in parallel
Earlier versions of the code didn't have proper separation of SQLite
databases for the unit tests. Tests nowadays use separate in-memory
databases, so they can run in parallel just fine.
2022-07-25 16:08:07 +02:00
Francesco Siddi
05e82ea5e4 Website: Update deployment script
The flamenco.io website moves to flamenco.blender.org!
This commit updates the Makefile as follows:

- Rename 'site' to 'project-website', so the new command to deploy is
  'make project-website'
- Move the website directory from 'flamenco-io-site' to
  'project-website'
- Update the rsync command do reflect the new deployment destination
2022-07-25 14:42:30 +02:00
424b87d1d3 Shaman tests: ensure the temporary storage path is not a symlink
Shaman cannot handle cases where the storage path is a symlink (i.e. cases
where `filepath.EvalSymlinks(storagePath)` does not return `storagePath`).
This caused macOS devices to fail the unit tests, because macOS uses a
symlinked path for temporary files.

This commit changes the unit tests, to always use the real path instead of
the OS-provided symlink. This does *not* fix the actual issue in Shaman,
for that see T99965.
2022-07-25 13:03:46 +02:00
6731f96579 Shaman: better logging for garbage collector
Increase verbosity (debug → info) when checkout dir traversal fails, and
add a trace-level log for each file that is still in use. There were some
issues with symlinks, where the wrong paths were compared (see T99965) and
this log made it visible what was going wrong.
2022-07-25 13:01:49 +02:00