Jörg Thalheim
109d1faf9e
enable bug-bear linting rules
2024-09-02 13:26:07 +02:00
Jörg Thalheim
b313f2d066
make all same-module imports relative, the rest absolute
...
This makes sorting more consitent.
2024-09-02 13:00:19 +02:00
Johannes Kirschbauer
742e0a71b5
Clan-core: Rename clanName within Machines
2024-08-06 12:21:46 +02:00
a-kenji
0a58adce18
clan: remove config subcommand
...
This removes the `config` subcommand from the cli and the documentation
to keep the api surface small.
While this functionality was convenient it doesn't need to be surfaced
by the clan cli.
The remaining `config` python module should be ported to the `clan-app`
in a follow up pr. Because the functionality is currently only used by
the `clan-app`.
Ideally together with: #1830 .
2024-07-31 16:35:36 +00:00
Johannes Kirschbauer
c43c4ef067
Fix schema test
2024-07-14 15:02:32 +02:00
Johannes Kirschbauer
96e7d93e01
Fix schema test
2024-07-14 13:38:43 +02:00
Jörg Thalheim
4c217f3f1b
fix new linter issues
2024-07-08 16:30:15 +02:00
Jörg Thalheim
6037ad1ce0
move FlakeId to flake id
...
move FlakeId to flake id
2024-07-03 18:28:55 +02:00
DavHau
bc3d17ad06
api: add endpoint machine_schema
2024-06-27 16:58:37 +07:00
DavHau
4db2e8303f
refactor: rename clanCore -> clan.core
2024-06-18 18:32:40 +07:00
a-kenji
3abe481316
clan: add dynamic completions to clan vms inspect
2024-06-04 15:50:50 +02:00
a-kenji
3e1dbd5fbd
clan: add dynamic completions to clan config
2024-06-04 15:44:39 +02:00
Jörg Thalheim
1b8ba590f7
make config command read-only
2024-05-29 13:17:55 +02:00
Qubasa
3ed58de082
Fixed missing log.BOTH and error_msg at prev refactors
2024-01-11 21:11:49 +01:00
Qubasa
13ba1440bd
cmd.py refactor part 4
2024-01-11 21:11:49 +01:00
Jörg Thalheim
163abdb311
schema: set also clanName
...
this is usually set by buildClan
2024-01-11 17:41:41 +01:00
Qubasa
513f48bab1
cmd.py part 3 refactor
2024-01-10 18:39:19 +01:00
Qubasa
7049573d28
Refactor subprocess to cmd.py part 2
2024-01-10 12:11:29 +01:00
Jörg Thalheim
59d1829f4d
disallow variable shadowing
2023-11-30 14:31:37 +01:00
Jörg Thalheim
6f0722c692
modernisation for python 3.11
2023-11-29 13:29:45 +00:00
Jörg Thalheim
7d755beca6
enable more linting
2023-11-29 13:29:45 +00:00
Jörg Thalheim
f27b1da6b9
drop dependency on fastapi in the cli
2023-11-21 15:09:18 +01:00
lassulus
082d628497
clan_cli: flake_name -> flake_dir
2023-11-15 16:23:28 +01:00
DavHau
d755048dc2
api/machines: allow config verification on imaginary machines
...
Machines do not need to exist in order to verify their configuration.
This allows verifying a config before creating an actual machine with it.
2023-11-13 21:24:05 +07:00
DavHau
33944cf74e
api/machines: verify config by evaluating the .vm output
...
This fixes the problem where fileSystems were missing, or boot.loader was not set.
SInce we want VMs anyways for now, this strategy aligns well
2023-11-13 20:50:11 +07: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
170d29a15a
api/schema: return list of missing modules
2023-11-10 15:07:15 +07:00
DavHau
da32031eda
api/schema: don't crash on eval error
2023-11-10 14:27:03 +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
Qubasa
e389c7cfe7
Updated to main branch. Removed cluttering asyncio and httpx log messages
2023-10-27 23:36:45 +02:00
Qubasa
a628934351
Removing find_git_repo
2023-10-27 19:26:03 +02:00
Qubasa
ddf502b229
nix fmt
2023-10-27 19:26:03 +02:00
Qubasa
adffdc14f6
Added repro_env_break debugging command. This spawn a terminal inside the temp home folder with the same environment as the python test
2023-10-27 19:20:17 +02:00
Qubasa
950808498f
Working test_create_flake
2023-10-27 19:20:17 +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
f976121fa6
Added flake_name:str argument everywhere, nix fmt doesn't complain anymore
2023-10-27 19:15:40 +02:00
Qubasa
b09448ab6b
Updated to main
2023-10-27 19:15:11 +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
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
DavHau
6b36fc743c
clan config: refactor - reorder functions
2023-10-24 15:27:19 +01:00
Jörg Thalheim
ded120d065
drop requirement for importing qemu-vm.nix
2023-09-27 14:54:01 +02:00
clan-bot
2b13be3df5
Merge pull request 'clan config: print command in more instances' ( #342 ) from Mic92-docs into main
2023-09-26 12:13:09 +00:00
Jörg Thalheim
f85fdf678d
clan config: print command in more instances
2023-09-26 14:10:52 +02:00
clan-bot
fef5223d6e
Merge pull request 'unpin nix-fast-build' ( #341 ) from Mic92-docs into main
2023-09-26 12:02:05 +00:00
Jörg Thalheim
29a48725ef
clan config: print command on error
2023-09-26 14:00:20 +02:00
DavHau
b952aaa818
clan config: support new types nullOr and passwdEntry
2023-09-24 14:24:48 +01:00