Sybren A. Stüvel
a7654394b4
Worker: update default task types to match what's currently in use
...
Flamenco v2 had a different classification of task types than Flamenco v3,
and the defaults still referenced the v2 classifications.
2022-03-03 11:51:53 +01:00
Sybren A. Stüvel
2610836861
Makefile: don't generate code when running make
...
Generated code is to be committed to Git anyway, so there is no need to
regenerate it on every build.
The code can be regenerated explicitly by running `make generate`.
2022-03-03 11:51:15 +01:00
Sybren A. Stüvel
efbbb8c7d8
Makefile: remove some unused parts
...
Some parts were still leftovers from other projects this Makefile was
copied from.
2022-03-03 11:50:03 +01:00
Sybren A. Stüvel
42daa87839
Makefile: convert generated files to native line-ends on Windows
...
Git wants to see native line-ends in source files, but the code generators
we use always write UNIX line-ends. `make generate` on Windows now passes
generated files through `unix2dos`. This allows regenerating files without
Git listing them as modified.
2022-03-03 11:49:26 +01:00
Sybren A. Stüvel
eaeea38e3f
Worker: remove -manager URL
CLI argument
...
This CLI arg isn't actually used by the subsequent code, so better to not
have it for now.
2022-03-03 11:33:22 +01:00
Sybren A. Stüvel
20fd3228ba
Worker: better logging configuration
...
Always show startup notification at INFO level, regardless of configured
level. Replace `-verbose` with `-quiet`, add `-trace`.
2022-03-03 11:32:57 +01:00
Sybren A. Stüvel
954babd914
Manager: redirect web root to Swagger UI
...
Temporarily redirect the index page to the Swagger UI, so that at least
you can see something other than a "404 Not Found" error.
2022-03-01 20:49:11 +01:00
Sybren A. Stüvel
ddd0c7602b
Change application name to "Flamenco 3"
...
"Flamenco NG PoC" was the name of the proof of concept, and it's no longer
in use.
2022-03-01 20:45:13 +01:00
Sybren A. Stüvel
47e36c927c
Change package URL to the blender.org repository
2022-03-01 20:45:09 +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
60d1710020
Addon: job type form seems to be working
2022-03-01 17:28:24 +01:00
Sybren A. Stüvel
5e7e2adef0
Addon: Fixed mypy errors
2022-03-01 17:28:24 +01:00
Sybren A. Stüvel
616784df0a
Addon: start of framework for API communication
2022-03-01 17:28:24 +01:00
Sybren A. Stüvel
b678b90932
Proof of concept to test a generated Python OpenAPI client
2022-03-01 17:28:24 +01:00
Sybren A. Stüvel
bbc6a3f69e
Tweak some logging
2022-03-01 17:28:24 +01:00
Sybren A. Stüvel
0235ffcb4a
Manager: avoid "no record found" error in task scheduler
...
It's fine when there is no task for a worker, so having Gorm log an error
was just causing noise.
2022-03-01 11:52:28 +01:00
Sybren A. Stüvel
648a220098
Update FEATURES.md
2022-02-28 15:30:50 +01:00
Sybren A. Stüvel
6067a0ffb0
Remove 'make static' target
...
Having `CGO_ENABLED=0` already produces a static binary.
2022-02-28 13:02:43 +01:00
Sybren A. Stüvel
ba5585461b
Cleanup: fix 'vet' warning from socketio-poc
2022-02-28 13:01:52 +01:00
Sybren A. Stüvel
194422d9fa
Remove -poc
suffix from Manager and Worker
...
The code is mature enough to no longer be a proof-of-concept.
2022-02-28 13:01:13 +01:00
Sybren A. Stüvel
4627169106
Remove unused Makefile targets
...
The Makefile started as a standard file I use for multiple Go projects,
but it was aimed at having only one executable to build. I've removed
everything that assumes a single executable, and kept the parts that are
actually used now.
2022-02-28 12:59:30 +01:00
Sybren A. Stüvel
7e5a631f33
Cleanup: refactor updateJobAfterTaskStatusChange()
...
Break up a complex function into smaller functions.
2022-02-28 12:50:34 +01:00
Sybren A. Stüvel
41168ff68b
Update FEATURES.md
2022-02-28 12:09:07 +01:00
Sybren A. Stüvel
fab988295d
Manager: remove task scheduler SQL debug logs
2022-02-28 12:07:23 +01:00
Sybren A. Stüvel
b5b7b228ed
Worker: capture panics in 'active' state and cleanly sign off before dying
2022-02-28 12:07:10 +01:00
Sybren A. Stüvel
7689a988b1
Manager: re-queue tasks of worker when signing off
2022-02-28 12:06:50 +01:00
Sybren A. Stüvel
32af1ffaef
Manager: actually pass context to Gorm queries
2022-02-28 11:53:31 +01:00
Sybren A. Stüvel
3d854078ba
Manager: integrate task state machine into API implementation
2022-02-25 16:30:27 +01:00
Sybren A. Stüvel
17e622ebc3
Some build & filename tweaks to allow building from scratch again
...
The build chain got a bit confused when doing things from scratch, as
`test_support.go` was used in the non-test builds. Renaming it to
`support_test.go` was the easiest way to avoid that.
2022-02-25 16:17:49 +01:00
Sybren A. Stüvel
9a5bbb4131
Manager: implement persistence layer interface for task status machine
...
Implement the functions used by the task status machine in the DB
persistence layer.
2022-02-25 14:34:29 +01:00
Sybren A. Stüvel
7279f2e35f
Manager: task state machine, handle job status -> task status changes
...
Direct copy of the Flamenco Server Python code, for handling the change
of a job's status to trigger status changes on its tasks.
Not yet connected to the rest of the Manager logic.
2022-02-25 12:30:40 +01:00
Sybren A. Stüvel
e8707171b4
Manager: add test for saving task status change with error on job save
2022-02-25 11:07:06 +01:00
Sybren A. Stüvel
d2f1cf3614
Cleanup: move test helper functions down in the file
...
This way it starts with the actual tests.
2022-02-25 11:02:47 +01:00
Sybren A. Stüvel
a3a0d97222
Manager: more task state change tests
2022-02-24 17:58:02 +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
64db518f15
Cleanup: remove unused code
2022-02-24 12:36:29 +01:00
Sybren A. Stüvel
7420177209
Manager: use api.JobStatus in persistence layer as well
2022-02-24 11:54:35 +01:00
Sybren A. Stüvel
7e776167bb
Manager: use api.TaskStatus in persistence layer as well
2022-02-24 11:53:05 +01:00
Sybren A. Stüvel
4cd10e57b2
Run all Go commands with CGO_ENABLED=0
...
This ensures that nothing will require a C compiler.
2022-02-24 11:37:02 +01:00
Sybren A. Stüvel
f0aea6646f
Run go generate
in the right order
...
The `pkg/api` code needs to be generated before the interface mocks that
use it.
2022-02-24 11:35:54 +01:00
Sybren A. Stüvel
2a1f5a0df4
Worker: buffer task updates when Manager offline
...
Queue task updates in an SQLite database when the Manager is
unreachable, periodically checking whether they can be flushed.
2022-02-22 19:05:33 +01:00
Sybren A. Stüvel
e948c5d936
Worker: avoid prematurely exiting 'awake' state
2022-02-22 19:01:01 +01:00
Sybren A. Stüvel
5c3a5124f3
Cleanup: add missing comment
2022-02-22 19:00:44 +01:00
Sybren A. Stüvel
b462e8db1a
Worker: wrap api.ClientWithResponsesInterface in a local interface
...
This makes it possible to locally create a mock object for the API client.
2022-02-22 17:13:04 +01:00
Sybren A. Stüvel
19b86172b4
Ignore blend file backups
2022-02-22 16:02:30 +01:00
Sybren A. Stüvel
a650aa4cbd
Worker: Blender command, don't put current time in log lines
...
The time has to be put in at a different abstraction level.
2022-02-22 15:36:20 +01:00
Sybren A. Stüvel
adf7113b34
Worker: log chunker, also flush log after certain time
...
This flushes the log when the previous `Append()` call was too long ago.
Note that this doesn't flush after X seconds of silence; a call to
`Append()` or `Flush()` still has to happen in order to do the flushing.
2022-02-22 15:34:37 +01:00
Sybren A. Stüvel
45a95ca4c2
Worker: use time service to log current time
2022-02-22 15:33:30 +01:00
Sybren A. Stüvel
66186e460e
Worker: upload logs in chunks to Manager
2022-02-22 15:17:35 +01:00
Sybren A. Stüvel
9a5047a94d
Worker: move command_exe.go interface definitions
2022-02-22 14:42:57 +01:00