Commit Graph

2023 Commits

Author SHA1 Message Date
88f90ef0a5 Manager: properly close database at end of test
Instead of closing the sqlite database connection, tell GORM to close the
connection. Only that properly closes the DB, so that testing with a file
on disk doesn't fail when trying to delete that file.

No functional changes to the Manager itself.
2024-05-28 16:07:22 +02:00
98cbe6a67d Manager: lightly polish job deletion
Tweak the logging a little bit so it's less noisy, properly warns when the
Shaman checkout dir cannot be removed, and optimise the database query
a bit (by just fetching the one field that's needed, instead of the entire
job).

Deletion still works the same.
2024-05-28 16:07:22 +02:00
79076be91b Manager: Convert task failure persistence to SQLC
No functional changes.
2024-05-28 16:07:22 +02:00
a99e68ec99 Manager: Convert TaskTouchedByWorker to sqlc
No functional changes.
2024-05-28 16:07:21 +02:00
7175bb469b Manager: Convert UpdateJobsTaskStatuses(Conditional) to sqlc
No functional changes.
2024-05-28 16:07:21 +02:00
4435633756 Manager: Convert FetchTasksOfJob() and FetchTasksOfJobInStatus() to sqlc
No functional changes.
2024-05-28 16:07:21 +02:00
4ab853da40 Manager: Convert JobHasTasksInStatus and CountTasksOfJobInStatus to sqlc
No functional changes.
2024-05-28 16:07:21 +02:00
b66490831c Manager: fetch jobs of tasks in FetchTasksOfWorkerInStatus()
The task state machine expects that `task.Job` is set correctly. Since
SQLC does not automatically fill this field (and rightfully so), I've added
a bit of Go code that fetches the job in a separate query.

A TODO is added as a reminder that it would be better for the task state
machine itself to fetch the job when needed.
2024-05-28 16:07:17 +02:00
1e327c510e Manager: Convert FetchTasksOfWorkerInStatusOfJob to sqlc
No functional changes.
2024-05-28 14:46:43 +02:00
950d661377 Manager: convert TaskAssignToWorker and FetchTasksOfWorkerInStatus to sqlc
No functional changes.
2024-05-28 14:46:43 +02:00
dcca9aef03 Manager: convert db.SaveTaskActivity() to SQLC
No functional changes.
2024-05-28 14:46:42 +02:00
a9be729e59 Manager: Convert db.SaveTaskStatus() to SQLC
No functional changes.
2024-05-28 14:46:42 +02:00
a54972ddd0 Manager: Convert db.SaveTask() to SQLC
No functional changes.
2024-05-28 14:46:42 +02:00
f632f2dbb6 SQLC: upgrade to 1.26.0
Doesn't change anything function in the generated code, just the version
numbers & handling of empty comments in the query file.
2024-05-28 14:46:42 +02:00
c1cdff567e Manager: Convert FetchTask to sqlc
This is a bit more work than other queries, as it also breaks apart the
fetching of the job and the worker into separate ones. In other words,
internally the persistence layer API changes.
2024-05-28 14:46:42 +02:00
dc893dcad4 Manager: regenerate Go mock after removal of SaveTask
Regenerate the Go mock implementation after the removal of the SaveTask
function from the mocked interface.

See 097d5abb7c13e6eff1facea12f89f24c144194c0
2024-05-28 14:45:34 +02:00
eba340cedc Bump Go version to 1.22.3
Update Go from 1.22.2 to 1.22.3 (released 2024-05-07)

