Merge branch 'feature/updater' into feature/store-i18n

68 conflicts, resolved per hunk; resolutions agreed with the Updater
session were applied as agreed:

- svc-db-postgres (superuser password script and core) and
  sys-svc-rdbms realign_dedicated_db: updater's argv/stdin redesign with
  expand_argument_vars: false, nested into store-i18n's block structure.
- svc-db-redis 01_init: store-i18n's ACL password on stdin.
- sys-svc-proxy forwarded.conf.j2: store-i18n's handover-aware file,
  without the forwarded_base include (Host and X-Forwarded-Proto would
  be sent twice); forwarded_base serves the inline consumers, e.g.
  web-app-seaweedfs nginx.conf.j2.
- basic.conf.j2 and web-app-openproject proxy.conf.j2: issuer redirect,
  then handover, else updater's location/sso_acl.conf.j2; the
  server-level webserver_extra_configuration hook stays.
- web-app-keycloak: updater's admin-REST settings step and renumbered
  update steps; update/01_client.yml removed; store-i18n's design step
  and LDAP block kept; a73435cc9d arrived through rename detection.
- web-app-nextcloud OpenProject provisioning: updater's rewrite, all
  credentials on the Ruby runner's stdin.
- web-app-semaphore: store-i18n's canonical web root (a1d7835863).
- Role READMEs: no generated Cosmos/Architecture/Quick Setup/Credits
  sections; desk-* paths resolved to the dsk-* renames.

Integration fixes for what merged cleanly but did not fit together:

- web-app-matrix ansible vars: drop updater's second
  matrix_client_element_configuration_extension_json, which silently
  overrode store-i18n's design-aware value.
- url.origin instead of a stripped url.base in 19 places store-i18n
  added since 44aaa68924, same lookup targets (the double-slash lint).
- Package batch (18ea75049e, cb4d340de9): installs the deploy-start
  batch covers are removed (caffeine, cursor, blender, npm in dsk-gnt-*,
  with shared references), the rest carry batch: false and a nocheck
  with the verified reason (PyPI fallback, before the batch, vendor
  repository, configured flavor only, addon gate); dev-npm references
  the root npm id.
- sys-token-store write_many.yml: store-i18n's change-gated block and
  IS_SWARM_MODE.
- web-app-openproject: IS_COMPOSE_MODE in 02_migrate/run.yml; the
  seeded-admin lock (ccbf8f168d) ported into 04_admin/provision.yml and
  covered by the admin-state digest.
- Bucket policy (3b4ac40df5 and follow-ups) moved to web-svc-seaweedfs,
  where store-i18n's object store lives; the S3 admin secret travels on
  stdin instead of a task-level environment.
- act workflow.sh: no Exception-labelled comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5.5 committed 2026-10-29 02:28:16 +01:00
commit c9e7f950d9
533 files changed
+14274 -1833

No files matched your search

