Commit Graph

277 Commits

Author SHA1 Message Date
d170cda3ae OAPI: change task log fetching from providing the log to providing metadata
The task log API endpoint was loading the entire log into RAM, then sending
it as response. This makes display in a browser also a bit harder.

The API endpoint now returns some JSON with info about the task log,
including its size and which URL can be used to download it.

Manifest task: T99730
2022-07-16 12:52:23 +02:00
e2434b44f2 OAPI: regenerate code 2022-07-16 11:11:34 +02:00
7521bff1a7 OAPI: add operation to read the entire task log
Manifest task: T99730
2022-07-16 11:05:58 +02:00
f9a3d3864a OAPI: regenerate code 2022-07-14 17:26:26 +02:00
f2438a89a7 OAPI: operation to save config from First-Time Wizard 2022-07-14 17:25:37 +02:00
898019cf1d OAPI: regenerate code 2022-07-14 12:22:13 +02:00
186dd06401 OAPI: endpoints for finding & checking Blender executables
These will be used in the first-time wizard.
2022-07-14 12:19:59 +02:00
e4a38f071c OAPI: regenerate code 2022-07-14 11:16:59 +02:00
597e9fd5d4 OAPI: add operations for the First Time Wizard
Manifest task: T99437
2022-07-14 11:16:30 +02:00
ae2cb281b4 OAPI: regenerate code 2022-07-08 11:35:57 +02:00
f9acb3f413 OAPI: add operation for getting variables from the Manager
This operation takes the platform & audience, and returns the variables
that are applicable for that combination. This can then be used by the
web frontend or by the Blender add-on to do variable replacement.
2022-07-08 11:33:41 +02:00
4c8ab01dae OAPI: regenerate code 2022-07-04 12:49:26 +02:00
b34fee514a OAPI: include worker's "last seen" timestamp
Include the worker's "last seen" timestamp in the worker summary, details,
and SocketIO updates.

This is different from the "updated" timestamp, which indicates the last
time the worker entry in the database was updated (which could also be
in response to a status change request from the web interface).
2022-07-04 12:47:25 +02:00
5537f2c07c OAPI: regenerate code 2022-07-04 12:12:45 +02:00
9daecf2b45 OAPI: version all API URLs with /v3/
Change all API URL paths from `/api/…` to `/api/v3/…`. This ensures that
old Flamenco v2 clients/workers stop working when the new Manager is in
place. This also allows redirecting API calls based on the URL, also for
future upgrades.
2022-07-04 12:11:58 +02:00
30f7df5259 OAPI: change Shaman URL paths from /shaman/… to /api/shaman/…
This makes all OpenAPI URLs start with `/api/`.
2022-07-04 12:09:19 +02:00
801fa20f12 OAPI: regenerate code 2022-07-01 12:32:42 +02:00
60f3f5482d OAPI: add operation & SocketIO subscription for global last-rendered img
Add an operation to get the last-rendered image from whatever job received
such output from a Worker, and add a SocketIO subscription type to receive
updates about all jobs' last-rendered images.

