Commit Graph

74 Commits

Author SHA1 Message Date
Michael Hoang
a71a5880c1 treewide: reformat 2025-08-08 15:28:37 +10:00
Qubasa
85670d1dda clan-app: Implement dynamic groups and array based filtering of logs and groups 2025-07-03 17:49:34 +07:00
DavHau
3cb91769ca nix_modules: generate clan.py in top-level shell
Generally I don't think dev shells are the right place to trigger generation of files.
This should be part of the formatter and pre-commit hook

@hsjobeki
2025-06-25 12:33:36 +07:00
Johannes Kirschbauer
1ef2e13c85 feat(nix_models): replace inventory model by holistic clan model 2025-05-28 14:02:43 +02:00
Johannes Kirschbauer
e2520f6aa8 Test(InventoryPersistence): add persist integration tests 2025-05-21 17:55:43 +02:00
Brian McGee
6df4705efc fix: move vendoring of nixpkgs and select into root devshell 2025-05-15 12:00:26 +01:00
Johannes Kirschbauer
45b12cdce6 Refactor(clan_lib): move nix bound classes out of the cli folder 2025-05-13 18:39:36 +02:00
Michael Hoang
c3842902ac cli: don't use select from clanLib 2025-04-28 12:52:00 +10:00
Jörg Thalheim
59125a8f42 devshell/clan-cli: fix CLAN_PROVIDED_PACKAGES having too many packages 2025-04-21 15:18:14 +02:00
Jörg Thalheim
435627d854 rename CLAN_STATIC_PROGRAMS -> CLAN_PROVIDED_PACKAGES 2025-04-16 18:27:01 +00:00
Sam Lehman
4fe822b340 devshells: name shells for clarity 2025-04-08 19:31:30 +00:00
Johannes Kirschbauer
12b88cd19b feat(classgen): convert only certain attributes 2025-03-29 14:22:34 +01:00
Qubasa
84b8838084 clan-cli: Add ruff to devShell again. Add missing type annotations 2025-01-29 19:16:34 +07:00
Qubasa
c6d5eb5037 clan-app: Fix default.nix 2025-01-11 10:52:22 +07:00
Michael Hoang
2ead8a8da8 clan-cli: fix PATH not correctly including runtime dependencies 2024-12-17 13:05:25 +11:00
Qubasa
a1a367c57c clan-cli: Refactor colors to a subset of colors that work in light and dark mode 2024-11-27 12:42:10 +01:00
Johannes Kirschbauer
08d26b9463 Inventory/schemas: move all schemas to legacyPackages 2024-10-09 13:27:09 +02:00
Jörg Thalheim
196f78d2da abort tests on python warning 2024-10-01 20:54:19 +02:00
Johannes Kirschbauer
8bda488425 CLI: use abstract schema to avoid module imports 2024-09-15 18:42:50 +02:00
Johannes Kirschbauer
1a81c1f84b API: remove all python dataclasses for clanModules (services) 2024-09-12 16:19:51 +02:00
Jörg Thalheim
a3699721c0 remove ipdb again
ipdb doesn't work with capsys and breakpoint
2024-08-21 15:00:47 +02:00
Johannes Kirschbauer
fbe27bfa0a Classgen: add mapped keys and more stuff 2024-07-18 21:58:36 +02:00
DavHau
430adc875a clan-cli: improve runtime dependency management
Many dependencies of clan-cli  are currently dynamically loaded via nix-shell on each execution.
This is nice, as it reduces the initial closure size of clan, but the overhead introduced by nix-shell piles up quickly, as some commands shell out many times during their lifetime. For example, when adding a secret git is called 10+ times.

This reduces the time of a test which adds a secret from around 50 seconds to 15 seconds.

- add run_cmd() as an alternative to nix_shell()
- introduce the concept of static dependencies which do not need to go through nix-shell
- static dependencies are defined at build time and included into the wrapper for clan-cli
- add package: clan-cli-full which statically ships all required dependencies

TODO: deprecate nix_shell() in favor of run_cmd()
2024-07-11 15:34:41 +07:00
DavHau
336e99b2a7 clan-cli tests: remove dynamic inclusion of helpers module
Dynamically extending the python path at runtime is bad for developer experience, as this is not understood by the text editor and therefore jump to definition etc. does not work.

-> Better to remove the dynamic inclusion and force developers to specify the import correctly.
2024-07-05 16:38:22 +07:00
DavHau
c9485fb3fd devShells: make all shells inherit from default shell
Currently, important tools from the default shell are lost as soon as select-shell is used to switch to another shell. select-shell itself, for example is missing, which makes it impossible to switch back to another shell.
2024-07-05 15:01:25 +07:00
Qubasa
b1dd5c2832 Add --ssh-pubkey FILE argument 2024-05-14 15:41:15 +02:00
Qubasa
240af17c2f select-shell: Fix breakage with previous shell.nix change 2024-03-25 00:32:03 +01:00
Qubasa
8dd6dc79cf clan-vm-manager: devshell doesn't require clan-cli derivation 2024-03-24 23:52:30 +01:00
Qubasa
d6d8a88549 clan-vm-manager: Working pytest skeleton. clan-cli: Fixing devshell depending on itself 2024-03-24 23:36:00 +01:00
Jörg Thalheim
ede4d3f6e5 re-format with nixfmt 2024-03-17 19:48:49 +01:00
Qubasa
999747c5fc Deleted everything webui 2023-12-14 18:47:14 +01:00
Jörg Thalheim
ce500066e9 clan-vm-manager: simplify shellHook 2023-11-23 15:30:44 +01:00
Jörg Thalheim
47471c666b clan-vm-manager: add nix package 2023-11-23 15:30:44 +01:00
Qubasa
ad4032e214 schemathesis: Add as runnable application instead of library to resolve httpx dependency collision issue 2023-11-20 17:14:12 +01:00
Qubasa
635de29d6a Fix incorrect machine name for shell.nix 2023-11-15 11:29:07 +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
Qubasa
a628934351 Removing find_git_repo 2023-10-27 19:26:03 +02:00
Qubasa
0be3dac289 nix fmt 2023-10-27 19:21:50 +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
9c8829c32f nix fmt 2023-10-27 19:19:45 +02:00
Qubasa
6d0deefa6b Added ipdb as breakpoint console. Improved logging. 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
DavHau
ca8dcf8a7b clan-cli/shell.nix: rename repo_root -> source 2023-10-23 16:15:46 +01:00
DavHau
41a0884acb clan-cli devShell: add editable install 2023-10-04 11:39:31 +02:00
DavHau
7b157b279f clan-cli: stop propagating build inputs, remove wrapper 2023-10-04 10:36:39 +02:00
Jörg Thalheim
676329aed9 clan-cli: symlink cli into an otherwise empty package
This avoids propagating unneeded python libraries
2023-09-28 12:19:16 +02:00
Jörg Thalheim
86378320be drop wonky ipdb PYTHONBREAKPOINT 2023-09-26 15:50:02 +02:00
DavHau
9825c179a8 impure-tests: migrate bash to pytest and fix stuff 2023-09-22 18:32:28 +02:00
lassulus
17520e2553 fix impure tests 2023-09-21 18:29:18 +02:00
Jörg Thalheim
584b6e2775 fix updating assets in devshell 2023-09-20 15:39:55 +02:00