Commit Graph

272 Commits

Author SHA1 Message Date
c8ae856131 Features: add reminder to hide custom RNA options 2022-03-14 14:40:27 +01:00
76ba0a201b OAPI: remove Configuration component schema
Nothing was using the `Configuration` schema, so I removed it from the
flamenco-manager.yaml OpenAPI definition file.
2022-03-14 14:40:16 +01:00
ad3750dfbe Addon: cleanup, split propgroup generator from job type code 2022-03-14 14:39:10 +01:00
2e78e00a0b Manager: don't log an error when the config file doesn't exist
The configuration file is expected to not exist on many systems, and
thus logging an error (even when it's a very innocent one) will cause
confusion.
2022-03-14 13:00:27 +01:00
c3cd119e21 Addon: start of generating OAPI SubmittedJob object
Work in progress.
2022-03-11 17:30:27 +01:00
a803edcce4 Addon: bundle BAT and start of interfacing with it
The add-on can now create BAT packs, but still only at a hard-coded path.
2022-03-11 17:30:27 +01:00
d18f5d25c5 Addon: store current job type on the Scene, not the WindowManager
The job type (+ its configuration) is something scene/file dependent, and
should thus be stored there.
2022-03-11 17:30:27 +01:00
7181c2c4cf OAPI: allow job settings to have a tooltip/description 2022-03-11 17:30:27 +01:00
6d00d9cb34 Manager: sort job types to ensure a consistent order 2022-03-11 17:30:27 +01:00
4f7c11d59a Addon: cleanup, use relative imports where possible 2022-03-11 17:30:27 +01:00
21d552c600 Addon: add explanation of weird type-checking code 2022-03-11 16:51:19 +01:00
91f2fb2067 Addon: describe code generation process
The code generation has been integrated with the Makefile, so that's now
described properly.
2022-03-11 11:34:18 +01:00
55752c87a2 Addon: fix wheel loading module separation
The loading of modules from wheels wasn't properly separated from the rest
of Python yet. Now `load_wheel()` properly cleans up after itself, making
it impossible for other code to do `import the_module_from_the_wheel`.
2022-03-11 11:33:48 +01:00
5be9985e3b Addon: fix Mypy errors 2022-03-11 11:18:21 +01:00
afc6b8e1c5 Worker: add -find-manager CLI arg
With `-find-manager` the Worker will use UPnP/SSDP autodiscovery, report
which Manager it found, and quit.
2022-03-11 10:52:03 +01:00
b33db33d17 Manager: show error when there was an error loading configuration 2022-03-11 10:51:32 +01:00
850678f495 Addon: allow configuring the Manager URL
Previously it was hard-coded to `http://localhost:8080/`, now that's just
the default value.
2022-03-10 17:57:26 +01:00
81daa4c249 OAPI: regenerate Python code
This commit also switches to a hardcoded version ("3.0") to the version
from Git (like the Go executables use). Because there are no tags for
this branch yet, this is just the Git commit hash.
2022-03-10 15:49:21 +01:00
51b23a38b3 OAPI: integrate Python code generator in Makefile
Instead of having the Python code generator as a separate shell script,
include it in the Makefile. There are now three make targets:

- generate-go: only generate Go code, for the Worker & Manager
- generate-py: only generate Python code, for the Blender add-on
- generate: run both
2022-03-10 15:48:20 +01:00
282f91243b OAPI: replace placeholder description of 'jobs' tag 2022-03-10 15:45:56 +01:00
416fa9bd28 OAPI: add 'meta' tag for /api/version endpoint 2022-03-10 15:45:46 +01:00
78927c2c31 OAPI: put quotes around description with comma
The comma was interpreted as property separator, and not as part of the
'description' property value.
2022-03-10 15:41:48 +01:00
341ce51555 Addon: Remove unused generated test files 2022-03-10 15:02:07 +01:00
a2c2f0ccc0 Add idea to FEATURES.md 2022-03-09 23:26:06 +01:00
fe91d5e59e Remove UPnP/SSDP proof of concept code
The code is no longer necessary.
2022-03-08 17:26:39 +01:00
842255a065 UPnP/SSDP: actually serve a description.xml
The `description.xml` file is part of the UPnP Service Discovery protocol,
see https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rxad/9225d145-6b2c-40d5-8ee8-7d837379fc25
2022-03-08 17:25:49 +01:00
353da58ee9 UPnP/SSDP: reduce log level for unreachable URLs 2022-03-08 16:46:14 +01:00
ca2bf7ff25 UPnP/SSDP: respond with multiple service descriptors
Instead of violating the standard and putting multiple locations in one
SSDP response, just send a single response for each possible location.
2022-03-08 16:46:03 +01:00
a19aa86c4e FEATURES.md: mark UPnP/SSDP as 'done' 2022-03-08 15:04:03 +01:00
a61e3ca6f7 Worker tests: use in-memory SQLite database 2022-03-08 15:03:03 +01:00
34138e1b46 Cleanup: run go mod tidy 2022-03-08 15:02:05 +01:00
fabb79e583 Worker: move autodiscovery code into the 'worker' package
Move the UPnP/SSDP Manager autodiscovery code into from `main.go` into the
`worker` package. This also means changing the error handling a bit, as
only the `main.go` file is allowed to do `log.Fatal()`.
2022-03-08 14:41:30 +01:00
8e05024267 UPnP/SSDP: Worker, ping Manager URLs in parallel
Ping all Manager URLs at once, and wait until they've all responded (or
caused an error), instead of pinging them one by one sequentially.
2022-03-08 14:25:44 +01:00
9761786982 UPnP/SSDP: better logging when recovering from panic 2022-03-08 14:08:01 +01:00
eec4895c73 UPnP/SSDP client: avoid duplicate URLs 2022-03-08 14:06:35 +01:00
ae892ff712 Worker: test all discovered Manager URLs
Ping each discovered Manager URL to see whether it is reachable or not.
If there are multiple usable URLs, it'll just pick the first.
2022-03-08 13:56:45 +01:00
d6a60c73d0 UPnP/SSDP Server: allow advertising slice of URLs
This makes it possible for the Manager to expose multiple URLs. This way
the Worker can try them out and see which ones work.
2022-03-08 13:56:45 +01:00
13a74e61d4 UPnP/SSDP client: allow clean shutdowns
The SSDP library will log a warning on shutdown, as it doesn't expect the
UDP socket to be closed. Copy the hack on the Server implementation, which
avoids this warning getting logged, to the Client.
2022-03-08 13:56:45 +01:00
d0b677ffe3 Add API endpoint /api/version to get the Flamenco Manager version
This will be used in the auto-discovery, to check that a discovered URL can
actually be reached & points to a Flamenco Manager.
2022-03-08 13:56:43 +01:00
42407865eb Worker: change how configuration & credentials are loaded/saved
The Worker config/credential management was a bit of a mess. It's now
better structured, and also allows runtime overrides of the Manager URL,
without writing that override to the config file.
2022-03-08 13:51:03 +01:00
c0cd3ca5ad UPnP/SSDP: Cleaner, easier to test (and actually tested) code
Convert "get own URLs" code into nicer chunks, and test those.