These are necessary for a global last-rendered image display.
2022-07-01 12:31:18 +02:00
56463fa3ec OAPI: regenerate code 2022-06-30 19:19:38 +02:00
cca8155894 OAPI: add 204 as "nothing rendered" response to fetchJobLastRenderedInfo
Add a "204 No Content" response to the `fetchJobLastRenderedInfo` operation,
indicating that there is no rendered output yet.
2022-06-30 19:18:52 +02:00
123674cf57 OAPI: regenerate code 2022-06-30 18:33:36 +02:00
c9500b85c2 OAPI: add SocketIOLastRenderedUpdate for broadcasting last-rendered imgs
`SocketIOLastRenderedUpdate` objects are meant to be broadcast to SocketIO
clients (i.e. the web interface). They are sent to the job-specific room,
just like task updates.
2022-06-30 18:32:42 +02:00
668e25fe95 OAPI: regenerate code 2022-06-28 17:07:08 +02:00
5d30459359 OAPI: add endpoint to get URLs of last-rendered images of a job 2022-06-28 17:05:52 +02:00
fb89658530 Refactor: replace os.IsNotExist() with errors.Is(err, fs.ErrNotExist()
`os.IsNotExist()` is from before `errors.Is()` existed. The latter is the
recommended approach, as it also recognised wrapped errors.

No functional changes, except for recognising more cases of "does not
exist" errors as such.
2022-06-28 10:24:46 +02:00
1353d1df0f OAPI: regenerate code 2022-06-27 11:32:12 +02:00
a084f6e2a4 OAPI: add operations for fetching blocklist & removing individual items 2022-06-27 11:30:37 +02:00
3d20a89bf5 Add last-in-one-out queue
Add an abstract queue that outputs only the last-queued item.
Items that were queued before the last one will be dropped.

This will be used for handling the last-rendered images. Any images
that are rendered while an image is already uploading should be ignored,
except the last one.
2022-06-27 11:30:37 +02:00
167b2eaf45 OAPI: regenerate code 2022-06-24 16:39:50 +02:00
4e9950a143 OAPI: add endpoint for sending Last Rendered Output to Manager 2022-06-24 16:38:49 +02:00
fd730351b5 Crosspath: add IsRoot(path) bool function
Add a function that can determine whether the given path is considered
a "root path". Considers `/`, `X:`, `X:\` and `X:/` root paths, where `X`
is any upper or lower case Latin letters.
2022-06-23 16:40:46 +02:00
7f14dac62f OAPI: regenerate code 2022-06-17 11:37:54 +02:00
aaed1e0589 OAPI: include task failure list in Task schema
Include the list of workers who failed this task in the `Task` schema.
2022-06-17 11:37:28 +02:00
61aad21e99 OAPI: regenerate code 2022-06-16 11:02:04 +02:00
55676b000e OAPI: change worker 'nickname' to just 'name'
There was no need to have the extra four letters 'nick', and some parts
of the code were already using just 'name' for the workers. This simplifies
and unifies things.
2022-06-16 11:01:27 +02:00
1c9846bb8f OAPI: regenerate code 2022-06-09 11:59:32 +02:00
f020582bf7 OpenAPI: include last_touched in Task schema
Include the timestamp of when a Worker last touched the task in the OpenAPI
`Task` schema.
2022-06-09 11:59:01 +02:00
cf8b4e18b1 OAPI: regenerate code 2022-06-02 16:25:38 +02:00
31e128d7f5 OAPI: remove shutdown worker state
Remove the `shutdown` worker state. It was only used in Flamenco 2 to
signal to the worker that it should go offline. In other words, it didn't
use the target state in the request.

As of this change, just send `offline` as the requested state for the
worker if you want it to go offline.
2022-06-02 16:19:26 +02:00
9ca14cd471 OAPI: regenerate code 2022-06-02 12:16:51 +02:00
0d50a7eae5 OAPI: clean, remove unnecessary quotes 2022-06-02 12:16:14 +02:00
169aa3ddc3 OAPI: extract worker status request fields into their own struct
Instead of always passing `status_requested` and `lazy_status_request`
in tandem, and requiring one when the other is present, they are now
always passed as a struct `WorkerStatusChangeRequest`. This struct has
both fields required.

`WorkerStatusChangeRequest` already existed, and is now altered by changing
its field `status_requested` to simply `status` -- the fact that it's
requested is already clear from the context.
2022-06-02 12:16:03 +02:00
fdb0b82664 OAPI: regenerate code 2022-05-31 17:19:06 +02:00
cfb17b178d OAPI: allow worker status change requests
This also introduces the 'lazy' status change boolean, which indicates
whether the status change should interrupt the worker's current task
(lazy=false), or only take effect after the task is finished (lazy=true).
2022-05-31 17:17:37 +02:00
90707dceed OAPI: regenerate code 2022-05-31 15:30:26 +02:00
d82333635a OAPI: define Worker schema as extension of WorkerSummary
This makes their relation clearer. This also moves the `version` field
into the `WorkerSummary` schema.
2022-05-31 15:29:54 +02:00
1f49880b7f OAPI: regenerate code 2022-05-31 15:18:48 +02:00
3b2f58dd27 OAPI: add allWorkers SocketIO subscription type 2022-05-31 15:17:39 +02:00
0fc0d1d0e0 OAPI: regenerate code 2022-05-31 14:58:49 +02:00
221ed17fa2 OAPI: Allow explicit SocketIO subscription to "all jobs"
When the web interface is showing the Workers list, it should no longer
get updates about jobs. A new subscription type `allJobs` is added, and
the `uuid` field of the subscription is no longer mandatory.
2022-05-31 14:58:09 +02:00
885911a06e OAPI: regenerate code 2022-05-31 13:16:10 +02:00
8607827cfa OAPI: add SocketIOWorkerUpdate schema 2022-05-31 13:15:28 +02:00
f2f6726ec0 OAPI: regenerate code 2022-05-31 11:21:41 +02:00
ccea8869c2 OAPI: add operation for fetching worker info 2022-05-31 11:21:05 +02:00
431406a301 OAPI: regenerate code 2022-05-31 10:43:57 +02:00
4f8fd14d7f OAPI: remove last_activity field from RegisteredWorker
A task's "activity" field is a string that describes the last-performed
operation on the task. In Flamenco 2, a Worker's "last activity" is the
timestamp at which it was last seen. Using the same term for different
things is confusing, and thus gets removed until the Worker's "last seen"
functionality is reimplemented.
2022-05-31 10:36:47 +02:00
a3d885e710 OAPI: regenerate code 2022-05-30 19:23:00 +02:00
3ae9d5f0fe OAPI: add 204 No Content response to task log tail operation 2022-05-30 19:21:22 +02:00
eab4fa2ca7 OAPI: regenerate code 2022-05-30 18:52:00 +02:00
311887bff7 OAPI: add operation to fetch all workers
This introduces a new tag `worker-mgt` for worker management operations.
These are used by the web interface to display & manage workers.
2022-05-30 18:45:22 +02:00
2cf6e2e528 OAPI: regenerate code 2022-05-20 16:49:48 +02:00
2003db7a26 OAPI: return log tail as string, not array of strings
The JavaScript client cannot handle a plain array of strings.
2022-05-20 16:48:55 +02:00
bb7ac8319f OAPI: regenerate code 2022-05-20 16:30:42 +02:00
fc74195704 OAPI: add operation to fetch the tail end of a task log 2022-05-20 16:29:43 +02:00
1bb4ada72b OAPI: regenerate code 2022-05-20 12:58:57 +02:00
a32261e196 OAPI: add task log update schema
Add `SocketIOTaskLogUpdate` schema and add `tasklog` as value for
`SocketIOSubscriptionType`.
2022-05-20 12:58:16 +02:00
a74ad07642 OAPI: Regenerate code 2022-05-20 10:49:25 +02:00
b535dfed3c OAPI: expand the description of the TaskUpdate schema
No functional changes.
2022-05-20 10:44:27 +02:00
ce43eead9a OAPI: regenerate code 2022-05-19 17:24:59 +02:00
507985e258 OAPI: rename job status requeued to requeueing
Rename job status `requeued` to `requeueing`, because it indicates a
process that's (if things are working well) happening currently.
2022-05-19 17:22:35 +02:00
1086fcbc28 OAPI: Regenerate code 2022-05-19 16:04:10 +02:00
476f584192 OAPI: job settings, allow more granular control over setting visibility
Instead of having a per-setting boolean to control whether it's visible
or hidden, there are now four values:

- `visible`: always show.
- `submission`: only show in the UI of a job submitter (like a Blender
  add-on).
- `web`: only show in the web interface for management, but not when
  submitting the job.
- `hidden`: never show; only available to the job compiler script as
  internal setting.
2022-05-19 16:01:53 +02:00
744fabea78 OAPI: rename pkg/api/flamenco-manager.yaml to flamenco-openapi.yaml
Rename `pkg/api/flamenco-manager.yaml` to `flamenco-openapi.yaml`, to
distinguish the OpenAPI definition file from the Flamenco Manager
configuration file of the same name (but in a different directory).

No functional changes.
2022-05-19 15:22:37 +02:00
b928896066 OAPI: regenerate code 2022-05-19 15:17:19 +02:00
7753e65b03 OAPI: rename the JobUpdate schema to SocketIOJobUpdate
Rename `JobUpdate` to `SocketIOJobUpdate` to make it consistent with
`SocketIOTaskUpdate`.

Note that `TaskUpdate` exists as another schema, used by Workers to
update tasks they're performing.
2022-05-19 15:16:27 +02:00
12d5b2a1fc OAPI: regenerate code 2022-05-19 14:11:33 +02:00
6afb1151cc OAPI: add task activity to SocketIO task updates 2022-05-19 14:07:42 +02:00
cd8080fb44 OAPI: regenerate code 2022-05-17 14:48:25 +02:00
9d9ff77ee0 OAPI: add mass-task-refresh option to SocketIO job updates
Add `JobUpdate.refresh_tasks` property, to signal to SocketIO clients that
the job update is so big, all the job's tasks should be refreshed.

This is much faster than sending individual task updates one by one.
2022-05-17 14:47:33 +02:00
fd16f7939e OAPI: regenerate code 2022-05-12 15:06:05 +02:00
52e9db6ef4 OAPI: add may-worker-run endpoint
Add an endpoint for Workers to poll while they're running a task, to see
if they're allowed to keep running it.
2022-05-12 15:05:59 +02:00
24755e32b6 OAPI: regenerate code 2022-05-06 15:10:31 +02:00
c847929469 OAPI: remove job statuses fail-requested and waiting-for-files
These statuses are no longer needed, as they are a relic from Flamenco 2.
2022-05-06 15:09:01 +02:00
1fc71ccf92 Manager: reduce log level 2022-05-06 14:35:27 +02:00
23680c27bf OAPI: regenerate code 2022-05-05 16:36:38 +02:00
b838b10ead OAPI: remove task status "cancel-requested"
This task status was a remainder of the old Flamenco 2 structure, and is
no longer necessary.
2022-05-05 16:35:45 +02:00
7b1b6030d3 OAPI: regenerate code 2022-05-05 16:04:45 +02:00
9985860c66 OAPI: endpoint /api/tasks/{task_id}/setstatus for changing task status
This endpoint is for humans to manage individual tasks. Workers post task
updates to another endpoint.
2022-05-05 16:02:47 +02:00
ed2e709618 Cleanup: reformat long lines in pkg/api/flamenco-manager.yaml
I didn't find the way VSCode was rewrapping those lines the prettiest,
so I manually changed the formatting. It's now still compatible with the
auto-formatting, but nicer.

No functional changes.
2022-05-05 16:00:54 +02:00
4da7f67105 OAPI: generate code 2022-05-03 13:03:59 +02:00
adba72176d OAPI: add /api/tasks/{task_id} endpoint
Add an OpenAPI endpoint definition for fetching a single task.
2022-05-03 12:45:08 +02:00
222d618ef6 OAPI: generate code 2022-05-03 11:10:57 +02:00
a3752f3113 OAPI: Add SocketIOTaskUpdate schema
Add the schema for task updates sent via SocketIO.
2022-05-03 11:09:47 +02:00
824425f466 OAPI: regenerate code 2022-05-02 18:31:29 +02:00
24941142b0 OAPI: add SocketIOSubscription type for managing SocketIO rooms
A client can send a `SocketIOSubscription` object with the
`/subscription` event type, in order to manage the subscriptions to
job-related updates.

Subscribing to a job means receiving updates to its tasks. General job
updates are sent to all clients anyway.

This commit only contains the OpenAPI YAML change, to see if it works
well to separate such commits into three parts:

    - OpenAPI definition change.
    - Regenerated code changes.
    - Hand-written code changes.
2022-05-02 18:29:35 +02:00
992fc38604 OAPI: add endpoint for fetching the tasks of a job
Add `fetchJobTasks` operation to the Jobs API. This returns a summary of
each of the job's tasks, suitable for display in a task list view.

The actually used fields may need tweaking once we actually have a task
list view, but at least the functionality is there.
2022-04-22 12:52:57 +02:00
634d59e622 Use VSCode + Prettier to reformat YAML
This commit includes settings for Visual Studio Code, so that at least
different people with the same editor (or me on multiple machines) get the
same formatting.

No functional changes.
2022-04-22 12:01:09 +02:00
5466f65225 OAPI: add setJobStatus operation
Add API endpoint for updating the job status.
2022-04-21 19:06:18 +02:00
b699647ed4 OpenAPI: add activity field to Job schema 2022-04-21 12:40:25 +02:00
d099a31531 OAPI: add endpoint for getting a single job type
This will be used by the web frontend to determine which job settings
to show and which to hide.
2022-04-15 16:21:48 +02:00
70584ce951 OAPI: add sections to OpenAPI paths
This just makes the grouping a bit more obvious. It follows the already
available tags.
2022-04-15 15:11:29 +02:00
e672289a11 OAPI: include all info for the jobs table in the JobUpdate schema
By having all info for the jobs table in the `JobUpdate` schema, it won't
have to query for the full job when a new job is added. This fetching of
the full job is now delayed until someone clicks on the table row.
2022-04-14 09:41:04 +02:00
863ecee954 OAPI: regenerate OpenAPI code 2022-04-08 12:04:34 +02:00
930d7497d7 OAPI: Better 'SQLITE_BUSY' error handling
SQLite can return `SQLITE_BUSY` errors when it's doing too many things at
the same time. This is now improved a bit by setting a 5-second timeout,
during which the SQLite driver will wait for the database to become
available. If that doesn't happen, Flamenco Manager will return a
`503 Service Unavailable` response so that the client knows to back off
a little.
2022-04-08 12:02:30 +02:00
df3f7b44b9 Hook up web interface to job updates 2022-04-07 18:46:09 +02:00
0c0df41f5d Job status change system for SocketIO broadcasts
Not fully tested yet.
2022-04-05 15:52:55 +02:00
781f1d936a OAPI: add jobs query endpoint 2022-04-04 18:53:19 +02:00
99852838d2 OAPI: fix job submission example
It now works with the current simple-blend-render compiler script again.
2022-04-04 18:24:50 +02:00
80ffc7da5d OAPI: use GET instead of OPTIONS to get file info from Shaman
OPTIONS is used by browser for CORS pre-flight requests.
2022-04-01 15:52:17 +02:00
5f16201832 OAPI: expose effective job storage path in configuration API 2022-04-01 14:01:22 +02:00
e70dad2177 Manager: unify Flamenco and Shaman storage paths
Flamenco Manager now has a "storage path" config option, which will be
used by Shaman if enabled. Now the `{jobs}` implicit variable will always
exist, its value depending on whether Shaman is enabled or not.
2022-04-01 13:43:51 +02:00
88fe62ddef Manager: skip shaman permission unit test on Windows
The test was made with umask on UNIX-like systems in mind. It doesn't
make much sense on Windows, at least not in its current form, so it's
better to just explicitly skip it.
2022-03-28 11:33:09 +02:00
1b11233c92 Shaman: more path -> filepath
Just more Windows fixes.
2022-03-28 11:11:50 +02:00
fe9849b134 Shaman: fix bunch of path issues on Windows
Shaman was made on Linux, using the `path` module, which only supports
forward slashes. This mostly replaces `path` with `path/filepath` to use
native paths and increase Windows compatibility.

The work isn't done yet, though.
2022-03-28 11:02:18 +02:00
a6834137b7 Tests: test some more returned errors 2022-03-26 14:07:49 +01:00
3905135465 Tests: replace assert.Nil(t, err) with assert.NoError(t, err)
This is a better way to check errors, both semantically (no usually nil is
bad, but nil error is good, so this avoids a mental negation) and for
the reporting by the assert package.
2022-03-26 14:05:53 +01:00
6c827ffc52 Shaman: only configure the root directory of the Shaman files
Flamenco v2 allowed separate configuration of the Shaman file store and
checkout paths. This is now just one setting for "the storage". The file
store will be in `{storage}/file-store` and the checkout will happen in
`{storage}/jobs`.
2022-03-25 14:32:42 +01:00
4b9501590e Shaman: only add random suffix to checkout dir if already existing
Only add a random suffix to the checkout dir if it is necessary to ensure
uniqueness. If the client-supplied checkout directory doesn't exist yet,
it will be used as-is.
2022-03-25 14:10:26 +01:00
724938c7ae Shaman: allow Manager to determine the final checkout path
The checkout request now responds with the final checkout path. This makes
it possible for the Manager to ensure the checkout is unique.
2022-03-25 14:10:26 +01:00
2e4ada2ade Manager: add 'shaman' prefix to logging 2022-03-25 14:10:26 +01:00
7e035ec3bf Manager: check returned error of touchfile call 2022-03-25 14:10:26 +01:00
eeeec23f43 Cleanup, fix typo in OAPI description 2022-03-25 14:10:26 +01:00
ccf45f2f6c Manager: add Shaman checkout test 2022-03-25 14:10:26 +01:00
c69e0909ae Shaman submission is working! 2022-03-25 14:10:26 +01:00
21227c8046 More Shaman integration work
- Addon switches between filesystem-packing and Shaman-packing
  automatically, depending on whether the Manager has Shaman enabled.
- Actually using BAT for Shaman packing.

It doesn't work though, some error occurs when receiving Shaman response
from the Manager in the Addon.
2022-03-25 14:10:26 +01:00
f9b7510c42 Streamlining Shaman protocol further, plus rough implementation for addon 2022-03-25 14:10:26 +01:00
b2288e7f28 Manager: More work on Shaman support
This introduces some more conceptual changes to Shaman. The most important
one is that there is no longer a "checkout ID", but a "checkout path".
The Shaman client can request any subpath of the checkout directory,
so that it can handle things like project- or scene-specific prefixes.
2022-03-25 14:10:26 +01:00
2b0d154a07 Manager: more work on Shaman integration 2022-03-25 14:10:26 +01:00
6f35b3303d Manager: more work on porting Shaman code to Flamenco 3 2022-03-25 14:10:26 +01:00
4df0543661 Manager: Implementation of Shaman OAPI interface
This hooks up the OpenAPI Shaman endpoints to a Shaman interface. This
interface doesn't have any implementation yet.
2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
4e8e71e4e2 Initial checkin of Shaman of Flamenco 2
This is not yet working, it's just a direct copy of the Manager of Flamenco
2, with Logrus replaced by Zerolog. The API has been documented in
flamenco-manager.yaml as a starting point for the integration.
2022-03-25 14:10:26 +01:00
09a476e11a Compute render output path when evaluating job settings
Compute render output path when evaluating job settings, which is done
within the Flamenco add-on, instead of in the job compiler script. This
allows the UI to show the render path, rather than it only being known
after the job has been submitted.
2022-03-15 16:56:44 +01:00
a6ac331612 Allow Python evaluation for computing job settings in the addon 2022-03-14 18:44:39 +01:00
7b090bdbd6 OAPI: job submission endpoint now returns Job instead of SubmittedJob 2022-03-14 16:59:59 +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
7181c2c4cf OAPI: allow job settings to have a tooltip/description 2022-03-11 17:30:27 +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
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
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
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
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
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
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
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
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
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
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
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