Sybren A. Stüvel
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
Sybren A. Stüvel
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
Sybren A. Stüvel
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
Sybren A. Stüvel
cd2fe8170e
Errors: remove "error" prefix from message
...
Instead of returning an error "error doing X", just return "doing X". The
fact that it's returned as an error object says enough about that it's
an error.
This also makes it easier to chain error messages, without seeing the
word "error" in every part of the chain.
2022-03-04 11:30:31 +01:00
Sybren A. Stüvel
3c6d7773ef
Crosspath: add ToNative() function
...
Add `crosspath.ToNative(path)`, which returns the path with platform-
native path separators. This is meant for use in the Worker, to convert
paths before attempting to use them.
2022-03-04 11:10:10 +01:00
Sybren A. Stüvel
70f8140df5
Crosspath: extend tests with "long UNC" paths
...
See https://en.wikipedia.org/wiki/Path_(computing)#Universal_Naming_Convention
2022-03-04 11:09:14 +01:00
Sybren A. Stüvel
0a97d04741
Cleanup: rewrite crosspath.Stem unit test
...
Use the same style of testing as the other test functions in the file.
No functional changes.
2022-03-04 10:27:31 +01:00
Sybren A. Stüvel
c91e7b1cac
Manager: solve failing unittests by implementing some filepath functions
...
Both Go's standard `path` and `path/filepath` packages are too limiting to
work well for Flamenco. The former assumes Linux/POSIX paths, the latter
only works with platform-native paths. Neither can work with Windows paths
on Linux, or Linux paths on Windows.
2022-03-03 15:22:43 +01:00
Sybren A. Stüvel
9b9c6bffff
Replace self-hacked SQLite Gorm driver with 3rd party one
...
The new Gorm driver is made by the creators of the pure-Go SQLite library
we were already using.
2022-03-03 13:48:14 +01:00
Sybren A. Stüvel
bf4cc9b056
Add notice to our SQLite Gorm driver
...
The Gorm driver README now links to the original code, which was modified
to use a different SQLite library.
2022-03-03 11:52:43 +01:00
Sybren A. Stüvel
e70a44a146
Manager: switch from PostgreSQL to SQLite
...
This includes a modified copy of the Gorm SQLite backend, adjusted to use
https://modernc.org/sqlite instead.
2022-03-01 18:50:31 +01:00
Sybren A. Stüvel
df77d09aa6
Start of a task/job state machine
...
The task status change → job status change code is a direct port of the
Flamenco Server v2 code written in Python.
There is no job status change → task status changes logic yet, and the
tests are also far from complete.
2022-02-24 16:42:38 +01:00
Sybren A. Stüvel
ef2bbd2845
Unified Command field names
...
Some parts of Flamenco had a Command consist of "name + settings", and
other parts used "type + parameters" (with the same semantics). This is
now unified to "name + parameters".
2022-02-21 18:03:51 +01:00
Sybren A. Stüvel
270c54fdb7
More status change acks & checks to get stable flow between worker states
2022-02-15 17:46:37 +01:00
Sybren A. Stüvel
50088b4c94
Save worker info on sign-on (not just on registration)
2022-02-15 10:57:29 +01:00
Sybren A. Stüvel
7586be010b
API changes for sending task updates to the Manager
2022-02-14 18:01:32 +01:00
Sybren A. Stüvel
97ab93d996
Initial task scheduler implementation
2022-02-01 17:17:19 +01:00
Sybren A. Stüvel
7c14b2648d
Much more of the Worker life cycle implemented
2022-01-31 15:02:05 +01:00
Sybren A. Stüvel
c501899185
Ported lots of stuff from gitlab.com/dr.sybren/flamenco-worker-go
...
Much isn't working though.
2022-01-28 17:02:50 +01:00
Sybren A. Stüvel
28a56f3d91
Store workers in database when registering
2022-01-28 15:31:39 +01:00
Sybren A. Stüvel
0629728ce9
Add frame chunker and make unit test for simple blender render succeed
2022-01-13 16:32:08 +01:00
Sybren A. Stüvel
6aed4e71ff
Check for valid UUIDs; probably a good idea to write some validator for this
2022-01-11 18:45:09 +01:00
Sybren A. Stüvel
5af238eb21
Explicitly mention certain string fields are UUIDs
2022-01-11 18:39:53 +01:00
Sybren A. Stüvel
54933d0262
API: add Fetch Job endpoint
...
This is made with plain sqlite. It's probably a good idea to move to
something like GORM instead.
2022-01-11 18:38:14 +01:00
Sybren A. Stüvel
f0ae7d33e9
Connect API, job compiler, and persistence layer
2022-01-11 18:07:34 +01:00
Sybren A. Stüvel
e971c4aaed
Expand job settings definitions
...
Add `subtype` and `editable` fields:
- `subtype`: to distinguish between regular strings, file paths, dir paths,
etc.
- `editable`: To indicate a setting should be editale after submitting the
job. Editing will trigger re-compilation of the job.
2022-01-11 14:35:57 +01:00
Sybren A. Stüvel
d0fafb5063
Make the GET /api/jobs/types
endpoint work
2022-01-10 17:45:20 +01:00
Sybren A. Stüvel
b605330c57
API for getting supported job types from the Manager
...
Not yet hooked up to the job compiler, only reports one hard-coded job
type.
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
7728c072ae
Add copyright notices
...
No functional changes.
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
847fc918db
Rename flamenco.go to generate.go
...
The only thing the file is for is to ensure `go generate` runs
`oapi-codegen`.
No functional changes.
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
d6638ce114
Track generated files with Git
...
The OpenAPI-generated files can be used by 3rd parties as well. This
makes them available at `gitlab.com/blender/flamenco-goja-test/pkg/api`.
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
3d2263c177
API: group worker-related endpoints
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
f43673aaa7
Move the API implementation to the internal package
...
The server implementation is private, not something that's suitable for
reuse.
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
082e2e69d6
Add authentication to worker
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
ad75b5c705
Cleanup: Move some files around
...
No functional changes
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
3e771cb7b7
Basic HTTP auth for workers implemented
...
Still a dummy, but at least it works with the OpenAPI 3
auth specification.
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
949ff08b0e
Switch from Gin to Echo framework
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
38a8943767
Add Flamenco Worker PoC
2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
af4304565a
Lots of changes to merge the Gin/OpenAPI PoC
2022-01-10 17:45:13 +01:00