Jörg Thalheim
647a4214fb
get rid of pydantic in cli
2023-11-21 12:48:35 +00:00
DavHau
a982084ab4
api/flake/history: implement review requests
2023-11-17 18:26:55 +07:00
clan-bot
d072d93911
Merge pull request 'hide root from api schema' ( #529 ) from hsjobeki-hsjobeki into main
2023-11-17 11:07:11 +00:00
Johannes Kirschbauer
27d1ecb3b7
hide root from api schema
2023-11-17 12:03:40 +01:00
DavHau
2306417145
api/flake/list_history: init
...
Add an api endpoint to list the history of clan flakes that have been interacted with
Also add `clan flake list`
2023-11-17 17:56:14 +07:00
Johannes Kirschbauer
3d24f9464d
hide root from api schema
2023-11-17 11:54:17 +01:00
DavHau
11fb73432b
api/flake/add: init
...
Adds an endpoint to memoize clans.
clan flakes can be added to the history either via the endpoint or by executing `clan flakes add`
2023-11-17 17:05:15 +07:00
lassulus
082d628497
clan_cli: flake_name -> flake_dir
2023-11-15 16:23:28 +01:00
Jörg Thalheim
f65bd8aa85
fix exception when file does not exist
...
fixes https://git.clan.lol/clan/clan-core/issues/488
2023-11-14 16:57:05 +01:00
DavHau
2fafc9a38b
api/machines: init put_machine replacing create_machine and set_machine_config
...
This allows creating and configuring a machine in one single step.
2023-11-13 20:25:52 +07:00
DavHau
1e2e37880c
api/machines: ensure name is valid hostname
2023-11-12 07:57:48 +07:00
DavHau
170d29a15a
api/schema: return list of missing modules
2023-11-10 15:07:15 +07:00
DavHau
fc1591a0a8
api/schema: get schema without having a machine
...
Also done:
- add @pytest.mark.with_core indicating that a test depends on clan-core and cannot be cached
- separate unit tests into two derivations, ones that can be cached and ones that cannot.
- fix frontend typescript code
2023-11-09 15:30:25 +07:00
DavHau
6e281dd7c3
api/machines: better input/output validation
...
Also move contents tof 'config' to the top-level
2023-11-06 17:56:27 +07:00
Qubasa
a00056824d
API: Added /api/flake/list. Added API grouping and description for better visibility
2023-11-03 22:05:33 +01:00
Qubasa
1fef2d1732
Fixed test_webui only failing in nix_sandbox
2023-10-29 19:35:29 +01:00
Qubasa
ff866ca4b2
Fixing test_clan_modules test
2023-10-27 23:39:02 +02:00
Qubasa
e389c7cfe7
Updated to main branch. Removed cluttering asyncio and httpx log messages
2023-10-27 23:36:45 +02:00
Qubasa
7256c35c26
Fixed missing FlakeName argument
2023-10-27 19:26:03 +02:00
Qubasa
916fa8e570
All tests passing babyyy !!
2023-10-27 19:26:03 +02:00
Qubasa
0be3dac289
nix fmt
2023-10-27 19:21:50 +02:00
Qubasa
8ff80b025c
Fixing a multitude of tests
2023-10-27 19:21:50 +02:00
Qubasa
9c8829c32f
nix fmt
2023-10-27 19:19:45 +02:00
Qubasa
7bbadaa60f
Fixed cyclic dependencie AND swapped pytest-parallel for pytest-xdist to fix deadlock in tests
2023-10-27 19:18:45 +02:00
Qubasa
ecdd4949b7
Added new type FlakeName
2023-10-27 19:18:45 +02:00
Qubasa
b09448ab6b
Updated to main
2023-10-27 19:15:11 +02:00
Qubasa
2ad87785c0
Added state directory.
2023-10-27 19:11:27 +02:00
Qubasa
58b54bb9df
API: Added Path validators. api/flake/create inits git repo. Fixed vscode interpreter problem
2023-10-27 19:11:27 +02:00
DavHau
e6b13fd970
api/machines: split off config validation into separate endpoint
...
- This speeds up PUT /machines{name}/config as it doesn't do the expensive check anymore
- instead use PUT /machines/{name}/verify which allows a dry-run evaluation of a config which is passed without writing it to disk
2023-10-25 17:48:37 +01:00
DavHau
5eda240cb2
/api/clan_modules: init
...
- add GET /api/clan_modules entry point returning a list of modules available for import
2023-10-25 17:22:35 +01:00
DavHau
cf0953146d
api/machines: allow importing extra modules
...
- add top-level option `clanImports` to clanCore
- clanImports can be set and checked as any other option
- buildClan resolves the clanImports from the settings.json before calling evalModules to prevent infinite recursions
- new endpoint PUT machines/{name}/schema to allow getting the schema for a specific list of imports
- to retrieve the currently imported modules, cimply do a GET or PU on machines/{name}/config which will return `clanImports` as part of the config
Still missing: get list of available modules
2023-10-25 16:36:30 +01:00
DavHau
177be69eda
PUT api/machines/{name}/config: ensure only valid config is ever written
...
- add CLAN_MACHINE_SETTINGS_FILE variable to temporarily override the machine settings file
- do a dry-run evaluation first with the new config before persisting it.
2023-10-24 18:40:48 +01:00
DavHau
f1e7495806
machines: add endpoint machines/{name}/ verify
2023-10-24 16:31:37 +01:00
Qubasa
942aa10a31
API: Added /api/flake/create. Fixed vscode search settings. Moved clan create to clan flake create
2023-10-09 14:01:34 +02:00
lassulus
0ed50d994b
task_manager: fix race conditions
2023-10-04 17:52:06 +02:00
Jörg Thalheim
b0b680c39d
improve task manager to report exceptions better
2023-10-04 16:49:58 +02:00
Jörg Thalheim
f8e5f261f9
task_manager: return task directly instead of uuid
2023-10-03 17:48:56 +02:00
Jörg Thalheim
c03effed54
move out vm logic out of controller
2023-10-03 17:24:08 +02:00
Qubasa
499c42fd20
nix fmt
2023-10-03 14:39:29 +02:00
Qubasa
76943ac7ee
Added newlines against buffering for log streaming. Fixed cli
2023-10-03 14:38:51 +02:00
Qubasa
f1d5cacd76
Added better logging
2023-10-03 14:16:07 +02:00
Qubasa
c78af6243c
Fixed failing tests
2023-10-03 13:15:01 +02:00
Qubasa
3a8ce96b43
CLI: Restructured TaskManager and log collection
2023-10-03 13:15:01 +02:00
Qubasa
0b47a1f9e1
Updated to main
2023-10-03 13:12:44 +02:00
Johannes Kirschbauer
6edaa7d2ba
smoke check error handling for create vm
2023-10-03 11:43:06 +02:00
Johannes Kirschbauer
9edf5933bb
add error handling to endpoint
2023-10-03 11:12:06 +02:00
Qubasa
912d6428a3
API: Added endpoint & test for /api/flake/attrs
2023-10-01 12:50:54 +02:00
Johannes Kirschbauer
1c685bdf33
refine join workflow
2023-09-30 16:00:21 +02:00
Qubasa
d805c4b069
API: Improved vm_status and added some tests. Skip vm tests in VM
2023-09-30 11:08:42 +02:00
Jörg Thalheim
4f3664b831
webui: pretty urls by also appending .html
2023-09-28 11:09:31 +02:00