@@ -0,0 +1,34 @@
from __future__ import annotations
import unittest
from types import SimpleNamespace
from unittest import mock
from cli.administration.deploy.development.deploy.run import _run_deploy
class TestRunDeploy(unittest.TestCase):
def deploy_cmd(self) -> list[str]:
compose = mock.Mock()
compose.exec.return_value = SimpleNamespace(returncode=0)
_run_deploy(
compose,
deploy_ids=["web-app-cst-demo"],
debug=False,
passthrough=[],
inventory_dir="/etc/inventories/dev",
container_name="infinito",
)
return compose.exec.call_args.args[0]
def test_deploys_the_generated_inventory(self):
cmd = self.deploy_cmd()
self.assertEqual("/etc/inventories/dev/devices.yml", cmd[3])
self.assertEqual(["--id", "web-app-cst-demo"], cmd[-2:])
def test_generated_inventory_keeps_the_placed_custom_roles(self):
self.assertIn("--skip-pull", self.deploy_cmd())
if __name__ == "__main__":
unittest.main()
@@ -9,7 +9,9 @@ from __future__ import annotations
import os
import re
import tempfile
import unittest
from pathlib import Path
from unittest.mock import patch
from cli.administration.deploy.development.env import (
@@ -35,6 +37,7 @@ _LOCAL_PRIMARY = {
"INFINITO_TOOLS_MODELS_HOST_PATH": "/var/cache/infinito/core/cache/models",
"INFINITO_TOOLS_S1_PORT": "8096",
"INFINITO_TOOLS_TRANSLATE_PORT": "8101",
"INFINITO_EXTRA_MOUNTS": "",
}
_WORKTREE = {
@@ -168,6 +171,35 @@ class TestComposeFileArgs(unittest.TestCase):
def test_the_models_path_gates_the_tools_lane_too(self) -> None:
self.assertNotIn("compose/tools.override.yml", compose_file_args())
def test_extra_mounts_append_their_generated_override(self) -> None:
with (
tempfile.TemporaryDirectory() as mount,
patch.dict(
os.environ,
{**_LOCAL_PRIMARY, "INFINITO_EXTRA_MOUNTS": mount},
clear=False,
),
patch(
"cli.administration.deploy.development.extra_mounts.write_mounts_override",
return_value="build/compose/extra-mounts.override.yml",
) as write,
):
args = compose_file_args()
self.assertEqual(write.call_args.args[1], [Path(mount)])
self.assertEqual(args[-2:], ["-f", "build/compose/extra-mounts.override.yml"])
def test_an_entry_that_is_no_directory_stops_the_stack_naming_it(self) -> None:
with (
patch.dict(
os.environ,
{**_LOCAL_PRIMARY, "INFINITO_EXTRA_MOUNTS": "/nonexistent/gui"},
clear=False,
),
self.assertRaises(SystemExit) as ctx,
):
compose_file_args()
self.assertIn("/nonexistent/gui", str(ctx.exception.code))
class TestToolsLaneGateCoversItsGuards(unittest.TestCase):
def test_every_guard_the_override_adds_is_gated(self) -> None:
@@ -0,0 +1,65 @@
from __future__ import annotations
import tempfile
import unittest
from pathlib import Path
from cli.administration.deploy.development.extra_mounts import (
OVERRIDE,
parse_mounts,
write_mounts_override,
)
from utils.cache.yaml import load_yaml
class TestParseMounts(unittest.TestCase):
def test_existing_absolute_directories_are_returned(self) -> None:
with (
tempfile.TemporaryDirectory() as first,
tempfile.TemporaryDirectory() as second,
):
self.assertEqual(
parse_mounts(f"{first}, {second},"), [Path(first), Path(second)]
)
def test_empty_value_mounts_nothing(self) -> None:
self.assertEqual(parse_mounts(""), [])
def test_relative_entry_is_rejected_naming_it(self) -> None:
with self.assertRaises(SystemExit) as ctx:
parse_mounts("relative/dir")
self.assertIn("relative/dir", str(ctx.exception.code))
def test_missing_directory_is_rejected_naming_it(self) -> None:
with tempfile.TemporaryDirectory() as tmp, self.assertRaises(SystemExit) as ctx:
parse_mounts(str(Path(tmp) / "absent"))
self.assertIn("absent", str(ctx.exception.code))
class TestWriteMountsOverride(unittest.TestCase):
def test_each_directory_is_bound_read_only_at_its_own_path(self) -> None:
with tempfile.TemporaryDirectory() as repo:
relative = write_mounts_override(Path(repo), [Path("/srv/gui")])
override = load_yaml(Path(repo) / relative)
self.assertEqual(relative, OVERRIDE)
self.assertEqual(
override,
{
"services": {
"infinito": {
"volumes": [
{
"type": "bind",
"source": "/srv/gui",
"target": "/srv/gui",
"read_only": True,
}
]
}
}
},
)
if __name__ == "__main__":
unittest.main()