It includes security fixes to the go command and the net package, as
well as bug fixes to the compiler, the runtime, and the net/http
package.
2024-05-28 08:59:59 +02:00
94923c628d Manager: increase wait time in worker timeout test
Instead of waiting for 1ns, wait for 1ms. That's more stable on my laptop,
and still short enough to not really slow down the test.
2024-05-28 08:53:15 +02:00
097d5abb7c Manager: Remove SaveTask function from interface
Remove `SaveTask(...)` from the persistence layer interface as defined
by the `api_impl` package. It's not used.
2024-05-28 08:53:15 +02:00
2d5de525d0 Website: add FAQ entry about doubling of backslashes in paths 2024-05-27 13:03:01 +02:00
1ac1deaead Document useful git config in gitattributes 2024-05-21 00:57:43 +02:00
422708fffc .gitattributes: mark .sql files as text 2024-05-21 00:57:43 +02:00
c307342f9d OAPI: regenerate code 2024-05-20 10:09:22 +02:00
1dc86119f0 OAPI: change URL to https://flamenco.blender.org/
The flamenco.io website has been off the air for quite a while already.
2024-05-20 10:05:45 +02:00
b97d27c955 Manager: add unit test for db.SaveTaskActivity()
No functional changes.
2024-05-18 12:38:03 +02:00
1eca95cfc9 Website: clarify that the Cycles/OPTIX job type is for Flamenco 3.6+
It needs some new features in the upcoming v3.6
2024-05-16 12:47:01 +02:00
4ce3f13505 Website: link to new 'job type' issue template
For the 'submit your job type on the tracker' link, use the new issue
template I made for that purpose.
2024-05-16 12:40:07 +02:00
7e9963e6ad Website: Replace WebP image with PNG
This is only necessary for those images that are getting processed by
Hugo's image pipeline.
2024-05-16 12:39:52 +02:00
c5b13baab9 Revert "Makefile: use Hugo with the -tags extended argument"
This reverts commit 44ffb09d7daa0e2a8c55750ef5da187a527f6478. Building
the extended version of Hugo requires CGo, which I don't want to have as
a build-time dependency for any part of Flamenco. So, unfortunately, no
WebP support.
2024-05-16 12:36:42 +02:00
9f6c1e3659 Remove checkbox from Custom Job Type issue template
They became (as could be expected) two checkboxes, so better to not include
any options that are mutually exclusive.
2024-05-16 12:32:13 +02:00
166735ec93 Add Gitea issue template for submitting custom job types 2024-05-16 12:30:55 +02:00
80f7ae99b9 Website: add Cycles/OPTIX/GPU job type
Add the latest version of the Blender Studio custom job type to the
website, as it does a few things others may find interesting.
2024-05-16 12:28:55 +02:00
44ffb09d7d Makefile: use Hugo with the -tags extended argument
This is necessary for proper WebP support.
2024-05-16 12:28:55 +02:00
afc5067573 Fix labels in Gitea issue templates
The Gitea labels have been updated from `type::Report` to `Type/Report`,
but the issue templates were still using the old style.
2024-05-16 12:28:55 +02:00
0e2effd29b Website: document 3rd party job type compatibility
All 3rd party job types should get a box with the versions of Flamenco and
Blender they are compatible / tested with.
2024-05-16 12:28:55 +02:00
Mateus Abelli
d5977c637b Website: Fix links in Documentation /development/database
This patch fixes what appears to be placeholders for the markdown links of GORM and SQLC.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104309
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2024-05-16 08:26:03 +02:00
Mateus Abelli
47341a2338 Website: add image to 'Worker cannot find Manager' FAQ entry
Add a screenshot of the Manager's log on the terminal. This should make
it clearer which "Manager output" is meant, also for people who aren't
familiar with terminals.

Fixes #104303
2024-05-15 09:51:57 +02:00
Mateus Abelli
4aa391c679 Webapp: Fix superfluous null comparison
Remove the superfluous comparison to `(null || '')`. Just compare to
the empty string instead.

Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104307
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
2024-05-13 16:21:34 +02:00
ae0774b440 Manager: add unit tests
Add a few more unit tests for the persistence layer. The goal is to have
100% coverage of the happy flow, to aid in conversion from GORM to sqlc.

No functional changes.
2024-05-11 10:35:17 +02:00
df334deca5 Add shellSplit(someString) function to the job compiler scripts
Add a function `shellSplit(string)` to the global namespace of job
compiler scripts. It splits a string into an array of strings using
shell/CLI semantics.

For example: `shellSplit("--python-expr 'print(1 + 1)'")` will return
`["--python-expr", "print(1 + 1)"]`.
2024-05-07 12:39:13 +02:00
c5ae2916db Add label to job settings
This gives job type authors more control over how settings are presented
in Blender's job submission GUI. If a job setting does not define a
label, its `key` is used to generate one (like Flamenco 3.5 and older).

Note that this isn't used in the web interface yet.
2024-05-07 11:58:44 +02:00
5ee4871e39 OAPI: regenerate code 2024-05-07 11:55:56 +02:00
e712e9450c OAPI: add label to AvailableJobSetting 2024-05-07 11:54:49 +02:00
2146388abe Website: reword the 'worker cannot find manager' FAQ entry
Reword so that the section starts with the suggestion that each problem
has a solution. And make it an enumerated list to clarify the structure
of the answer.
2024-05-06 11:16:01 +02:00
MrJW
153cfe7b5c Improve Troubleshooting FAQ: Add firewall and antivirus check
Updated the troubleshooting section of the FAQ to include guidance on checking the firewall and potential third-party antivirus issues when the Worker cannot connect to the Manager. This enhances the user experience by addressing common connectivity issues more comprehensively.
2024-05-04 18:19:44 +02:00
fde20af852 Changelog: mark 3.6 as 'in development' 2024-04-24 17:52:17 +02:00
85d7cb07e7 Website: bump experimental version to 3.6-alpha0 2024-04-24 17:46:05 +02:00
68ac3c03e3 Add-on: compatibility with Python 3.9
Remove some Python 3.10 features to make the add-on compatible with py39.
This is the Python version that's bundled with Blender 2.93 LTS, for which
I got a request to see if it could be supported.

The Blender version still isn't officially supported, but this should make
things at least not immediately fail.
2024-04-24 17:32:01 +02:00
d279f91549 Bumped version to 3.6-alpha0 2024-04-24 17:32:01 +02:00
f7aef5bfca Changelog: add link to MQTT documentation 2024-04-16 11:16:27 +02:00