50 Commits

Author SHA1 Message Date
Sybren A. Stüvel
c3345131c7 Rename flamenco-addon.zip to flamenco3-addon.zip
Just to be explicit this is for the new Flamenco version.
2022-06-28 12:17:57 +02:00
Sybren A. Stüvel
08dc210616 Makefile: add commented-out command useful when debugging
Add the command that's needed to disable JavaScript minification, useful
for debugging JS errors.

No functional changes.
2022-06-28 10:49:48 +02:00
Sybren A. Stüvel
b021782ca0 Get the make package command to work
To create a single ZIP file that contains the Manager, Worker, and add-on,
just run `make package`.
2022-06-27 16:03:02 +02:00
Sybren A. Stüvel
1b40038e3d Add Go program that can create the addon ZIP file
Use Go to create the addon ZIP file, to be independent of any ZIP
executable being installed on the system.
2022-06-27 15:58:14 +02:00
Sybren A. Stüvel
7b028df8ac Manager: serve static files of the webapp at /app/
Vue Router generates URLs for which there are no static files on the
filesystem (like `/jobs/{job ID}`). To make this work, the webapp's
`index.html` has to be served for such requests. The client-side JavaScript
then figures out how things fit together, and can even render a nice 404
page if necessary.

This shouldn't happen for non-webapp URLs, though. Because of this, the
entire webapp (including the "serve `index.html` if file not found logic)
is moved to a `/app/` base URL.

`make flamenco-manager` now also builds the webapp and embeds the static
files into the binary.

`make flamenco-manager_race` does NOT rebuild the static web files, to
help speed up of debug cycles. Run `make webapp-static` to rebuild the
webapp itself, if necessary, or run a separate web development server with
`yarn --cwd web/app run dev --host`.
2022-06-27 14:53:42 +02:00
Sybren A. Stüvel
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
Sybren A. Stüvel
e72ea6b310 make clean: no longer regenerate source
Regenerating code with `make clean` was somewhat useful when only Go code
was generated, because that didn't include the version number / git hash.
The Python and JS code do have that version/hash, so `make clean` became
a source-altering operation, which wasn't nice.
2022-05-16 10:10:48 +02:00
Sybren A. Stüvel
88929db582 make clean: also remove race files
Also remove `flamenco-manager_race` and `flamenco-worker_race` when running
`make clean`.
2022-05-16 10:08:37 +02:00
Sybren A. Stüvel
782c60a6e7 OAPI: remove '-dirty' suffix from the version number in generated code
The version number used in the OpenAPI-generated code shouldn't contain
the `-dirty` suffix. In the common development workflow, those files
will always be dirty; because they're only committed after things are
locally working, the implementation has already been written.
2022-05-03 11:09:47 +02:00
Sybren A. Stüvel
03d6f99c3d Makefile: include getting webapp dependencies with yarn install
Running `make` will now also run `yarn install` for the webapp.
2022-04-29 12:30:02 +02:00
Sybren A. Stüvel
1331d29b10 Makefile: mark new race-checker-enabled targets as 'phony' 2022-04-21 19:06:18 +02:00
Sybren A. Stüvel
5a5a9aec8b Makefile: add rules for builds with race condition checker enabled
New rules `flamenco-manager_race` and `flamenco-worker_race` will build
with the race condition checker enabled.
2022-04-21 19:06:18 +02:00
Sybren A. Stüvel
555c935790 Web: Replace Vue 2 with Vue 3 webapp
Replace the Vue v2 webapp with a Vue v3 one, and embed the OpenAPI
client in the webapp itself (instead of being its own npm project).

- Vue v2.x -> v3.x
- Tabulator v4.x -> v5.1
- Moment JS -> replaced with Luxon JS
- Vue CLI/UI -> replaced with Vite
2022-04-12 12:34:49 +02:00
Sybren A. Stüvel
7f5978a0f2 Use go install instead of go get to install code generators 2022-04-09 11:50:24 +02:00
Sybren A. Stüvel
5e5fa57fa4 OAPI: tweak the JS generator to do more what we want 2022-04-04 19:33:46 +02:00
Sybren A. Stüvel
0f2477370f Remove SocketIO PoC
Remove SocketIO proof of concept, as its code has been integrated into
Flamenco Manager.
2022-04-04 16:27:15 +02:00
Sybren A. Stüvel
e990603311 OAPI: Add generated JavaScript API client
This adds a JS client for the OAPI interface, and introduces the SocketIO
stuff into Flamenco Manager itself.

To build & run:
- in `web/manager-api` run `npm install`
- in `web/manager-api` run `npm link`
- in `web/app` run `npm install`
- in `web/app` run `npm link flamenco-manager`
- in `web/app` run `yarn serve`

This may not be a complete list, but at least some of those steps are
necessary.
2022-04-01 16:40:54 +02:00
Sybren A. Stüvel
c69e0909ae Shaman submission is working! 2022-03-25 14:10:26 +01:00
Sybren A. Stüvel
d87cba6d7c Makefile: add make package target
Add a simple way to create a download bundle. Not yet complete, but useful
for demo at the weekly.
2022-03-17 16:54:37 +01:00
Sybren A. Stüvel
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
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
47e36c927c Change package URL to the blender.org repository 2022-03-01 20:45:09 +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
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
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
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
d50efa87ed Don't run go generate with make test
`go generate` is taking quite some time now, so just run when necessary.
2022-02-19 14:39:43 +01:00
Sybren A. Stüvel
bb53cc1e4a Task log storage service 2022-02-18 18:19:35 +01:00
Sybren A. Stüvel
8424e690ee Bump Go version to 1.18 for generics support 2022-02-18 11:41:31 +01:00
Sybren A. Stüvel
f1ad0a66a8 Makefile: separate build rule for each app
These do not run `go generate`, so they're faster but take a bit more care.
2022-02-17 13:58:10 +01:00
Sybren A. Stüvel
96023932da SocketIO based chat client as PoC for backend/frontend communication
The chat client itself is just a throwaway project. The SocketIO system
will be used to send realtime updates about jobs, tasks, and workers to
the web frontend.
2022-02-11 14:47:26 +01:00
Sybren A. Stüvel
2ee66af6d4 Prevent tests running in parallel
Each test tries to reset the database, which shouldn't happen in parallel.
2022-02-01 17:17:19 +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
860ad168a6 Remove GORM PoC; it's used in Flamenco Manager now anyway 2022-01-25 17:27:44 +01:00
Sybren A. Stüvel
2a4bf1c60f Toying around with GORM and PostgreSQL 2022-01-24 16:59:48 +01:00
Sybren A. Stüvel
b446b02739 Change package URL
Change package URL from `gitlab.com/blender/flamenco-goja-test` to
`gitlab.com/blender/flamenco-ng-poc` so that it matches the actual URL
on Gitlab.
2022-01-24 14:28:00 +01:00
Sybren A. Stüvel
e4be846de8 Add make with-deps target to install dependencies and build the apps 2022-01-24 14:27:25 +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
fa6f2a90d3 Also delete generated files with 'make clean' 2022-01-10 17:45:13 +01:00
Sybren A. Stüvel
f1399ca929 Move cmd/flamenco-poc to cmd/flamenco-manager-poc 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
Sybren A. Stüvel
0e424d0a70 Move to more standard Go project structure 2022-01-10 17:45:12 +01:00
Sybren A. Stüvel
da845daaaf Support for NPM modules 2022-01-03 19:51:22 +01:00
Sybren A. Stüvel
96f2a6bb52 Allow importing stuff from JS 2022-01-03 19:51:22 +01:00
Sybren A. Stüvel
ff63f8b6b0 Add standard Makefile 2022-01-03 19:51:22 +01:00