Commit Graph

2224 Commits

Author SHA1 Message Date
Jörg Thalheim
f3cdcef523 no longer require controlmaster for interactive ssh
we only run one ssh command, so control master is not needed
2025-05-28 16:21:30 +02:00
Jörg Thalheim
7b8b23b39b ssh/remote: Improve error message if _control_path_dir is not set 2025-05-28 16:21:30 +02:00
Jörg Thalheim
2ef379b4df update/upload_sources remove ssh_control_master again from upload_sources 2025-05-28 16:21:30 +02:00
Jörg Thalheim
cedc5113ea add sudo_askpass_proxy 2025-05-28 16:21:30 +02:00
Jörg Thalheim
6839b9616d ssh/remote: make sure we also cleanup clan-ssh in the error case 2025-05-28 16:21:30 +02:00
Jörg Thalheim
37840dd203 remove unused method 2025-05-28 16:21:30 +02:00
Johannes Kirschbauer
07a574cbb0 Tests(inventoryStore): add fixture, make extensible 2025-05-28 15:06:17 +02:00
Johannes Kirschbauer
4b5880d1cb Fix(machines/create): use 'InventorySnapshot' as init argument
Inventory as a model is generally not json serializable
InventorySnapshot is the return value of InventoryStore.{read, write}
And should be used in API calls, because the other fields might not be compatible in general
2025-05-28 14:09:45 +02:00
Johannes Kirschbauer
104343a334 feat(InventoryStore): return a restricted view of the inventory 2025-05-28 14:04:34 +02:00
Johannes Kirschbauer
bac3e6c2b2 Chore: update clan nix_models 2025-05-28 14:03:23 +02:00
Johannes Kirschbauer
d482e22610 chore(nix_models): migrate import to use exported clan models 2025-05-28 14:03:22 +02:00
Johannes Kirschbauer
1ef2e13c85 feat(nix_models): replace inventory model by holistic clan model 2025-05-28 14:02:43 +02:00
Johannes Kirschbauer
db31b91401 Fix(inventoryStore): use 'nix_eval' wrapper to set the store correct 2025-05-28 11:34:16 +02:00
Johannes Kirschbauer
3e160d6392 Fix(clan_cli): filter tests files from source 2025-05-28 11:34:12 +02:00
Johannes Kirschbauer
84622222d8 Fix(tests): fix failing pytests 2025-05-28 11:01:54 +02:00
Johannes Kirschbauer
4c6063c75e Tests(inventoryStore): fixup tests to run in ci 2025-05-28 10:42:47 +02:00
Johannes Kirschbauer
a49466e1a9 Feat(inventoryStore): add possibility to turn off output filtering 2025-05-28 10:42:47 +02:00
Johannes Kirschbauer
8ea35b2b99 Tests(clan_lib): enable clan_lib pytests not marked with_core 2025-05-28 10:42:47 +02:00
Johannes Kirschbauer
dd9ea44770 refactor(persist/utils): rename apply_patch to 'set_value_by_path' 2025-05-28 10:16:48 +02:00
Johannes Kirschbauer
63733f2c14 Fix(test): migrate machine cli command tests to use the new functions 2025-05-27 17:57:08 +02:00
Johannes Kirschbauer
f591ac0c32 Feat(inventoryStore): add 'invalidate_cache' to the Flake protocol 2025-05-27 17:56:35 +02:00
Johannes Kirschbauer
e6d1f71907 Feat(inventory): remove legacy action functions
Inventory should only and always be accessed through the inventory store.
Manually reading and writing to the json file is highly insecure
2025-05-27 17:20:04 +02:00
Johannes Kirschbauer
c32d196428 Fix: configure deferred setting module path correctly 2025-05-27 16:31:54 +02:00
Johannes Kirschbauer
2312a65c17 Chore: rename secrets.get_machine to avoid ambiguity 2025-05-26 17:52:46 +02:00
Johannes Kirschbauer
90d9dbb242 Refactor(lib/inventory): move machine actions into clan_lib/machines/actions.py 2025-05-26 17:51:12 +02:00
hsjobeki
91a6f814d6 Merge pull request 'Feat(persist): add support for deferredModule read/write' (#3752) from deferredModule-serde into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3752
2025-05-26 14:18:53 +00:00
Johannes Kirschbauer
55195e57e0 fix(morph/test): temporary workaround for morph test 2025-05-26 16:06:12 +02:00
Johannes Kirschbauer
14701fda01 chore: add todo comments for template logic in create machine 2025-05-26 16:05:20 +02:00
Qubasa
b85aead33c clan-cli: Fix too long path for socket issue #3756 2025-05-25 22:16:51 +02:00
Johannes Kirschbauer
fe933d8eb7 Fix(machines/create): check if machine is already created 2025-05-23 22:31:06 +02:00
Johannes Kirschbauer
c8588eddb6 Fix(machines/create): always add 'deploy.targetHost'
Rationale: not passing the value, is equivalent to deleting a value from the inventory store
See: 'delete_by_path'
deploy.targetHost has a default of null (None)
2025-05-23 22:07:09 +02:00
Johannes Kirschbauer
a7f4927e0c test(persist/inventory): add test for adding deferredModule
This feature will allow us to read/write to 'settings' of service
'instances' which are of type deferredModule.
Usually a deferredModule needs to be evaulated, but because we use our
own type, which forces some constraints, we can safely perform read and
write
2025-05-23 21:49:16 +02:00
Johannes Kirschbauer
9cea8e8901 fix(persist/delete): delete explizitly 2025-05-23 21:47:12 +02:00
Johannes Kirschbauer
0bf183b73b fix(tests): use inventory store to interact with the inventory 2025-05-23 21:46:35 +02:00
Johannes Kirschbauer
4d9202551f feat(persist/inventory): add transformation and filtering to support deferredModules 2025-05-23 21:45:52 +02:00
Johannes Kirschbauer
1b11ecf37a fixes(persist/util): fix some expected error messages in tests 2025-05-23 21:43:49 +02:00
Johannes Kirschbauer
38b2f0ca0f test(persist/util): add test for adding empty submodules 2025-05-23 21:43:09 +02:00
Johannes Kirschbauer
040e12c3e9 refactor(persist/util): improve calc_patches 2025-05-23 21:42:35 +02:00
Johannes Kirschbauer
9572f36175 feat(persist/util): init parent_is_dict
Check if a parent value is of type dict
This utility is helpfull for cross checking of flattened dicts
2025-05-23 21:41:34 +02:00
Johannes Kirschbauer
598902a766 chore(inventory): find_deleted_paths rename variables 2025-05-23 21:40:02 +02:00
Johannes Kirschbauer
29f1c6ee0a fix(inventory/store): keep empty dicts as leafs 2025-05-23 21:39:23 +02:00
Johannes Kirschbauer
3f82ceddb3 test(inventory/store): clean up simple test 2025-05-23 21:38:16 +02:00
Johannes Kirschbauer
6cd2c1ce1a feat(inventory/store): init path_match utility 2025-05-23 21:36:14 +02:00
lassulus
c7384a60c2 clan_lib flake_test: fix on darwin 2025-05-23 12:29:34 +02:00
Qubasa
8b1968cca6 clan-cli: Move Machine object to clan_lib 2025-05-22 19:11:19 +02:00
Qubasa
d42dcb0e2a clan-cli: Fix ctrl+c cancelling tasks 2025-05-22 15:01:58 +02:00
Qubasa
e14f30bdc0 clan-cli: Rename Host -> Remote move to clan_lib and mark as frozen 2025-05-22 14:08:27 +02:00
Mic92
91994445ff Merge pull request 'fix build_host not beeing applied' (#3740) from fix-build-host into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3740
2025-05-22 11:25:20 +00:00
Jörg Thalheim
e275bb20bc fix build_host not beeing applied 2025-05-22 00:22:04 +02:00
lassulus
c64895fdff clan-cli: split clan into cli and lib 2025-05-21 20:28:41 +02:00