1626 Commits

Author SHA1 Message Date
Sybren A. Stüvel
0e6b6a6013 API: allow worker cluster creation without explicit UUID
Clusters can be created without UUID now. In that case, a random one will
be generated. The cluster will be returned by the creation call, so that
the caller can know that generated UUID.
2023-04-04 13:18:24 +02:00
Sybren A. Stüvel
3724a8874e Slight change of worker cluster behaviour
Workers without cluster now only run jobs without cluster.
2023-04-04 13:17:45 +02:00
Sybren A. Stüvel
d75962c817 Web: hide 'clusters' list when there are none
Due to the proxying behaviour of VueJS, `workers.clusters` is always
considered `true`, even when empty. Explicitly test for the length.
2023-04-04 12:32:32 +02:00
Sebastian Parborg
f6f1ebdd05 Make runtime paths configurable at build time
To allow more build-time configuration:

- `Makefile` will now pick up `LDFLAGS` from environment variables, and
- locations of configuration files can now be overridden with linker
  options.

These are not used for regular Flamenco builds, but do allow studios to
customize where configuration files are stored.

Review: https://projects.blender.org/studio/flamenco/pulls/104200
2023-04-04 12:29:03 +02:00
Sybren A. Stüvel
922e772efa Add clusters to CHANGELOG.md 2023-04-04 12:21:59 +02:00
Sybren A. Stüvel
2a6cbcf030 Addon: Add worker cluster support
Worker clusters can be fetched from the Manager, and submitted jobs can
be assigned to those clusters.
2023-04-04 12:19:44 +02:00
Sybren A. Stüvel
3306c7fc8d Web: add support for worker clusters
The support is still fairly minimal. Clusters cannot be managed via the
webapp yet, so the API has to be used directly for that. Workers can be
assigned to clusters via the webapp though.
2023-04-04 12:19:14 +02:00
Sybren A. Stüvel
8408d28a6b Manager: add support for worker clusters 2023-04-04 12:18:35 +02:00
Sybren A. Stüvel
675d966263 OAPI: regenerate code 2023-04-04 12:18:17 +02:00
Sybren A. Stüvel
cbbf7b01d6 API: add worker clusters to the API
Worker Clusters can be managed via the API, workers can be assigned to
any number of clusters (if not assigned to any, they'll pick up any task).

Jobs can be submitted with a cluster ID, in which case only workers that
are in that cluster or are clusterless will pick up its tasks.
2023-04-04 12:16:54 +02:00
Sybren A. Stüvel
28cc7b7a3f Manager: improve logging when workers register
The info message that a worker registered now also includes its UUID.
Any failure hashing the password will now also log the worker name + UUID.
2023-04-04 12:13:21 +02:00
Sybren A. Stüvel
e2559b1181 Cleanup: remove doubly-declared default value in persistence layer
No functional changes.
2023-04-03 16:59:22 +02:00
Sybren A. Stüvel
159ce5b34a Manager: avoid starting error messages with 'error'
No real functional changes, just server-side logging.
2023-04-03 16:58:48 +02:00
Sebastian Parborg
9bc1d14022 Delete '.arcconfig' (#104199)
Arcanist is not used by the project anymore.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104199
2023-03-21 16:07:31 +01:00
Sybren A. Stüvel
4a142316a1 Add --tag to git describe
Without this, the reported version is 'v3.1-{number of commits}` even after
v3.2 has been tagged. Weird.
2023-03-21 12:24:48 +01:00
Sybren A. Stüvel
996f5da2af Bumped version to 3.3-alpha0 2023-03-21 12:22:38 +01:00
Sybren A. Stüvel
a386d80765 Bump govulncheck dependencies 2023-03-21 12:20:43 +01:00
Sybren A. Stüvel
1b60b43736 Update CHANGELOG 2023-03-21 12:18:03 +01:00
Sybren A. Stüvel
0ac64719e7 Job deleter: improve logging
Various improvements to the logging of the job deletion:

- Reduce the log level of the "removing logs" and "removing job from
  database" lines from INFO to DEBUG, so that only one line of INFO is
  logged per deleted job
- Show size of the queue and the check interval in the "job deletion
  queue is full" log message.
2023-03-21 12:16:04 +01:00
Sybren A. Stüvel
0fb252083b Job deletion: when stopping to queue up more deletions, log how many remain
When queueing up jobs to be deleted, log how many deletions remain to be
picked up later. Once a minute the database is checked for such deletion
requests, so the next batch will be scheduled in a minute.
2023-03-21 10:45:34 +01:00
Sybren A. Stüvel
b25e63f557 Job deletion: avoid looping over entire list of jobs when queue full
When there are more job deletion requests than can be kept in the queue,
just stop trying to queue them.
2023-03-21 10:44:28 +01:00
MKRelax
7963ab5efd Manager: fixed copy/paste typo in CheckBlenderExePath() (#104192)
The `toCheck` variable in `CheckBlenderExePath()` was initialized to `CheckSharedStoragePathJSONBody`, should be `CheckBlenderExePathJSONBody`.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104192
2023-03-06 12:55:53 +01:00
Sybren A. Stüvel
ea20e94e94 Website: more updates to 'steps to release'
Move the updating of `web/project-website/data/flamenco.yaml` to an earlier
step, so that it's committed & tagged along with the rest of the changes.
2023-02-21 12:17:09 +01:00
Sybren A. Stüvel
a692444fb5 Website: more updates to the 'steps to release'
It now also has a step to update `web/project-website/data/flamenco.yaml`.
2023-02-21 12:14:28 +01:00
Sybren A. Stüvel
9cf34089e4 Website: update steps to release new version
Some steps still expected that the version bump was done with a script
(which hasn't been in use for a while now).
2023-02-21 12:12:31 +01:00
Sybren A. Stüvel
ce739b71c6 Website: set latest Flamenco version to 3.2 2023-02-21 12:10:01 +01:00
Sybren A. Stüvel
9e1948a1a0 Bump version to v3.2 2023-02-21 12:09:08 +01:00
Sybren A. Stüvel
4aef9e63d0 Mark v3.2 as released today 2023-02-21 11:35:55 +01:00
Sybren A. Stüvel
372bb66e09 Bump version to 3.2-rc1 2023-02-21 11:35:55 +01:00
Sybren A. Stüvel
49d8c4e6fd Add "rc" as possible release cycle value
"rc" stands for "release candidate", which will trigger the same versioning
display as an actual release (i.e. just report the version, without the
Git hash info).
2023-02-21 11:35:55 +01:00
Sybren A. Stüvel
daaadbf2fd Webapp: give the Flamenco logo a bit of a black outline
A black outline around the white shape makes it visible in light themed
browser windows.
2023-02-21 11:35:55 +01:00
Sybren A. Stüvel
46c46455f0 Bump golang.org/x/image and golang.org/x/net for security fixes
Fix these vulnerabilities:

```
Vulnerability #1: GO-2023-1572
  An attacker can craft a malformed TIFF image which will consume
  a significant amount of memory when passed to DecodeConfig. This
  could lead to a denial of service.

  More info: https://pkg.go.dev/vuln/GO-2023-1572

  Module: golang.org/x/image
    Found in: golang.org/x/image@v0.0.0-20191009234506-e7c1f5e7dbb8
    Fixed in: golang.org/x/image@v0.5.0

Vulnerability #2: GO-2023-1571
  A maliciously crafted HTTP/2 stream could cause excessive CPU
  consumption in the HPACK decoder, sufficient to cause a denial
  of service from a small number of small requests.

  More info: https://pkg.go.dev/vuln/GO-2023-1571

  Module: golang.org/x/net
    Found in: golang.org/x/net@v0.5.0
    Fixed in: golang.org/x/net@v0.7.0
```
2023-02-21 11:18:33 +01:00
Sybren A. Stüvel
72a78cd929 Webapp: remove some console.log calls
No functional changes, except for a slightly less noisy JS debug console.
2023-02-21 11:10:20 +01:00
Sybren A. Stüvel
1add6bfc8a Webapp: avoid browser JS errors about forbidden 'User-Agent' header
Brave (and maybe other browseres) refuse to set the 'User-Agent' header
in XMLHTTPRequests, and are vocal about this in the debug log. Since the
OpenAPI code generator always outputs a custom 'User-Agent' header, I've
added some JS code to strip that off when constructing an API client.
2023-02-21 11:08:48 +01:00
Sybren A. Stüvel
a5cfa9959b Webapp: cleanup, braces around conditional return statement
No functional changes.
2023-02-21 10:39:13 +01:00
Sybren A. Stüvel
b22ea953d5 Webapp: catch error when job cannot be found
Fetching a non-existent job can happen due to the asynchronous nature
of the webapp, when a job was just deleted. It now no longer complains
about this in the JS debug console.
2023-02-21 10:38:58 +01:00
Sybren A. Stüvel
12f4d9b5ce Tabulator: avoid setting height if already at the correct height
Setting the height of a Tabulator can trigger all kinds of things,
including some buggy behaviour where all the jobs would disappear from
screen. Just don't do it unless it's necessary.
2023-02-21 10:38:07 +01:00
Sybren A. Stüvel
e6ff81fc3d Mark more files as generated code
Add `addon/flamenco/manager_README.md` to the list of generated files.
2023-02-20 11:52:35 +01:00
Sybren A. Stüvel
d8ace7b7ff Website: document Go 1.20 is needed 2023-02-20 11:52:35 +01:00
Nitin-Rawat-1
4efed64a77 Fix error submitting job when not using Shaman
Fix #104183: Error submitting job to flamenco manager.

The bug happened when a user, using filesystem as storage solution,
would try to submit the job to the flamenco manager. The user would be shown
an Error -> Error packing with BAT: 'Packer' object has no attribute 'actual_checkout_path'.

The fix was to account for multiple implementations of the Packer object.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104184
2023-02-17 11:06:07 +01:00
Sybren A. Stüvel
eca498c98a go.mod: declare Go 1.20 as minimum requirement
Also run `go mod tidy` for good measure.
2023-02-09 15:41:29 +01:00
Sybren A. Stüvel
e855d59c68 Website: update Git URLs to projects.blender.org 2023-02-09 15:23:53 +01:00
Sybren A. Stüvel
22f56890c1 Small fix for sleep schedule of soft-deleted workers
There were `ErrWorkerNotFound` errors in different packages, which got
mixed up. Now there's only one.
2023-02-09 11:46:29 +01:00
Sybren A. Stüvel
2aa2f5f75b Upgrade Echo from v4.6.1 to 4.9.1 to address security issue
Upgrade Echo from v4.6.1 to 4.9.1. The security issue was fixed in 4.9.0,
so this upgrade picks the latest 4.9.x to upgrade to.

For more info on the security issue, see
https://pkg.go.dev/vuln/GO-2022-1031
2023-02-09 11:30:06 +01:00
Sybren A. Stüvel
adfc2652b5 Add internal/tools/tools.go to mock-import code generator packages
`internal/tools/tools.go` is a bit of a hacky workaround a limitation of
`go mod tidy`. It will never be built, but `go mod tidy` will see the
packages imported here as dependencies of the Flamenco project, and not
remove them from `go.mod`.

This is meant for build-time requirements that are otherwise never
imported as Go libraries, like our OpenAPI code generator.
2023-02-09 11:25:47 +01:00
Sybren A. Stüvel
426b2aab4d Gracefully handle sleep schedules of deleted workers
Workers can be soft-deleted, which means that they stay in the database.
As such, foreign key constraints `ON DELETE CASCADE` do not trigger, and
thus their sleep schedule can still be active. This is now detected and
handled gracefully.
2023-02-09 11:18:38 +01:00
Sybren A. Stüvel
55bfc8db88 Website: update URLs to point to projects.blender.org 2023-02-07 17:41:26 +01:00
Sybren A. Stüvel
ff41db802f Slight tweak to the bug template 2023-02-07 17:41:12 +01:00
Sybren A. Stüvel
4a2d1d47a6 Simple Gitea issue templates
Just to get something better than a blank form.
2023-02-07 17:35:16 +01:00
Sybren A. Stüvel
6b60a5e828 Web app: upgrade Tabulator 5.1.8 → 5.4.3
Upgrade Tabulator, hopefully this fixes some issues where the job list
would show black (no items shown, but the scrollbar is still there as if
all the items still exist; scrolling up & down would fix it).
2023-02-07 16:41:00 +01:00