Commit Graph

10781 Commits

Author SHA1 Message Date
DavHau
da6cd324f0 Merge pull request 'vars/performance: aggregate selects over all machines and generators' (#5402) from dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5402
2025-10-08 06:04:50 +00:00
DavHau
c5b96df7b0 vars/performance: aggregate selects over all machines and generators
This improves the performance of deployment, by aggregating uncached select calls for vars generate into two batches.
batch 1: Get all generators of all machines
batch 2: get all final scripts for generators which need to run
2025-10-08 13:00:20 +07:00
clan-bot
c4feeace31 Merge pull request 'Update clan-core-for-checks in devFlake' (#5424) from update-devFlake-clan-core-for-checks into main 2025-10-08 05:06:31 +00:00
clan-bot
6117b664ae Update clan-core-for-checks in devFlake 2025-10-08 05:02:02 +00:00
clan-bot
b8fdb48fd8 Merge pull request 'Update clan-core-for-checks in devFlake' (#5423) from update-devFlake-clan-core-for-checks into main 2025-10-08 00:06:18 +00:00
clan-bot
9165f7ccaf Update clan-core-for-checks in devFlake 2025-10-08 00:01:52 +00:00
a-kenji
8058a7c158 lib/instrospection: Skip either(oneOf)
For either(oneOf) types, we skip introspection as we cannot
determine which branch of the union was taken without more context
This *should* be safe, as it can currently mostly be triggered through
The `extraModules` setting of inventory modules.

Example:

```
importer.roles.default.extraModules = [
    ../../modules/nixos/common.nix
];
```

Error Message:

```
Traceback (most recent call last):
  File "/nix/store/zaz4r4fic03m4whgz46p5jjszzlkq694-clan-cli/lib/python3.13/site-packages/clan_lib/templates/handler.py", line 91, in machine_template
    yield dst_machine_dir
  File "/nix/store/zaz4r4fic03m4whgz46p5jjszzlkq694-clan-cli/lib/python3.13/site-packages/clan_cli/machines/create.py", line 95, in create_machine
    inventory_store.write(inventory, message=f"machine '{machine_name}'")
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/zaz4r4fic03m4whgz46p5jjszzlkq694-clan-cli/lib/python3.13/site-packages/clan_lib/persist/inventory_store.py", line 269, in write
    write_info = self._write_map()
  File "/nix/store/zaz4r4fic03m4whgz46p5jjszzlkq694-clan-cli/lib/python3.13/site-packages/clan_lib/persist/inventory_store.py", line 214, in _write_map
    current_priority = self._get_inventory_current_priority()
  File "/nix/store/zaz4r4fic03m4whgz46p5jjszzlkq694-clan-cli/lib/python3.13/site-packages/clan_lib/persist/inventory_store.py", line 206, in _get_inventory_current_priority
    return self._flake.select("clanInternals.inventoryClass.introspection")
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/zaz4r4fic03m4whgz46p5jjszzlkq694-clan-cli/lib/python3.13/site-packages/clan_lib/flake/flake.py", line 1129, in select
    self.get_from_nix([selector])
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/nix/store/zaz4r4fic03m4whgz46p5jjszzlkq694-clan-cli/lib/python3.13/site-packages/clan_lib/flake/flake.py", line 1054, in get_from_nix
    raise ClanSelectError(
    ...<3 lines>...
    ) from e
clan_lib.flake.flake.ClanSelectError: Error on: $ clan select 'clanInternals.inventoryClass.introspection'
  Reason: Yet Unsupported type: either
Removing left-over machine directory: /tmp/hyperconfig/machines/trooo
Error on: $ clan select 'clanInternals.inventoryClass.introspection'
  Reason: Yet Unsupported type: either

```

Closes: #5387
2025-10-07 22:58:51 +02:00
clan-bot
fed61f49f9 Merge pull request 'Update clan-core-for-checks in devFlake' (#5421) from update-devFlake-clan-core-for-checks into main 2025-10-07 20:06:46 +00:00
clan-bot
f1f05c7e6b Update clan-core-for-checks in devFlake 2025-10-07 20:01:53 +00:00
clan-bot
7597d1560f Merge pull request 'Update nixpkgs-dev in devFlake' (#5419) from update-devFlake-nixpkgs-dev into main 2025-10-07 15:06:44 +00:00
clan-bot
f739e1b66d Merge pull request 'Update clan-core-for-checks in devFlake' (#5418) from update-devFlake-clan-core-for-checks into main 2025-10-07 15:06:44 +00:00
clan-bot
5d3609aacd Update nixpkgs-dev in devFlake 2025-10-07 15:02:06 +00:00
clan-bot
7aa51d6bd7 Update clan-core-for-checks in devFlake 2025-10-07 15:01:48 +00:00
pinpox
af91ae8c7f Merge pull request 'Add internal services guide' (#5254) from internal-service-doc into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5254
2025-10-07 14:39:52 +00:00
pinpox
077bf55fd7 Add internal services guide 2025-10-07 16:37:22 +02:00
hsjobeki
1f6dcb910f Merge pull request 'clan: ignore nixpkgs version checks in core' (#5416) from fix-override into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5416
2025-10-07 14:08:30 +00:00
Johannes Kirschbauer
6363d9c99c clan: ignore nixpkgs version checks in core 2025-10-07 16:03:56 +02:00
Kenji Berthold
fd30dbd1be Merge pull request 'docs: Fix typos' (#5415) from kenji/ke-docs-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5415
2025-10-07 12:15:11 +00:00
a-kenji
ba4dc36ddf docs: Fix typos 2025-10-07 14:09:38 +02:00
Mic92
5abac04b15 Merge pull request 'network: fix generator cleanup in nested context manager' (#5412) from no-leaks into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5412
2025-10-07 11:51:38 +00:00
Kenji Berthold
8c84d32b13 Merge pull request 'docs: document vars generation requirement for service tests' (#5409) from kenji/ke-document-update-vars into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5409
2025-10-07 11:48:46 +00:00
a-kenji
c083548795 docs: document vars generation requirement for service tests
Add documentation explaining that services defining vars need to run
update-vars before tests can execute. Clarifies how `clan.directory`
determines where vars are generated and loaded from during testing.

Closes: #5380
2025-10-07 13:45:39 +02:00
Kenji Berthold
11af5c3471 Merge pull request 'docs: docs-integrity enable UTF-8 support' (#5413) from kenji/ke-html-proofer into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5413
2025-10-07 11:23:06 +00:00
a-kenji
dac8a40b9f docs: docs-integrity enable UTF-8 support 2025-10-07 13:13:55 +02:00
Jörg Thalheim
204f9d09e3 network: refactor get_best_remote to class-based context manager
Resolves the "RuntimeError: generator didn't stop after throw()" issue
by replacing the generator-based @contextmanager with an explicit class.

This maintains backward compatibility through a factory function.
2025-10-07 13:05:20 +02:00
Mic92
668067080d Merge pull request 'sops: don't leak secret key in debug logs' (#5411) from no-leaks into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5411
2025-10-07 10:00:47 +00:00
Jörg Thalheim
10ed2cc7f7 sops: don't leak secret key in debug logs 2025-10-07 11:31:12 +02:00
Kenji Berthold
060b22cf21 Merge pull request 'docs: Fix nixpkgs hierarchy' (#5410) from kenji/ke-qa-nixpkgs-input into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5410
2025-10-07 08:50:00 +00:00
a-kenji
965dddfee1 docs: Fix nixpkgs hierarchy 2025-10-07 10:34:22 +02:00
clan-bot
6e5d74ba22 Merge pull request 'Update nixpkgs-dev in devFlake' (#5408) from update-devFlake-nixpkgs-dev into main 2025-10-07 05:06:29 +00:00
clan-bot
4257f47a1a Merge pull request 'Update clan-core-for-checks in devFlake' (#5407) from update-devFlake-clan-core-for-checks into main 2025-10-07 05:06:22 +00:00
clan-bot
72b64a8b70 Update nixpkgs-dev in devFlake 2025-10-07 05:02:09 +00:00
clan-bot
e46e0543cd Update clan-core-for-checks in devFlake 2025-10-07 05:01:51 +00:00
clan-bot
0de79962ea Merge pull request 'Update clan-core-for-checks in devFlake' (#5406) from update-devFlake-clan-core-for-checks into main 2025-10-07 00:06:50 +00:00
clan-bot
6209816115 Update clan-core-for-checks in devFlake 2025-10-07 00:01:50 +00:00
clan-bot
ec21cda0cf Merge pull request 'Update clan-core-for-checks in devFlake' (#5404) from update-devFlake-clan-core-for-checks into main 2025-10-06 20:06:46 +00:00
clan-bot
8a29d102cd Merge pull request 'Update nixpkgs-dev in devFlake' (#5405) from update-devFlake-nixpkgs-dev into main 2025-10-06 20:06:28 +00:00
clan-bot
22787e7c93 Update nixpkgs-dev in devFlake 2025-10-06 20:02:12 +00:00
clan-bot
19fd72e075 Update clan-core-for-checks in devFlake 2025-10-06 20:01:53 +00:00
clan-bot
50be33088c Merge pull request 'Update clan-core-for-checks in devFlake' (#5403) from update-devFlake-clan-core-for-checks into main 2025-10-06 15:06:19 +00:00
clan-bot
6e7a67c830 Update clan-core-for-checks in devFlake 2025-10-06 15:01:51 +00:00
DavHau
1cb7c7d25f Merge pull request 'tests: disable state-version generation in all python tests' (#5399) from dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5399
2025-10-06 10:13:02 +00:00
DavHau
43b1744528 tests: disable state-version generation in all python tests
This improves the performance of tests, as there are less vars operations to perform.
2025-10-06 17:08:42 +07:00
clan-bot
27d1dd4400 Merge pull request 'Update clan-core-for-checks in devFlake' (#5400) from update-devFlake-clan-core-for-checks into main 2025-10-06 10:06:25 +00:00
clan-bot
5d27af51d8 Update clan-core-for-checks in devFlake 2025-10-06 10:01:52 +00:00
clan-bot
c737271585 Merge pull request 'Update clan-core-for-checks in devFlake' (#5398) from update-devFlake-clan-core-for-checks into main 2025-10-06 05:07:22 +00:00
clan-bot
f504a63e93 Update clan-core-for-checks in devFlake 2025-10-06 05:01:53 +00:00
clan-bot
ca53d14656 Merge pull request 'Update clan-core-for-checks in devFlake' (#5397) from update-devFlake-clan-core-for-checks into main 2025-10-06 00:09:06 +00:00
clan-bot
09d8a2b3a9 Update clan-core-for-checks in devFlake 2025-10-06 00:01:51 +00:00
Michael Hoang
2a67b09f51 Merge pull request 'test-fixtures: move to devFlake' (#5277) from push-mmqvttmrxtlk into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5277
2025-10-05 21:52:33 +00:00