This minimises the code that actually depends on the available network
interfaces, and increases test coverage. Found a few bugs too.
2022-03-08 12:11:47 +01:00
bb91c2e6d6 UPnP/SSDP: prefer link-local addresses if available 2022-03-08 11:03:48 +01:00
fca628b325 Merge remote-tracking branch 'origin/main' into upnp-ssdp 2022-03-07 15:27:12 +01:00
9f5e4cc0cc License: license all code under "GPL-3.0-or-later"
The add-on code was copy-pasted from other addons and used the GPL v2
license, whereas by accident the LICENSE text file had the GNU "Affero" GPL
license v3 (instead of regular GPL v3).

This is now all streamlined, and all code is licensed as "GPL v3 or later".

Furthermore, the code comments just show a SPDX License Identifier
instead of an entire license block.
2022-03-07 15:26:46 +01:00
43a9e1d439 Add some nice-to-have new features to FEATURES.md 2022-03-07 11:21:31 +01:00
4062f024b7 Cleanup: move code to a nicer place 2022-03-04 17:46:44 +01:00
d153db4280 Work in progress on using UPnP/SSDP to make the Worker find its Manager
Due to the way SSDP works, Flamenco Manager needs to know its own URL,
where the Workers can reach it. These URLs are now found, and since there
can be multiple (like IPv6 + IPv4) they are all sent in a SSDP
notification as ;-separated strings.
2022-03-04 17:44:04 +01:00
656a495652 Manager: clean shutdown on Ctrl+C 2022-03-04 14:34:40 +01:00
1e784452f3 README: no longer a "proof of concept" 2022-03-04 13:24:57 +01:00
183bb23d2a Tests: sleep test using bigger time steps
Since every mocked clock time step also waits for 1ms to give other
goroutines a chance to run, it took too much wallclock time to mock-sleep
for 47 seconds with 100ms increments.

Stepping the mocked clock with 1s increments makes the test 10x faster.
2022-03-04 12:35:01 +01:00