Commit Graph

86 Commits

Author SHA1 Message Date
Qubasa
bd7a5694e2 clan-cli: Fix test_create::test_clan_create_api 2025-06-02 15:39:50 +02:00
DavHau
e81771a724 tests: test vars generation for all clan service tests 2025-05-31 12:17:52 +07:00
Johannes Kirschbauer
8eb2ad6c6d feat(nix_models): replace inventory model by holistic clan model 2025-05-28 14:02:43 +02:00
Johannes Kirschbauer
15ec2067a6 Test(InventoryPersistence): add persist integration tests 2025-05-21 17:55:43 +02:00
lassulus
b10682c7f7 clan-cli: move clan_cli.nix to clan_lib.nix 2025-05-19 18:40:36 +02:00
Brian McGee
78475e5a82 fix: move vendoring of nixpkgs and select into root devshell 2025-05-15 12:00:26 +01:00
Johannes Kirschbauer
c77a3b11a8 Refactor(clan_lib): move nix bound classes out of the cli folder 2025-05-13 18:39:36 +02:00
DavHau
93090b74e5 ci performance: add check to ensure nothing depends on the whole repo
Since this project is an ever growing monorepo, having derivations depending on the whole repo leads to bad CI performance, as the cache is busted on every commit.

-> We never want any derivations depend on the whole repo

...except: the test that tests that nothing depends on the whole repo, which is added by this commit.

For now only add this check to packages to allow contributors to build it locally.
We might want to add it to the CI later once all occurrences are fixed.
2025-04-30 13:17:33 +07:00
Michael Hoang
6c8ef6e9be cli: don't use select from clanLib 2025-04-28 12:52:00 +10:00
Michael Hoang
cc4b009f06 lib: move select.select -> select for backwards compat with old CLIs 2025-04-25 17:30:06 +10:00
lassulus
34ac45bd13 clan-cli flake-module: get select from new lib location 2025-04-25 16:26:45 +10:00
Jörg Thalheim
df08fea1c1 devshell/clan-cli: fix CLAN_PROVIDED_PACKAGES having too many packages 2025-04-21 15:18:14 +02:00
Jörg Thalheim
10cd98e158 rename CLAN_STATIC_PROGRAMS -> CLAN_PROVIDED_PACKAGES 2025-04-16 18:27:01 +00:00
Johannes Kirschbauer
cf273d2209 chore(clan/cli): remove explizit dependency on jsonschema converter.
Regenerating the classes from json schema as part of the clan/cli is a bit redundant since we need to vendor the classes by hand anyways
The user can also not practically override the inventory options
I would disable this for now; until we really need it.
We now solely rely on CI checks failing if the classes are out of sync
2025-04-10 22:58:30 +02:00
Qubasa
b3dcf7f641 clan-cli: Change shellcheck to shellcheck-minimal 2025-04-10 01:54:00 +02:00
Johannes Kirschbauer
a6a79e83a0 treewide(clanLib): rename all occurences of {clan-core,self}.lib to 'clanLib' 2025-04-09 11:32:46 +02:00
Johannes Kirschbauer
5fc62806b1 feat(classgen): convert only certain attributes 2025-03-29 14:22:34 +01:00
Qubasa
dc8bfab65d clan-cli: Fix templates not downloading template, Make templates use Flake cache, Fix flake cache exception on conditional attribute, add more tests 2025-03-19 10:30:52 +00:00
Jörg Thalheim
86e91c8604 cli: fix build on macOS 2025-02-10 17:41:50 +07:00
DavHau
3ec028d672 tests: reduce unnecessary rebuilds of several tests
Some test were referring to the whole source code via ${self} which amde them rebuild on every single commit.

This is not mitigated by introduceing `self.filter { include = [...]; }` allowin to a content addressed subset of the source code in tests.
2025-01-17 17:00:18 +07:00
Qubasa
8d4d98361d clan-app: Fix default.nix 2025-01-11 10:52:22 +07:00
DavHau
61576649ff vars: make all python tests work in nix sandbox
- generate a flake.lock file for each template by copying the clan-core flake.lock and modifying it

- call nix build with --store for tests inside the sandbox
2024-11-27 14:32:02 +07:00
Johannes Kirschbauer
326d3d977c Clan-ts-api: filter out reserved tags from typescript, library generates invalid types 2024-11-08 15:55:37 +01:00
Johannes Kirschbauer
15974d92fe Inventory/schemas: move all schemas to legacyPackages 2024-10-09 13:27:09 +02:00
Johannes Kirschbauer
0a5223a1f0 Inventory/schemas: use less schema versions 2024-10-09 13:27:09 +02:00
Jörg Thalheim
03c7d89255 remove unused lib.trace from flake 2024-10-09 12:37:21 +02:00
Johannes Kirschbauer
0addba0d20 Update: inventory classes check 2024-09-16 12:52:28 +00:00
Johannes Kirschbauer
ca79433aa9 CLI: use abstract schema to avoid module imports 2024-09-15 18:42:50 +02:00
Johannes Kirschbauer
c554d7ddfb UI: include inventory schema and generated types 2024-09-12 18:22:46 +02:00
Johannes Kirschbauer
39518d302b API: remove all python dataclasses for clanModules (services) 2024-09-12 16:19:51 +02:00
Johannes Kirschbauer
6a4c9e988b Clan-cli: fix class update instruction 2024-09-12 09:28:16 +02:00
Johannes Kirschbauer
aceae9aa1e API: types schema improve typescript performance 2024-09-02 18:03:44 +02:00
Johannes Kirschbauer
b015f1f123 PropagatedBuild inputs workaround 2024-07-26 15:23:25 +02:00
Johannes Kirschbauer
6d49f5c926 Commit generated code otherwise CI cannot check types 2024-07-19 09:52:14 +02:00
Johannes Kirschbauer
07965598f5 Classgen: add mapped keys and more stuff 2024-07-18 21:58:36 +02:00
Johannes Kirschbauer
7e84eaa4b3 Init: Autogenerate classes from nix interfaces 2024-07-18 19:14:12 +02:00
DavHau
75b969b1ad 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
3447a98bee vars: implement generating public variables via in_repo 2024-07-09 14:26:56 +07:00
DavHau
802f047341 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
Johannes Kirschbauer
8687801cee clan ui: setup typed api method 2024-05-20 19:34:49 +02:00
Qubasa
4f6d25160f Add --ssh-pubkey FILE argument 2024-05-14 15:41:15 +02:00
a-kenji
148a0c90cc clan-cli(docs): modularize in preparation for manpage generation 2024-05-14 12:18:37 +02:00
Johannes Kirschbauer
15dd4ea25f cli-docs: add automatic markdown cli docs 2024-05-07 13:26:33 +02:00
Jörg Thalheim
e296a3019d re-format with nixfmt 2024-03-17 19:48:49 +01:00
Qubasa
330ef00a7c Removed python deal. 2023-12-30 23:10:43 +01:00
Jörg Thalheim
0bdf55b09f use nix-unit from nixpkgs 2023-12-15 12:36:07 +01:00
Qubasa
7dc2c21517 Deleted everything webui 2023-12-14 18:47:14 +01:00
Qubasa
b319db0df9 Fixed democlan dep 2023-12-09 00:21:33 +01:00
Qubasa
136246de79 Removed democlan dependency 2023-12-09 00:19:30 +01:00
Qubasa
d4b8cef242 Added clan flakes inspect command. Improved ClanURI. Added democlan as dependency in flake.nix 2023-12-09 00:09:21 +01:00