Commit Graph

2023 Commits

Author SHA1 Message Date
a229c0f75a Make: rename target project-website to deploy-website
This makes it clearer that this target actually deploys the website
to flamenco.blender.org.
2023-09-08 15:37:29 +02:00
89a323d079 Fix vulnerability GO-2022-0603, but on code path we don't touch
Fix a vulnerability in the YAML parser library. It's in a part of the
library that Flamenco doesn't touch, which is why this isn't mentioned
in the CHANGELOG.md file.

------------

Found 1 vulnerability in packages that you import, but there are no call
stacks leading to the use of this vulnerability. You may not need to
take any action. See https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck
for details.

Vulnerability #1: GO-2022-0603
    Panic in gopkg.in/yaml.v3
  More info: https://pkg.go.dev/vuln/GO-2022-0603
  Module: gopkg.in/yaml.v3
    Found in: gopkg.in/yaml.v3@v3.0.0-20210107192922-496545a6307b
    Fixed in: gopkg.in/yaml.v3@v3.0.0-20220521103104-8f96da9f5d5e
2023-09-07 12:13:07 +02:00
e0be4f2378 Run go mod tidy 2023-09-07 12:09:19 +02:00
6a9e1239b8 Security fixes
Vulnerability #1: GO-2023-1990
    Excessive CPU consumption when decoding 0-height images in
    golang.org/x/image/tiff
  More info: https://pkg.go.dev/vuln/GO-2023-1990
  Module: golang.org/x/image
    Found in: golang.org/x/image@v0.5.0
    Fixed in: golang.org/x/image@v0.10.0
    Example traces found:
      #1: internal/worker/output_uploader.go:144:36: worker.loadAsJPEG calls image.Decode, which calls tiff.Decode

Vulnerability #2: GO-2023-1989
    Excessive resource consumption in golang.org/x/image/tiff
  More info: https://pkg.go.dev/vuln/GO-2023-1989
  Module: golang.org/x/image
    Found in: golang.org/x/image@v0.5.0
    Fixed in: golang.org/x/image@v0.10.0
    Example traces found:
      #1: internal/worker/output_uploader.go:144:36: worker.loadAsJPEG calls image.Decode, which calls tiff.Decode
2023-09-07 12:07:58 +02:00
900f3a7faa Add make vet target
This runs `go vet` as well as `govulncheck`. These may install
dependencies other than installed via `make with-deps`.
2023-09-07 12:07:27 +02:00
c12e4cae74 Webapp: add explanation to Tags view
Add a bit of info on how the tags work to the right-hand column of the
Tags view.
2023-09-04 14:11:26 +02:00
eb11f10b9d Cleanup: webapp, reformat with Prettier
No functional changes.
2023-09-04 14:10:29 +02:00
0821df8f3a Webapp: make Tags view respond to SocketIO messages
Make the Tags view/tab respond to changes in worker tags. This way the
'Refresh' button is no longer necessary, as the information is always
up to date.
2023-09-04 13:24:50 +02:00
d6ffb424eb Webapp: remove unused imports
No functional changes.
2023-09-04 13:23:33 +02:00
fb58f101ea Webapp: remove last reference to worker list
Just a remainder of copy-paste.
2023-09-04 13:23:10 +02:00
9029ab89eb Webapp: show placeholder when worker tag has no description
Show a 'click to set a description' placeholder, when a worker tag has
no description. That way it's clear where to click to edit it.
2023-09-04 13:16:08 +02:00
31a5a8dc23 Webapp: make the Manager responsible for setting a default tag description
When creating a new tag, don't set the description in the JS code, but
leave that for the Manager API to do.
2023-09-04 13:08:55 +02:00
Eveline Anderson
c68a72ca49 Web Interface for Tags (#104244)
Add a web interface for CRUD operations of worker tags.

A 'Tags' tab is added to the web interface, with a list of available
worker tags. New ones can be created, existing tags removed, and the
name & description of tags can be edited.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104244
2023-09-04 13:06:06 +02:00
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
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
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
621f050a68 OAPI: regenerate code 2023-08-23 13:54:02 +00:00
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
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
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
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
72ec9501b9 Website: add restart_exit_code to the worker config documentation 2023-08-14 17:40:36 +02:00
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
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
3760b06066 Update CHANGELOG
Add the 'restartable workers' feature to the changelog.
2023-08-14 16:03:11 +02:00
0364a7ad79 Merge pull request 'Restartable workers' (#104242) from restartable-workers into main 2023-08-14 16:01:33 +02:00
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
1eb7764d00 OAPI: regenerate code 2023-08-14 16:00:06 +02:00
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
9009b60379 Website: add list of supported commands
Document the commands currently implemented in Flamenco Worker.
2023-08-09 10:55:58 -07:00
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
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
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
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
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
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
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
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
7d72653c93 Extra tests for backslashed two-way variables 2023-07-31 12:32:42 +02:00
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
e8ae0c3cf2 Website: Fix 'report a bug' link 2023-07-24 14:53:18 +02:00
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
1ef9a81094 Cleanup: remove TODO
Remove a TODO (the work was done in cdf1cff4).
2023-07-22 13:40:38 +02:00
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
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