From 1585e056fc1552a2a6fdfc961ba657ced9a06a35 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 8 Oct 2026 10:14:11 +0200 Subject: [PATCH 01/16] feat(update): let a declared version source own the whole pin A pin that names its own upstream in an update: block was still collected by the image updater or, for a ref, by the repository updater. Those raise it to the newest tag of its registry or repository, which for a component of a release is not the release's value. A tag built from several upstream values, such as -, could not be resolved at all: the resolver takes one capture and keeps a pin on its suffix. The image updater now skips a version and the repository updater a ref that declares a source for itself. An http_regex source accepts a template over the pattern's named groups, and a templated pin moves whenever the assembled value changes, its suffix included. Co-Authored-By: Claude Opus 5.5 (1M context) --- cli/contributing/update/README.md | 23 +++++++- tests/unit/python/utils/update/test_docker.py | 42 ++++++++++++++- .../python/utils/update/test_repository.py | 24 +++++++++ tests/unit/python/utils/update/test_source.py | 54 +++++++++++++++++++ utils/update/base.py | 50 +++++++++++++++++ utils/update/docker.py | 21 ++++++++ utils/update/repository.py | 12 ++++- utils/update/source.py | 31 ++++++----- 8 files changed, 240 insertions(+), 17 deletions(-) diff --git a/cli/contributing/update/README.md b/cli/contributing/update/README.md index 00eff7b60f..27e5ba032e 100644 --- a/cli/contributing/update/README.md +++ b/cli/contributing/update/README.md @@ -21,7 +21,9 @@ stalwart: ``` `key` names the pinned key and defaults to `version`; an entity with several -pins declares a list of such blocks. Types: +pins declares a list of such blocks. An `image` + `version` pin that declares a +source for `version` is bumped from that source alone, the Docker updater skips +it. Types: | `type` | Fields | Reads | | --------------- | --------------------- | -------------------------------------- | @@ -35,6 +37,25 @@ pins declares a list of such blocks. Types: on Docker Hub), `strip: true` removes it again so a pin without the upstream's `v` stays without it. +A `repository` + `ref` pin that declares a source with `key: ref` is bumped +from that source alone, the repository updater skips it. + +An `http_regex` source with a `template` fills it with the pattern's named +groups instead of taking the first group, for a tag built from several upstream +values: + +```yaml +freeswitch: + version: "v1.10.12-v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: 'repos/bigbluebutton (?Pv[0-9.]+)\nrepos/freeswitch (?Pv[0-9.]+)' + template: "{freeswitch}-{bbb}" +``` + +A templated pin moves whenever the assembled value changes, its suffix included. + The pinned value is a semver such as `v1.0.5`, `26.04.4.2.1` or `2.4.0p32`. A moving tag behind an `update:` block, or as the `version` of a monitored addon, fails `tests/lint/ansible/services/test_version_keys.py`. diff --git a/tests/unit/python/utils/update/test_docker.py b/tests/unit/python/utils/update/test_docker.py index 4fac5a7802..b44f72ef2a 100644 --- a/tests/unit/python/utils/update/test_docker.py +++ b/tests/unit/python/utils/update/test_docker.py @@ -5,7 +5,33 @@ import unittest from pathlib import Path from utils.cache.files import read_text -from utils.update.docker import _registry_cursor, update_config_versions +from utils.roles.mapping import ROLE_FILE_META_SERVICES +from utils.update.docker import ( + _registry_cursor, + collect_entries, + sourced_services, + update_config_versions, +) + +SOURCED = """bundled: + image: example/app + version: v1.0.0 + update: + type: http_regex + url: https://example.invalid/bundle + pattern: "app:(v[0-9.]+)" +tracked: + image: example/side + version: v2.0.0 + other_version: v3.0.0 + update: + - key: other_version + type: git_tags + repository: https://example.invalid/side.git +plain: + image: example/plain + version: v4.0.0 +""" class TestRegistryCursor(unittest.TestCase): @@ -16,6 +42,20 @@ class TestRegistryCursor(unittest.TestCase): self.assertIsNone(_registry_cursor("19.1.1")) +class TestDeclaredSource(unittest.TestCase): + def test_a_version_with_its_own_source_is_left_to_that_source(self) -> None: + root = Path(tempfile.mkdtemp()) + config = root / "roles" / "web-app-example" / ROLE_FILE_META_SERVICES + config.parent.mkdir(parents=True) + config.write_text(SOURCED, encoding="utf-8") + + self.assertEqual(sourced_services(config), {"bundled"}) + self.assertEqual( + sorted(entry.service for entry in collect_entries(root)), + ["plain", "tracked"], + ) + + class TestUpdateDocker(unittest.TestCase): def test_update_config_versions_updates_only_target_services(self) -> None: original = """moodle: diff --git a/tests/unit/python/utils/update/test_repository.py b/tests/unit/python/utils/update/test_repository.py index 8a02846242..f51d73927d 100644 --- a/tests/unit/python/utils/update/test_repository.py +++ b/tests/unit/python/utils/update/test_repository.py @@ -76,6 +76,30 @@ class TestWalkRepoRefPairs(unittest.TestCase): self.assertEqual(len(pairs), 1) self.assertEqual(pairs[0][0], ("both",)) + def test_a_ref_with_its_own_source_is_left_to_that_source(self) -> None: + source = {"type": "http_regex", "url": "https://example.invalid/tags"} + data = { + "sourced": { + "repository": "https://example.invalid/a.git", + "ref": "v1.0.0", + "update": {**source, "key": "ref"}, + }, + "listed": { + "repository": "https://example.invalid/b.git", + "ref": "v2.0.0", + "update": [{**source, "key": "ref"}], + }, + "other-key": { + "repository": "https://example.invalid/c.git", + "ref": "v3.0.0", + "update": {**source, "key": "app_version"}, + }, + } + + pairs = list(walk_repo_ref_pairs(data, ())) + + self.assertEqual([pair[0] for pair in pairs], [("other-key",)]) + def test_walks_lists(self) -> None: data = { "repos": [ diff --git a/tests/unit/python/utils/update/test_source.py b/tests/unit/python/utils/update/test_source.py index a4043f28e5..8c977795c1 100644 --- a/tests/unit/python/utils/update/test_source.py +++ b/tests/unit/python/utils/update/test_source.py @@ -84,6 +84,30 @@ update: } +COMPOUND = """\ +--- +bundle: + image: example/part + version: "v1.10.12-v3.0.23" + update: + type: http_regex + url: https://example.test/tags + pattern: 'core (?Pv[0-9.]+)\\npart (?Pv[0-9.]+)' + template: "{part}-{core}" +""" + +SUFFIXED = """\ +--- +bundle: + image: example/part + version: "v1.10.12-v3.0.23" + update: + type: http_regex + url: https://example.test/tags + pattern: 'part (v[0-9.]+-v[0-9.]+)' +""" + + def _repo(services: str = SERVICES) -> Path: tmp = Path(tempfile.mkdtemp()) config = tmp / "roles" / "web-app-example" / ROLE_FILE_META_SERVICES @@ -152,6 +176,36 @@ class TestOutdated(unittest.TestCase): self.assertEqual(module.outdated([self._entry(root)], root), []) +class TestTemplate(unittest.TestCase): + def _outdated(self, services: str, upstream: str) -> list[str]: + root = _repo(services) + with mock.patch.object(module, "_get", return_value=upstream.encode()): + updates = module.outdated(module.collect_entries(root), root) + return [update.latest for update in updates] + + def test_a_template_assembles_the_tag_from_several_upstream_values(self) -> None: + self.assertEqual( + self._outdated(COMPOUND, "core v3.0.39\npart v1.11.3\n"), + ["v1.11.3-v3.0.39"], + ) + + def test_a_templated_tag_moves_when_only_its_suffix_changed(self) -> None: + self.assertEqual( + self._outdated(COMPOUND, "core v3.0.39\npart v1.10.12\n"), + ["v1.10.12-v3.0.39"], + ) + + def test_an_unchanged_or_older_templated_tag_reports_nothing(self) -> None: + self.assertEqual(self._outdated(COMPOUND, "core v3.0.23\npart v1.10.12\n"), []) + self.assertEqual(self._outdated(COMPOUND, "core v3.0.23\npart v1.9.0\n"), []) + + def test_without_a_template_a_changed_suffix_is_another_flavour(self) -> None: + self.assertEqual(self._outdated(SUFFIXED, "part v1.11.3-v3.0.39\n"), []) + self.assertEqual( + self._outdated(SUFFIXED, "part v1.11.3-v3.0.23\n"), ["v1.11.3-v3.0.23"] + ) + + class TestAddons(unittest.TestCase): def test_only_a_declared_or_github_released_addon_pin_is_collected(self) -> None: entries = module.collect_entries(_addon_repo()) diff --git a/utils/update/base.py b/utils/update/base.py index 892cbd7be3..8d17c89616 100644 --- a/utils/update/base.py +++ b/utils/update/base.py @@ -92,6 +92,40 @@ def latest_semver(tags: list[str], depth: int, flavor: str = "") -> str | None: return max(candidates, key=version_key, default=None) +def captured_versions(body: str, pattern: str, template: str = "") -> list[str]: + """Return the version every match of a pattern names. + + Args: + body: text to search. + pattern: regular expression; its first group is the version. + template: when set, a ``str.format`` template over the pattern's named + groups that assembles the version instead, for a tag built from + several upstream values. + """ + return [ + template.format(**match.groupdict()) if template else match.group(1) + for match in re.finditer(pattern, body) + ] + + +def newer_version(current: str, found: list[str], assembled: bool) -> str | None: + """Return the version *current* should move to, or ``None``. + + Args: + current: the pinned version. + found: every version the upstream offers. + assembled: *found* was built from several upstream values, so a + changed suffix is a move and not another flavour. + """ + if assembled: + newest = max(filter(is_semver, found), key=version_key, default=None) + moved = newest not in (None, current) + else: + newest = latest_semver(found, version_depth(current), version_flavor(current)) + moved = bool(newest) and version_key(current) != version_key(newest) + return newest if moved and version_key(current) <= version_key(newest) else None + + def resolve_max_fetch_workers() -> int: return int(os.environ["INFINITO_WORKER_FETCH"]) @@ -105,3 +139,19 @@ def is_maintained(roles_root: Path, role: str) -> bool: """ lifecycle = get_role_lifecycle(roles_root / role, role_name=role) return lifecycle not in UNMAINTAINED_LIFECYCLES + + +def declares_source(config: object, key: str) -> bool: + """Report whether a services entity names its own upstream for a pin. + + Args: + config: one entity of ``meta/services.yml``. + key: the pinned key; an ``update:`` block without ``key`` names + ``version``. + """ + declared = config.get("update") if isinstance(config, dict) else None + sources = declared if isinstance(declared, list) else [declared] + return any( + isinstance(source, dict) and source.get("key", "version") == key + for source in sources + ) diff --git a/utils/update/docker.py b/utils/update/docker.py index 65af50cd0d..7c44bed6bf 100644 --- a/utils/update/docker.py +++ b/utils/update/docker.py @@ -8,6 +8,9 @@ walker that rewrites the matching ``version:`` line. Suppress a check by placing ``# nocheck: docker-version`` on the line directly above the ``version:`` key. + +A ``version`` that names its own upstream in an ``update:`` block belongs to +:mod:`utils.update.source` and is not collected here. """ from __future__ import annotations @@ -28,6 +31,7 @@ import yaml from utils.annotations.suppress import is_suppressed_at from utils.cache.files import read_text +from utils.cache.yaml import load_yaml from utils.docker.image.discovery import iter_role_images from utils.docker.image.ref import ( DOCKER_HUB_REGISTRIES, @@ -38,6 +42,7 @@ from utils.docker.image.ref import ( from utils.docker.registry import fetch_registry_tags from utils.roles.mapping import ROLE_FILE_META_SERVICES from utils.update.base import ( + declares_source, is_maintained, is_semver, latest_semver, @@ -265,6 +270,20 @@ def suppressed_services(config_path: Path) -> set[str]: return names +def sourced_services(config_path: Path) -> set[str]: + """Return service names whose ``version`` declares its own upstream. + + Args: + config_path: a role's ``meta/services.yml``. + """ + services = load_yaml(str(config_path)) or {} + return { + str(service) + for service, config in services.items() + if declares_source(config, "version") + } + + def collect_entries(repo_root: Path) -> list[DockerImageVersionEntry]: roles_root = repo_root / "roles" entries: list[DockerImageVersionEntry] = [] @@ -280,6 +299,8 @@ def collect_entries(repo_root: Path) -> list[DockerImageVersionEntry]: config_path = roles_root / ref.role / ROLE_FILE_META_SERVICES if ref.service in suppressed_services(config_path): continue + if ref.service in sourced_services(config_path): + continue if ref.registry == "docker.io": image = ref.name diff --git a/utils/update/repository.py b/utils/update/repository.py index c0511a362c..d517cb0876 100644 --- a/utils/update/repository.py +++ b/utils/update/repository.py @@ -17,6 +17,9 @@ reused for every entry pointing at the same repo. Suppress a check by placing ``# nocheck: repository-version`` on the line directly above the `ref:` key. + +A `ref:` that names its own upstream in an ``update:`` block belongs to +:mod:`utils.update.source` and is not collected here. """ from __future__ import annotations @@ -32,6 +35,7 @@ from utils.cache.files import read_text from utils.cache.yaml import load_yaml_any from utils.roles.mapping import ROLE_DIR_META_ADDONS, ROLE_FILE_META_SERVICES from utils.update.base import ( + declares_source, is_maintained, is_semver, latest_semver, @@ -78,7 +82,13 @@ def walk_repo_ref_pairs( if isinstance(node, dict): repo = node.get("repository") ref = node.get("ref") - if isinstance(repo, str) and repo and isinstance(ref, str) and ref: + if ( + isinstance(repo, str) + and repo + and isinstance(ref, str) + and ref + and not declares_source(node, "ref") + ): yield (path, repo.strip(), ref.strip()) for key, value in node.items(): if key in ("repository", "ref"): diff --git a/utils/update/source.py b/utils/update/source.py index cf6d4bd546..6215e78a3f 100644 --- a/utils/update/source.py +++ b/utils/update/source.py @@ -15,8 +15,9 @@ upstream lives:: ``key`` names the pinned key and defaults to ``version``; an entity with several pins declares a list of such blocks. The types are ``git_tags`` (repository), ``registry_tags`` (image), ``npm`` (package), -``http_regex`` (url, pattern) and ``script`` (path, run with the current -version and printing the latest one). +``http_regex`` (url, pattern, optionally a template over the pattern's named +groups) and ``script`` (path, run with the current version and printing the +latest one). An addon in ``meta/addons/.yml`` declares the same fields in its ``update:`` block, beside ``monitored``, ``catalog`` and ``upstream_id``. A @@ -42,12 +43,10 @@ from utils.cache.yaml import load_yaml from utils.roles.mapping import ROLE_FILE_META_SERVICES from utils.update.addons import GITHUB_RELEASES_CATALOG, iter_addon_files from utils.update.base import ( + captured_versions, is_maintained, is_semver, - latest_semver, - version_depth, - version_flavor, - version_key, + newer_version, ) from utils.update.docker import ( dockerhub_repo, @@ -180,13 +179,13 @@ def npm_versions(package: str) -> list[str]: return list((payload.get("versions") or {}).keys()) -def http_regex_versions(url: str, pattern: str) -> list[str]: - """Return every capture of *pattern* in the body of *url*.""" +def http_regex_versions(url: str, pattern: str, template: str = "") -> list[str]: + """Return every version *pattern* names in the body of *url*.""" try: body = _get(url).decode("utf-8", "replace") except OSError: return [] - return [match.group(1) for match in re.finditer(pattern, body)] + return captured_versions(body, pattern, template) def script_versions(repo_root: Path, role: str, path: str, current: str) -> list[str]: @@ -228,7 +227,11 @@ def candidates(entry: VersionSourceEntry, repo_root: Path) -> list[str]: elif kind == "npm": found = npm_versions(str(source["package"])) elif kind == "http_regex": - found = http_regex_versions(str(source["url"]), str(source["pattern"])) + found = http_regex_versions( + str(source["url"]), + str(source["pattern"]), + str(source.get("template", "")), + ) elif kind == "script": found = script_versions( repo_root, entry.role, str(source["path"]), entry.current @@ -460,12 +463,12 @@ def outdated( """Return one update per entry whose source offers a newer version.""" updates: list[VersionSourceUpdate] = [] for entry in entries: - newest = latest_semver( + newest = newer_version( + entry.current, candidates(entry, repo_root), - version_depth(entry.current), - version_flavor(entry.current), + assembled=bool(entry.source.get("template")), ) - if newest and version_key(entry.current) < version_key(newest): + if newest: updates.append(VersionSourceUpdate(entry=entry, latest=newest)) return updates From 7d104ec1397e2c9c290adb2444268240665c1d5d Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 8 Oct 2026 10:20:14 +0200 Subject: [PATCH 02/16] fix(web-app-bigbluebutton): move the release set through one version source The ref and the fifteen image pins are one upstream release, but the image updater moved the Docker tags alone while the ref never moved, because bigbluebutton/docker publishes its releases as branches and the repository updater reads tags. 759a1aa4d0 stopped the split with fifteen nocheck: docker-version markers, which also stopped every bump. The ref and every pin of the set now name upstream's release manifest on the default branch as their source: repos/tags for the versions, docker-compose.tmpl.yml for periodic. freeswitch, nginx and etherpad assemble their compound tags from it. One resolver run proposes the whole set, and the markers are gone. The pinned versions do not change. Upstream's v3.0.39 is still an open pull request (bigbluebutton/docker#397). Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/web-app-bigbluebutton/meta/services.yml | 98 ++++++++++++++++--- 1 file changed, 83 insertions(+), 15 deletions(-) diff --git a/roles/web-app-bigbluebutton/meta/services.yml b/roles/web-app-bigbluebutton/meta/services.yml index 9b7999aec3..426d231a28 100644 --- a/roles/web-app-bigbluebutton/meta/services.yml +++ b/roles/web-app-bigbluebutton/meta/services.yml @@ -36,6 +36,11 @@ bigbluebutton: shared: true repository: https://github.com/bigbluebutton/docker.git ref: v3.0.23 + update: + key: ref + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" recording: enabled: false cleanup: true @@ -100,55 +105,94 @@ prometheus: # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated bbb-web: image: alangecker/bbb-docker-web - version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated freeswitch: image: alangecker/bbb-docker-freeswitch - version: "v1.10.12-v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v1.10.12-v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: 'repos/bigbluebutton (?Pv[0-9.]+)\nrepos/freeswitch (?Pv[0-9.]+)' + template: "{freeswitch}-{bbb}" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated nginx: image: alangecker/bbb-docker-nginx - version: "v3.0.23-v5.4.4-1.29" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23-v5.4.4-1.29" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: 'repos/bbb-playback (?Pv[0-9.]+)\n(?:.*\n)*?repos/bigbluebutton (?Pv[0-9.]+)' + template: "{bbb}-{playback}-1.29" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated etherpad: image: alangecker/bbb-docker-etherpad - version: "2.4.2-s8328b77-p88f3f6b" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "2.4.2-s8328b77-p88f3f6b" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: 'repos/bbb-etherpad-plugin (?P[0-9a-f]+)\nrepos/bbb-etherpad-skin (?P[0-9a-f]+)' + template: "2.4.2-s{skin}-p{plugin}" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated bbb-pads: image: alangecker/bbb-docker-pads - version: "v1.5.8" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v1.5.8" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bbb-pads (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated bbb-export-annotations: image: alangecker/bbb-docker-bbb-export-annotations - version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated webrtc-sfu: image: alangecker/bbb-docker-webrtc-sfu - version: "v2.22.0" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v2.22.0" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bbb-webrtc-sfu (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated fsesl-akka: image: alangecker/bbb-docker-fsesl-akka - version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated apps-akka: image: alangecker/bbb-docker-apps-akka - version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated @@ -159,37 +203,61 @@ bbb-graphql-server: timeout: 10s retries: 5 image: alangecker/bbb-docker-graphql-server - version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated bbb-graphql-actions: image: alangecker/bbb-docker-graphql-actions - version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated bbb-graphql-middleware: image: alangecker/bbb-docker-graphql-middleware - version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated periodic: image: alangecker/bbb-docker-periodic - version: "v3.0.0" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.0" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/docker-compose.tmpl.yml + pattern: "bbb-docker-periodic:(v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated recordings: image: alangecker/bbb-docker-recordings - version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v3.0.23" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bigbluebutton (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated bbb-webrtc-recorder: image: alangecker/bbb-docker-webrtc-recorder - version: "v0.14.0" # nocheck: docker-version: one release set with bigbluebutton.ref + version: "v0.14.0" + update: + type: http_regex + url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + pattern: "repos/bbb-webrtc-recorder (v[0-9.]+)" enabled: false # nocheck: playwright-service-flag: script-time helper of upstream generate-compose, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose helper, not group-gated From d0b09ec4734bf5dfc2456529ff4a30222828e3e2 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 8 Oct 2026 11:07:12 +0200 Subject: [PATCH 03/16] fix(update): keep a sourced ref from giving its line to the next entity The repository updater assigns ref: lines to entities by position: every entity that pins a value takes the next line carrying that value. A ref that declares its own source was dropped before it took its line, so a second entity pinning the same value was given the sourced entity's line, and an update of it would have rewritten the wrong ref. A sourced ref now takes its line first and is skipped afterwards, the same order the nocheck marker already follows. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../python/utils/update/test_repository.py | 61 +++++++++++-------- utils/update/repository.py | 43 +++++++------ 2 files changed, 60 insertions(+), 44 deletions(-) diff --git a/tests/unit/python/utils/update/test_repository.py b/tests/unit/python/utils/update/test_repository.py index f51d73927d..b5588e476b 100644 --- a/tests/unit/python/utils/update/test_repository.py +++ b/tests/unit/python/utils/update/test_repository.py @@ -76,30 +76,6 @@ class TestWalkRepoRefPairs(unittest.TestCase): self.assertEqual(len(pairs), 1) self.assertEqual(pairs[0][0], ("both",)) - def test_a_ref_with_its_own_source_is_left_to_that_source(self) -> None: - source = {"type": "http_regex", "url": "https://example.invalid/tags"} - data = { - "sourced": { - "repository": "https://example.invalid/a.git", - "ref": "v1.0.0", - "update": {**source, "key": "ref"}, - }, - "listed": { - "repository": "https://example.invalid/b.git", - "ref": "v2.0.0", - "update": [{**source, "key": "ref"}], - }, - "other-key": { - "repository": "https://example.invalid/c.git", - "ref": "v3.0.0", - "update": {**source, "key": "app_version"}, - }, - } - - pairs = list(walk_repo_ref_pairs(data, ())) - - self.assertEqual([pair[0] for pair in pairs], [("other-key",)]) - def test_walks_lists(self) -> None: data = { "repos": [ @@ -242,6 +218,43 @@ class TestApplyUpdates(unittest.TestCase): self.assertEqual(read_text(str(config_b)), " ref: v2.1.0\n") +SOURCED_FIRST = ( + "sourced:\n" + " repository: https://example.test/a.git\n" + " ref: v1.0.0\n" + " update:\n" + " key: ref\n" + " type: http_regex\n" + " url: https://example.test/tags\n" + " pattern: 'a (v[0-9.]+)'\n" + "plain:\n" + " repository: https://example.test/b.git\n" + " ref: v1.0.0\n" +) + + +class TestSourcedRef(unittest.TestCase): + def test_a_sourced_ref_is_skipped_and_keeps_its_own_line(self) -> None: + with tempfile.TemporaryDirectory() as tmpdir: + root = Path(tmpdir) + config = root / "roles" / "web-app-example" / ROLE_FILE_META_SERVICES + config.parent.mkdir(parents=True) + config.write_text(SOURCED_FIRST, encoding="utf-8") + + entries = collect_entries(root) + + self.assertEqual( + [(entry.entity_path, entry.line) for entry in entries], + [(("plain",), 11)], + ) + + apply_updates([RepositoryRefUpdate(entry=entries[0], latest="v1.1.0")]) + + written = config.read_text().splitlines() # nocheck: cache-read just rewritten here + self.assertEqual(written[2], " ref: v1.0.0") + self.assertEqual(written[10], " ref: v1.1.0") + + class TestCollectEntriesCoversAddons(unittest.TestCase): def _role(self, root: Path) -> Path: role = root / "roles" / "web-app-example" diff --git a/utils/update/repository.py b/utils/update/repository.py index d517cb0876..0b81bf2612 100644 --- a/utils/update/repository.py +++ b/utils/update/repository.py @@ -74,29 +74,32 @@ class RepositoryRefUpdate: latest: str +def _walk( + node, path: tuple[str, ...] +) -> Iterator[tuple[tuple[str, ...], str, str, dict]]: + """Yield ``(entity_path, repository, ref, entity)`` for every dict in + the tree that declares both keys with truthy string values.""" + if isinstance(node, dict): + repo = node.get("repository") + ref = node.get("ref") + if isinstance(repo, str) and repo and isinstance(ref, str) and ref: + yield (path, repo.strip(), ref.strip(), node) + for key, value in node.items(): + if key in ("repository", "ref"): + continue + yield from _walk(value, (*path, str(key))) + elif isinstance(node, list): + for index, item in enumerate(node): + yield from _walk(item, (*path, f"[{index}]")) + + def walk_repo_ref_pairs( node, path: tuple[str, ...] ) -> Iterator[tuple[tuple[str, ...], str, str]]: """Yield ``(entity_path, repository, ref)`` for every dict in the tree that declares both keys with truthy string values.""" - if isinstance(node, dict): - repo = node.get("repository") - ref = node.get("ref") - if ( - isinstance(repo, str) - and repo - and isinstance(ref, str) - and ref - and not declares_source(node, "ref") - ): - yield (path, repo.strip(), ref.strip()) - for key, value in node.items(): - if key in ("repository", "ref"): - continue - yield from walk_repo_ref_pairs(value, (*path, str(key))) - elif isinstance(node, list): - for index, item in enumerate(node): - yield from walk_repo_ref_pairs(item, (*path, f"[{index}]")) + for entity_path, repo, ref, _entity in _walk(node, path): + yield (entity_path, repo, ref) def git_ls_remote_tags(url: str) -> list[str]: @@ -181,14 +184,14 @@ def _entries_of_file( suppressed = suppressed_ref_lines(config_path) entries: list[RepositoryRefEntry] = [] - for entity_path, repo, ref in walk_repo_ref_pairs(data, entity_prefix): + for entity_path, repo, ref, entity in _walk(data, entity_prefix): if not is_semver(ref): continue candidates = ref_line_index.get(ref) or [] if not candidates: continue line_no = candidates.pop(0) - if line_no in suppressed: + if line_no in suppressed or declares_source(entity, "ref"): continue entries.append( RepositoryRefEntry( From 4cba7e7c2f17242efd20e30e052c72b0c25c4fae Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 8 Oct 2026 11:11:57 +0200 Subject: [PATCH 04/16] feat(update): read a version source from several documents, once per run An http_regex source read one document, so a tag whose parts upstream keeps in two files could only carry the second part as a literal. Every pin also fetched its document on its own: a failed request left one pin of a release behind while the others moved. url now takes a list whose bodies are searched as one text, and every document is fetched once per run, so all pins that read it resolve against the same snapshot. The HTTP reads move into utils/update/fetch.py. Co-Authored-By: Claude Opus 5.5 (1M context) --- cli/contributing/update/README.md | 4 ++ tests/unit/python/utils/update/test_fetch.py | 48 +++++++++++++++++++ tests/unit/python/utils/update/test_source.py | 2 +- utils/update/fetch.py | 46 ++++++++++++++++++ utils/update/source.py | 40 ++++++---------- 5 files changed, 114 insertions(+), 26 deletions(-) create mode 100644 tests/unit/python/utils/update/test_fetch.py create mode 100644 utils/update/fetch.py diff --git a/cli/contributing/update/README.md b/cli/contributing/update/README.md index 27e5ba032e..2b9f10edde 100644 --- a/cli/contributing/update/README.md +++ b/cli/contributing/update/README.md @@ -56,6 +56,10 @@ freeswitch: A templated pin moves whenever the assembled value changes, its suffix included. +`url` takes a list when the values live in several documents. Their bodies are +searched as one text, in the listed order. Every document is fetched once per +run, so all pins that read it resolve against the same snapshot. + The pinned value is a semver such as `v1.0.5`, `26.04.4.2.1` or `2.4.0p32`. A moving tag behind an `update:` block, or as the `version` of a monitored addon, fails `tests/lint/ansible/services/test_version_keys.py`. diff --git a/tests/unit/python/utils/update/test_fetch.py b/tests/unit/python/utils/update/test_fetch.py new file mode 100644 index 0000000000..82b603ff46 --- /dev/null +++ b/tests/unit/python/utils/update/test_fetch.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +import unittest +import unittest.mock as mock + +from utils.update import fetch as module + +BODIES = { + "https://example.test/tags": b"core v1.0.0", + "https://example.test/compose": b"image: example/app:v1.0.0-1.29", +} + + +class TestDocuments(unittest.TestCase): + def setUp(self) -> None: + module.document.cache_clear() + self.addCleanup(module.document.cache_clear) + + def test_several_documents_are_read_as_one_text(self) -> None: + with mock.patch.object(module, "get", side_effect=BODIES.__getitem__): + self.assertEqual( + module.documents(list(BODIES)), + "core v1.0.0\nimage: example/app:v1.0.0-1.29", + ) + self.assertEqual( + module.documents("https://example.test/tags"), "core v1.0.0" + ) + + def test_a_document_is_fetched_once_per_run(self) -> None: + with mock.patch.object(module, "get", side_effect=BODIES.__getitem__) as get: + module.documents(list(BODIES)) + module.documents("https://example.test/tags") + module.documents("https://example.test/compose") + + self.assertEqual(get.call_count, 2) + + def test_a_failed_fetch_is_tried_again(self) -> None: + with mock.patch.object(module, "get", side_effect=OSError("down")): + with self.assertRaises(OSError): + module.documents("https://example.test/tags") + with mock.patch.object(module, "get", side_effect=BODIES.__getitem__): + self.assertEqual( + module.documents("https://example.test/tags"), "core v1.0.0" + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/unit/python/utils/update/test_source.py b/tests/unit/python/utils/update/test_source.py index 8c977795c1..e10f86c77f 100644 --- a/tests/unit/python/utils/update/test_source.py +++ b/tests/unit/python/utils/update/test_source.py @@ -179,7 +179,7 @@ class TestOutdated(unittest.TestCase): class TestTemplate(unittest.TestCase): def _outdated(self, services: str, upstream: str) -> list[str]: root = _repo(services) - with mock.patch.object(module, "_get", return_value=upstream.encode()): + with mock.patch.object(module, "documents", return_value=upstream): updates = module.outdated(module.collect_entries(root), root) return [update.latest for update in updates] diff --git a/utils/update/fetch.py b/utils/update/fetch.py new file mode 100644 index 0000000000..fa25655fd4 --- /dev/null +++ b/utils/update/fetch.py @@ -0,0 +1,46 @@ +"""Read the documents a declared version source names. + +Every document is fetched once per run, so the pins that read the same release +manifest resolve against one snapshot of it. +""" + +from __future__ import annotations + +import functools +import urllib.request + +TIMEOUT_SECONDS = 30 +USER_AGENT = "infinito-nexus-version-source" + + +def get(url: str, headers: dict[str, str] | None = None) -> bytes: + """Return the body of a declared version source. + + Args: + url: https URL to read. + headers: request headers beside the user agent. + """ + request = urllib.request.Request( # noqa: S310 - https URL of a declared version source + url, headers={"User-Agent": USER_AGENT, **(headers or {})} + ) + with urllib.request.urlopen( # noqa: S310 - https URL of a declared version source + request, timeout=TIMEOUT_SECONDS + ) as response: + return response.read() + + +@functools.cache +def document(url: str) -> str: + """Return the text of *url*, fetched once per run.""" + return get(url).decode("utf-8", "replace") + + +def documents(urls: str | list[str]) -> str: + """Return the text of one URL, or of several as one text. + + Args: + urls: a URL, or several whose bodies are searched together. + """ + return "\n".join( + document(url) for url in ([urls] if isinstance(urls, str) else urls) + ) diff --git a/utils/update/source.py b/utils/update/source.py index 6215e78a3f..0cf9166337 100644 --- a/utils/update/source.py +++ b/utils/update/source.py @@ -15,9 +15,9 @@ upstream lives:: ``key`` names the pinned key and defaults to ``version``; an entity with several pins declares a list of such blocks. The types are ``git_tags`` (repository), ``registry_tags`` (image), ``npm`` (package), -``http_regex`` (url, pattern, optionally a template over the pattern's named -groups) and ``script`` (path, run with the current version and printing the -latest one). +``http_regex`` (one url or several, pattern, optionally a template over the +pattern's named groups) and ``script`` (path, run with the current version and +printing the latest one). An addon in ``meta/addons/.yml`` declares the same fields in its ``update:`` block, beside ``monitored``, ``catalog`` and ``upstream_id``. A @@ -32,7 +32,6 @@ import json import re import subprocess import urllib.error -import urllib.request from dataclasses import dataclass from typing import TYPE_CHECKING, Any from urllib.parse import urlencode @@ -57,6 +56,7 @@ from utils.update.docker import ( is_ghcr, is_mcr, ) +from utils.update.fetch import TIMEOUT_SECONDS, documents, get from utils.update.repository import git_ls_remote_tags if TYPE_CHECKING: @@ -67,9 +67,7 @@ NOCHECK_MARKER = "version-source" UNWATCHED_MARKER = "unwatched-version" UPDATE_KEY = "update" DEFAULT_KEY = "version" -TIMEOUT_SECONDS = 30 TYPES = ("git_tags", "registry_tags", "npm", "http_regex", "script") -USER_AGENT = "infinito-nexus-version-source" @dataclass(frozen=True) @@ -103,16 +101,6 @@ class VersionSourceUpdate: latest: str -def _get(url: str, headers: dict[str, str] | None = None) -> bytes: - request = urllib.request.Request( # noqa: S310 - https URL of a declared version source - url, headers={"User-Agent": USER_AGENT, **(headers or {})} - ) - with urllib.request.urlopen( # noqa: S310 - https URL of a declared version source - request, timeout=TIMEOUT_SECONDS - ) as response: - return response.read() - - def dockerhub_named_tags(image: str, match: str) -> list[str]: """Return the Docker Hub tags of *image* whose name contains *match*. @@ -124,7 +112,7 @@ def dockerhub_named_tags(image: str, match: str) -> list[str]: query = urlencode({"name": match, "page_size": 100}) url = f"https://hub.docker.com/v2/repositories/{dockerhub_repo(image)}/tags?{query}" try: - payload = json.loads(_get(url)) + payload = json.loads(get(url)) except (OSError, ValueError): return [] return [str(result["name"]) for result in payload.get("results") or []] @@ -150,7 +138,7 @@ def registry_v2_tags(image: str, match: str = "") -> list[str]: host, _, repository = image.partition("/") url = f"https://{host}/v2/{repository}/tags/list" try: - return list(json.loads(_get(url)).get("tags") or []) + return list(json.loads(get(url)).get("tags") or []) except urllib.error.HTTPError as error: if error.code != 401: return [] @@ -163,8 +151,8 @@ def registry_v2_tags(image: str, match: str = "") -> list[str]: return [] query = "&".join(f"{name}={value}" for name, value in fields.items()) try: - token = json.loads(_get(f"{realm}?{query}")).get("token", "") - payload = _get(url, {"Authorization": f"Bearer {token}"}) + token = json.loads(get(f"{realm}?{query}")).get("token", "") + payload = get(url, {"Authorization": f"Bearer {token}"}) return list(json.loads(payload).get("tags") or []) except (OSError, ValueError): return [] @@ -173,16 +161,18 @@ def registry_v2_tags(image: str, match: str = "") -> list[str]: def npm_versions(package: str) -> list[str]: """Return every published version of an npm *package*.""" try: - payload = json.loads(_get(f"https://registry.npmjs.org/{package}")) + payload = json.loads(get(f"https://registry.npmjs.org/{package}")) except (OSError, ValueError): return [] return list((payload.get("versions") or {}).keys()) -def http_regex_versions(url: str, pattern: str, template: str = "") -> list[str]: - """Return every version *pattern* names in the body of *url*.""" +def http_regex_versions( + urls: str | list[str], pattern: str, template: str = "" +) -> list[str]: + """Return every version *pattern* names in the documents at *urls*.""" try: - body = _get(url).decode("utf-8", "replace") + body = documents(urls) except OSError: return [] return captured_versions(body, pattern, template) @@ -228,7 +218,7 @@ def candidates(entry: VersionSourceEntry, repo_root: Path) -> list[str]: found = npm_versions(str(source["package"])) elif kind == "http_regex": found = http_regex_versions( - str(source["url"]), + source["url"], str(source["pattern"]), str(source.get("template", "")), ) From 73c7d862fbec57ca590af3d6ba10aadddcefda49 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 8 Oct 2026 11:17:39 +0200 Subject: [PATCH 05/16] fix(web-app-bigbluebutton): take the nginx base and Etherpad version from upstream The sources of nginx and etherpad carried 1.29 and 2.4.2 as literals. Upstream keeps both in docker-compose.tmpl.yml, not in repos/tags, so a change there would have left the proposed tag on the old value while the image updater no longer watches these pins. Both sources now read repos/tags and the compose template and take the value from the image line. Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/web-app-bigbluebutton/meta/services.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/roles/web-app-bigbluebutton/meta/services.yml b/roles/web-app-bigbluebutton/meta/services.yml index 426d231a28..41c1436a14 100644 --- a/roles/web-app-bigbluebutton/meta/services.yml +++ b/roles/web-app-bigbluebutton/meta/services.yml @@ -129,9 +129,11 @@ nginx: version: "v3.0.23-v5.4.4-1.29" update: type: http_regex - url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags - pattern: 'repos/bbb-playback (?Pv[0-9.]+)\n(?:.*\n)*?repos/bigbluebutton (?Pv[0-9.]+)' - template: "{bbb}-{playback}-1.29" + url: + - https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + - https://raw.githubusercontent.com/bigbluebutton/docker/develop/docker-compose.tmpl.yml + pattern: 'repos/bbb-playback (?Pv[0-9.]+)\n(?:.*\n)*?repos/bigbluebutton (?Pv[0-9.]+)\n(?:.*\n)*?.*bbb-docker-nginx:.*-(?P[0-9.]+)\n' + template: "{bbb}-{playback}-{base}" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated @@ -140,9 +142,11 @@ etherpad: version: "2.4.2-s8328b77-p88f3f6b" update: type: http_regex - url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags - pattern: 'repos/bbb-etherpad-plugin (?P[0-9a-f]+)\nrepos/bbb-etherpad-skin (?P[0-9a-f]+)' - template: "2.4.2-s{skin}-p{plugin}" + url: + - https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags + - https://raw.githubusercontent.com/bigbluebutton/docker/develop/docker-compose.tmpl.yml + pattern: 'repos/bbb-etherpad-plugin (?P[0-9a-f]+)\nrepos/bbb-etherpad-skin (?P[0-9a-f]+)\n(?:.*\n)*?.*bbb-docker-etherpad:(?P[0-9.]+)-s' + template: "{base}-s{skin}-p{plugin}" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated From 5b722d840d47660e872abb9e294c06eeebe87a10 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 8 Oct 2026 11:42:17 +0200 Subject: [PATCH 06/16] style(update): reformat two test statements for ruff ruff format rewraps the read-back line in test_repository.py, and ruff check reports the nested with in test_fetch.py as SIM117. Both fail lint-python. Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/unit/python/utils/update/test_fetch.py | 8 +++++--- tests/unit/python/utils/update/test_repository.py | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/unit/python/utils/update/test_fetch.py b/tests/unit/python/utils/update/test_fetch.py index 82b603ff46..066d306bc9 100644 --- a/tests/unit/python/utils/update/test_fetch.py +++ b/tests/unit/python/utils/update/test_fetch.py @@ -35,9 +35,11 @@ class TestDocuments(unittest.TestCase): self.assertEqual(get.call_count, 2) def test_a_failed_fetch_is_tried_again(self) -> None: - with mock.patch.object(module, "get", side_effect=OSError("down")): - with self.assertRaises(OSError): - module.documents("https://example.test/tags") + with ( + mock.patch.object(module, "get", side_effect=OSError("down")), + self.assertRaises(OSError), + ): + module.documents("https://example.test/tags") with mock.patch.object(module, "get", side_effect=BODIES.__getitem__): self.assertEqual( module.documents("https://example.test/tags"), "core v1.0.0" diff --git a/tests/unit/python/utils/update/test_repository.py b/tests/unit/python/utils/update/test_repository.py index b5588e476b..54734dc979 100644 --- a/tests/unit/python/utils/update/test_repository.py +++ b/tests/unit/python/utils/update/test_repository.py @@ -250,9 +250,10 @@ class TestSourcedRef(unittest.TestCase): apply_updates([RepositoryRefUpdate(entry=entries[0], latest="v1.1.0")]) - written = config.read_text().splitlines() # nocheck: cache-read just rewritten here - self.assertEqual(written[2], " ref: v1.0.0") - self.assertEqual(written[10], " ref: v1.1.0") + written = config.read_text() # nocheck: cache-read just rewritten here + lines = written.splitlines() + self.assertEqual(lines[2], " ref: v1.0.0") + self.assertEqual(lines[10], " ref: v1.1.0") class TestCollectEntriesCoversAddons(unittest.TestCase): From 13901899d5b77ce12947e139e41eb25d87d55d73 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 8 Oct 2026 13:53:06 +0200 Subject: [PATCH 07/16] docs(update): state that a templated pin never moves backwards The README said a templated pin moves whenever the assembled value changes. newer_version() additionally rejects an assembled value that sorts below the current pin, which test_an_unchanged_or_older_templated_tag_reports_nothing covers. Co-Authored-By: Claude Opus 5.5 (1M context) --- cli/contributing/update/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/contributing/update/README.md b/cli/contributing/update/README.md index 2b9f10edde..f043866074 100644 --- a/cli/contributing/update/README.md +++ b/cli/contributing/update/README.md @@ -54,7 +54,7 @@ freeswitch: template: "{freeswitch}-{bbb}" ``` -A templated pin moves whenever the assembled value changes, its suffix included. +A templated pin moves when the assembled value changes, its suffix included, and never to an older version. `url` takes a list when the values live in several documents. Their bodies are searched as one text, in the listed order. Every document is fetched once per From 8442880ff861f4f8667f005db40175228d5af106 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 8 Oct 2026 10:06:44 +0200 Subject: [PATCH 08/16] fix(web-app-opentalk): run product version 26.2.1 and follow its bundle The web frontend, the controller and the recorder were pinned to v2.9.0, v0.34.1 and v0.16.2, a mix of the 26.2 and the 26.1 line, and excluded from the image updater with nocheck: docker-version. Nothing moved them. They now sit on the set OpenTalk publishes as product version 26.2.1 in ot-setup (v2.9.2, v0.34.5, v0.17.5), and each pin names that bundle as its version source, so the three move together with the next product version. The markers are gone. Recorder v0.17 no longer reads recording jobs from RabbitMQ or logs in with an OIDC service account. The controller starts recordings on the recorder's REST API and both sides authenticate with API keys: recorder.toml.j2 names the controller and the recorder's own key, controller.toml.j2 enables roomserver.modules.recording, the secret recorder_api_secret replaces recorder_oidc_client_secret and the Keycloak client opentalk-recorder is no longer created. Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/web-app-opentalk/README.md | 2 +- roles/web-app-opentalk/meta/secrets.yml | 4 +-- roles/web-app-opentalk/meta/services.yml | 21 ++++++++++-- .../tasks/02_keycloak_client.yml | 32 ------------------- .../web-app-opentalk/templates/compose.yml.j2 | 2 +- .../templates/controller.toml.j2 | 6 ++-- .../templates/recorder.toml.j2 | 14 +++----- roles/web-app-opentalk/vars/main.yml | 8 +++-- 8 files changed, 36 insertions(+), 53 deletions(-) diff --git a/roles/web-app-opentalk/README.md b/roles/web-app-opentalk/README.md index a3e78e943d..412390e70c 100644 --- a/roles/web-app-opentalk/README.md +++ b/roles/web-app-opentalk/README.md @@ -76,7 +76,7 @@ Solid `1:1` edges are fixed relationships; dashed `0..1` edges are conditional ( - **Single Sign-On:** Frontend and controller share one Keycloak client and realm. - **Federated User Lookup:** Invitee search resolves through the Keycloak admin Web API, so any user federated from OpenLDAP into Keycloak becomes findable inside OpenTalk. - **OpenCloud File Integration:** Pick files from OpenCloud in a meeting without re-authenticating when `web-app-opencloud` is deployed alongside. -- **Meeting Recordings:** A dedicated recorder consumes recording jobs from the RabbitMQ queue and stores MP4 archives in MinIO. +- **Meeting Recordings:** The controller starts recordings on a dedicated recorder over its REST API, and the recorder stores MP4 archives in MinIO. - **Shared Infrastructure:** Reuses `svc-db-postgres` for relational data and `web-svc-coturn` for STUN and TURN. ## Quick Setup diff --git a/roles/web-app-opentalk/meta/secrets.yml b/roles/web-app-opentalk/meta/secrets.yml index a36001f92f..e0b40eb4e4 100644 --- a/roles/web-app-opentalk/meta/secrets.yml +++ b/roles/web-app-opentalk/meta/secrets.yml @@ -15,8 +15,8 @@ credentials: algorithm: alphanumeric validation: min_length: 32 - recorder_oidc_client_secret: - description: Client secret for the dedicated confidential Keycloak client (`opentalk-recorder`) the recorder uses to authenticate against the controller. + recorder_api_secret: + description: API key secret the controller signs its requests to the recorder with (`roomserver.modules.recording.api_key`, `http.api_keys` of the recorder). algorithm: alphanumeric validation: min_length: 32 diff --git a/roles/web-app-opentalk/meta/services.yml b/roles/web-app-opentalk/meta/services.yml index f78205a7a3..4ceba7a5ba 100644 --- a/roles/web-app-opentalk/meta/services.yml +++ b/roles/web-app-opentalk/meta/services.yml @@ -61,7 +61,11 @@ opentalk: placement: manager name: opentalk image: registry.opencode.de/opentalk/web-frontend - version: v2.9.0 # nocheck: docker-version — component of the OpenTalk set; TODO: pin the set to a released bundle, then unpin + version: v2.9.2 + update: + type: http_regex + url: https://gitlab.opencode.de/opentalk/ot-setup/-/raw/main/docker-compose.yaml + pattern: "OT_FRONTEND_IMAGE_TAG:-(v[0-9.]+)\\}" min_storage: 234MB backup: no_stop_required: true @@ -80,7 +84,11 @@ opentalk: controller: name: opentalk-controller image: registry.opencode.de/opentalk/controller - version: v0.34.1 # nocheck: docker-version — component of the OpenTalk set; TODO: pin the set to a released bundle, then unpin + version: v0.34.5 + update: + type: http_regex + url: https://gitlab.opencode.de/opentalk/ot-setup/-/raw/main/docker-compose.yaml + pattern: "OPENTALK_CONTROLLER_IMAGE_TAG:-(v[0-9.]+)\\}" min_storage: 291MB backup: no_stop_required: true @@ -143,7 +151,14 @@ rabbit: recorder: name: opentalk-recorder image: registry.opencode.de/opentalk/recorder - version: v0.16.2 # nocheck: docker-version — v0.17 drops the rabbitmq transport and reshapes [controller]; TODO: migrate recorder.toml.j2, then unpin + version: v0.17.5 + update: + type: http_regex + url: https://gitlab.opencode.de/opentalk/ot-setup/-/raw/main/docker-compose.yaml + pattern: "RECORDER_IMAGE_TAG:-(v[0-9.]+)\\}" + ports: + internal: + http: 11511 min_storage: 775MB cpus: "1.5" mem_reservation: 512m diff --git a/roles/web-app-opentalk/tasks/02_keycloak_client.yml b/roles/web-app-opentalk/tasks/02_keycloak_client.yml index 1b319fcf94..331151333f 100644 --- a/roles/web-app-opentalk/tasks/02_keycloak_client.yml +++ b/roles/web-app-opentalk/tasks/02_keycloak_client.yml @@ -74,38 +74,6 @@ delegate_to: "{{ OPENTALK_KEYCLOAK_HOST_NODE }}" no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}" -- name: "📝 Upsert dedicated confidential Keycloak client for the OpenTalk recorder" - keycloak_kcadm_update: - object_kind: "client" - lookup_value: "{{ OPENTALK_RECORDER_OIDC_CLIENT_ID }}" - desired: - clientId: "{{ OPENTALK_RECORDER_OIDC_CLIENT_ID }}" - name: "OpenTalk Recorder" - description: "Confidential service-account client used by the OpenTalk recorder to authenticate against the controller." - enabled: true - protocol: "openid-connect" - publicClient: false - bearerOnly: false - standardFlowEnabled: false - implicitFlowEnabled: false - directAccessGrantsEnabled: false - serviceAccountsEnabled: true - clientAuthenticatorType: "client-secret" - secret: "{{ OPENTALK_RECORDER_OIDC_CLIENT_SECRET }}" - attributes: - "client.secret.creation.time": "0" - "oauth2.device.authorization.grant.enabled": "false" - "use.refresh.tokens": "true" - force_attrs: - publicClient: false - serviceAccountsEnabled: true - secret: "{{ OPENTALK_RECORDER_OIDC_CLIENT_SECRET }}" - kcadm_exec: "container exec -i {{ OPENTALK_KEYCLOAK_LOCAL_CID }} /opt/keycloak/bin/kcadm.sh" # nocheck: container-exec-resolver OPENTALK_KEYCLOAK_LOCAL_CID resolved at delegate_to runtime - realm: "{{ OIDC.CLIENT.REALM }}" - assert_mode: "{{ MODE_ASSERT | bool }}" - delegate_to: "{{ OPENTALK_KEYCLOAK_HOST_NODE }}" - no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}" - - name: "🔐 Grant OpenTalk controller service account `view-users` role" ansible.builtin.shell: |- {{ KCEXEC }} sh -lc ' diff --git a/roles/web-app-opentalk/templates/compose.yml.j2 b/roles/web-app-opentalk/templates/compose.yml.j2 index 1f3b15103a..20c05159c8 100644 --- a/roles/web-app-opentalk/templates/compose.yml.j2 +++ b/roles/web-app-opentalk/templates/compose.yml.j2 @@ -56,7 +56,7 @@ {{ lookup('compose_restart') }} {{ lookup('container_volumes', service_name) | indent(4) }} {{ lookup('container_networks') | indent(4) }} - {{ lookup('depends_on', {'rabbit': 'service_healthy', 'controller': 'service_started'}) }} + {{ lookup('depends_on', {'controller': 'service_started'}) }} logging: driver: journald diff --git a/roles/web-app-opentalk/templates/controller.toml.j2 b/roles/web-app-opentalk/templates/controller.toml.j2 index a628775876..69df4a30ed 100644 --- a/roles/web-app-opentalk/templates/controller.toml.j2 +++ b/roles/web-app-opentalk/templates/controller.toml.j2 @@ -6,7 +6,7 @@ base_url = "{{ OPENTALK_URL }}" [http] port = {{ OPENTALK_CTRL_INTERNAL_PORT }} -service_api_keys = [{ "id" = "controller", "secret" = "{{ lookup('config', application_id, 'secrets.credentials.service_api_secret') }}" }] +service_api_keys = [{ "id" = "{{ OPENTALK_CTRL_SERVICE_API_KEY_ID }}", "secret" = "{{ OPENTALK_CTRL_SERVICE_API_SECRET }}" }] [database] url = "postgres://{{ lookup('database', application_id, 'username') }}:{{ lookup('database', application_id, 'password') }}@{{ lookup('database', application_id, 'host') }}:{{ lookup('database', application_id, 'port') }}/{{ lookup('database', application_id, 'name') }}" @@ -38,6 +38,9 @@ public_url = "wss://{{ OPENTALK_DOMAIN }}/livekit" service_url = "http://livekit:{{ OPENTALK_LIVEKIT_HTTP_PORT }}" api_key = "{{ OPENTALK_LIVEKIT_API_KEY }}" api_secret = "{{ OPENTALK_LIVEKIT_API_SECRET }}" +[roomserver.modules.recording] +url = "http://recorder:{{ OPENTALK_RECORDER_HTTP_PORT }}" +api_key = { id = "{{ OPENTALK_RECORDER_API_KEY_ID }}", secret = "{{ OPENTALK_RECORDER_API_SECRET }}" } [roomserver.modules.echo] [roomserver.modules.chat] [roomserver.modules.polls] @@ -55,5 +58,4 @@ secret_key = "{{ lookup('objstore', application_id, 'secret_key') }}" [rabbit_mq] url = "amqp://guest:guest@rabbit/%2F" mail_task_queue = "opentalk_mailer" -recording_task_queue = "{{ OPENTALK_RABBIT_QUEUE }}" diff --git a/roles/web-app-opentalk/templates/recorder.toml.j2 b/roles/web-app-opentalk/templates/recorder.toml.j2 index 8927749a53..f6c538521f 100644 --- a/roles/web-app-opentalk/templates/recorder.toml.j2 +++ b/roles/web-app-opentalk/templates/recorder.toml.j2 @@ -1,14 +1,10 @@ # OpenTalk recorder configuration. # Reference: https://docs.opentalk.eu/admin/recorder/configuration/ -[auth] -issuer = "{{ OIDC.CLIENT.ISSUER_URL }}" -client_id = "{{ OPENTALK_RECORDER_OIDC_CLIENT_ID }}" -client_secret = "{{ OPENTALK_RECORDER_OIDC_CLIENT_SECRET }}" - [controller] -domain = "{{ OPENTALK_DOMAIN }}" +url = "http://controller:{{ OPENTALK_CTRL_INTERNAL_PORT }}" +api_key = { id = "{{ OPENTALK_CTRL_SERVICE_API_KEY_ID }}", secret = "{{ OPENTALK_CTRL_SERVICE_API_SECRET }}" } -[rabbitmq] -uri = "amqp://guest:guest@rabbit/%2F" -queue = "{{ OPENTALK_RABBIT_QUEUE }}" +[http] +port = {{ OPENTALK_RECORDER_HTTP_PORT }} +api_keys = [{ id = "{{ OPENTALK_RECORDER_API_KEY_ID }}", secret = "{{ OPENTALK_RECORDER_API_SECRET }}" }] diff --git a/roles/web-app-opentalk/vars/main.yml b/roles/web-app-opentalk/vars/main.yml index a4625936b4..4a9e652102 100644 --- a/roles/web-app-opentalk/vars/main.yml +++ b/roles/web-app-opentalk/vars/main.yml @@ -12,6 +12,8 @@ entity_name: "{{ application_id | get_entity_name }}" OPENTALK_CTRL_CONTAINER: "{{ lookup('config', application_id, 'services.controller.name') }}" OPENTALK_CTRL_HTTP_PORT: "{{ lookup('config', application_id, 'services.controller.ports.local.http') }}" OPENTALK_CTRL_INTERNAL_PORT: "{{ lookup('config', application_id, 'services.controller.ports.internal.http') }}" +OPENTALK_CTRL_SERVICE_API_KEY_ID: "controller" +OPENTALK_CTRL_SERVICE_API_SECRET: "{{ lookup('config', application_id, 'secrets.credentials.service_api_secret') }}" OPENTALK_FRONTEND_CONTAINER: "{{ lookup('config', application_id, 'services.opentalk.name') }}" OPENTALK_FRONTEND_HTTP_PORT: "{{ lookup('config', application_id, 'services.opentalk.ports.local.http') }}" @@ -34,11 +36,11 @@ OPENTALK_LIVEKIT_API_SECRET: "{{ lookup('config', application_id, 'secrets.crede OPENTALK_OBJSTORE_CONTAINER_ADDRESS: "{{ lookup('container_address', application_id, lookup('objstore', application_id, 'engine')) }}" OPENTALK_RABBIT_CONTAINER: "{{ lookup('config', application_id, 'services.rabbit.name') }}" -OPENTALK_RABBIT_QUEUE: "opentalk_recorder" OPENTALK_RECORDER_CONTAINER: "{{ lookup('config', application_id, 'services.recorder.name') }}" -OPENTALK_RECORDER_OIDC_CLIENT_ID: "opentalk-recorder" -OPENTALK_RECORDER_OIDC_CLIENT_SECRET: "{{ lookup('config', application_id, 'secrets.credentials.recorder_oidc_client_secret') }}" +OPENTALK_RECORDER_HTTP_PORT: "{{ lookup('config', application_id, 'services.recorder.ports.internal.http') }}" +OPENTALK_RECORDER_API_KEY_ID: "recorder" +OPENTALK_RECORDER_API_SECRET: "{{ lookup('config', application_id, 'secrets.credentials.recorder_api_secret') }}" OPENTALK_KEYCLOAK_BASE_URL: "{{ lookup('tls', 'web-app-keycloak', 'url.base') | regex_replace('/+$','') }}" OPENTALK_KEYCLOAK_CONTAINER_ADDRESS: "{{ lookup('container_address', 'web-app-keycloak', 'keycloak') }}" From c15455154034727ee8cdd58d2a7df33eccdfbcb4 Mon Sep 17 00:00:00 2001 From: "infinito-nexus-updater[bot]" <286144613+infinito-nexus-updater[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 21:04:17 +0000 Subject: [PATCH 09/16] update(images): update Docker image versions (svc-ai-ollama) --- roles/svc-ai-ollama/meta/services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/svc-ai-ollama/meta/services.yml b/roles/svc-ai-ollama/meta/services.yml index 10de306f04..cba1342a36 100644 --- a/roles/svc-ai-ollama/meta/services.yml +++ b/roles/svc-ai-ollama/meta/services.yml @@ -13,7 +13,7 @@ ollama: backup: no_stop_required: true image: ollama/ollama - version: 0.40.1 + version: 0.40.2 name: ollama min_storage: 3473MB cpus: "4.0" From ac49f7e2df43124232cfa99110b9a88bef07eb3d Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 9 Oct 2026 00:11:09 +0200 Subject: [PATCH 10/16] fix(web-app-prometheus): let a role choose the path its readiness probe reaches #832 probes /healthz/ready on every consumer and proxies it to the app root, where Bridgy Fed, Hermes and the XMPP web listener answer 404 by design, so their probe_success stayed 0. A consumer can now name the path in services.prometheus.ready_path; the accepted status codes stay unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/web-app-bridgy-fed/meta/services.yml | 1 + roles/web-app-hermes/meta/services.yml | 1 + roles/web-app-prometheus/templates/nginx/healthz.conf.j2 | 3 ++- roles/web-svc-xmpp/meta/services.yml | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/web-app-bridgy-fed/meta/services.yml b/roles/web-app-bridgy-fed/meta/services.yml index 1678d4b203..175df25a2c 100644 --- a/roles/web-app-bridgy-fed/meta/services.yml +++ b/roles/web-app-bridgy-fed/meta/services.yml @@ -38,6 +38,7 @@ prometheus: bond: 1 enabled: "{{ 'web-app-prometheus' in group_names }}" shared: "{{ 'web-app-prometheus' in group_names }}" + ready_path: robots.txt bridgy-fed: healthcheck: flavor: tcp diff --git a/roles/web-app-hermes/meta/services.yml b/roles/web-app-hermes/meta/services.yml index 52659b771f..7efb51a6a2 100644 --- a/roles/web-app-hermes/meta/services.yml +++ b/roles/web-app-hermes/meta/services.yml @@ -82,6 +82,7 @@ prometheus: bond: 1 enabled: "{{ 'web-app-prometheus' in group_names }}" shared: "{{ 'web-app-prometheus' in group_names }}" + ready_path: health # nocheck: playwright-service-flag # nocheck: variants-coverage — sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in diff --git a/roles/web-app-prometheus/templates/nginx/healthz.conf.j2 b/roles/web-app-prometheus/templates/nginx/healthz.conf.j2 index 01e6864639..ef5282c46f 100644 --- a/roles/web-app-prometheus/templates/nginx/healthz.conf.j2 +++ b/roles/web-app-prometheus/templates/nginx/healthz.conf.j2 @@ -49,6 +49,7 @@ } {% set prometheus_backend = lookup('proxy_pass', application_id, proxy_service_key | default(application_id | get_entity_name), 'http', tail='/', local_port=http_port, internal_port=proxy_internal_port | default('')) %} +{% set prometheus_ready_backend = lookup('proxy_pass', application_id, proxy_service_key | default(application_id | get_entity_name), 'http', tail='/' ~ lookup('config', application_id, 'services.prometheus.ready_path', ''), local_port=http_port, internal_port=proxy_internal_port | default('')) %} location = /_live_probe { internal; {{ prometheus_backend }} @@ -60,7 +61,7 @@ location = /healthz/ready { access_log off; - {{ prometheus_backend }} + {{ prometheus_ready_backend }} proxy_set_header Host $host; proxy_connect_timeout 3s; proxy_read_timeout 5s; diff --git a/roles/web-svc-xmpp/meta/services.yml b/roles/web-svc-xmpp/meta/services.yml index fa9d91822b..0096bcf9dd 100644 --- a/roles/web-svc-xmpp/meta/services.yml +++ b/roles/web-svc-xmpp/meta/services.yml @@ -7,6 +7,7 @@ prometheus: bond: 1 enabled: "{{ 'web-app-prometheus' in group_names }}" shared: "{{ 'web-app-prometheus' in group_names }}" + ready_path: admin/ sso: bond: 1 enabled: "{{ 'web-app-keycloak' in group_names }}" From 0dbea6bf75b93757b93333a44cfbb96060d57388 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Oct 2026 03:45:35 +0000 Subject: [PATCH 11/16] chore(deps-dev): Bump eslint-plugin-playwright from 2.10.5 to 2.12.1 Bumps [eslint-plugin-playwright](https://github.com/mskelton/eslint-plugin-playwright) from 2.10.5 to 2.12.1. - [Release notes](https://github.com/mskelton/eslint-plugin-playwright/releases) - [Changelog](https://github.com/mskelton/eslint-plugin-playwright/blob/main/CHANGELOG.md) - [Commits](https://github.com/mskelton/eslint-plugin-playwright/compare/v2.10.5...v2.12.1) --- updated-dependencies: - dependency-name: eslint-plugin-playwright dependency-version: 2.12.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3991767cf4..1d40cf4db5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@eslint/js": "^10.0.1", "@playwright/test": "^1.63.0", "eslint": "^10.12.0", - "eslint-plugin-playwright": "^2.10.5", + "eslint-plugin-playwright": "^2.12.1", "globals": "^17.13.0", "stylelint": "^17.16.0" } @@ -907,9 +907,9 @@ } }, "node_modules/eslint-plugin-playwright": { - "version": "2.10.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-2.10.5.tgz", - "integrity": "sha512-4k+ml4cEd55kePUIW1WsCiOLDwZkAdPZPKMFulR83XpplCaVOTKHF6yvXLYixLtdVbkMjmKV5F3BaGuI3aH8aQ==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-2.12.1.tgz", + "integrity": "sha512-JhavNuYBIq7SE/Zg9Esf9RGHkXoDbzrEKS383cowzMyvZ4JMbmdNCN6CoW+RU1Cjzwcoea1tou0je58uXmT/9A==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 799548eab2..d52cb43baa 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@eslint/js": "^10.0.1", "@playwright/test": "^1.63.0", "eslint": "^10.12.0", - "eslint-plugin-playwright": "^2.10.5", + "eslint-plugin-playwright": "^2.12.1", "globals": "^17.13.0", "stylelint": "^17.16.0" }, From 2c3cb6964c4dd04b26e7f36beea86ce35263576b Mon Sep 17 00:00:00 2001 From: "infinito-nexus-updater[bot]" <286144613+infinito-nexus-updater[bot]@users.noreply.github.com> Date: Fri, 9 Oct 2026 07:03:40 +0000 Subject: [PATCH 12/16] update(versions): update pins with a declared source (web-app-gitea) --- roles/web-app-gitea/meta/services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/web-app-gitea/meta/services.yml b/roles/web-app-gitea/meta/services.yml index ac35951047..bd57ce9239 100644 --- a/roles/web-app-gitea/meta/services.yml +++ b/roles/web-app-gitea/meta/services.yml @@ -112,7 +112,7 @@ giteamcpupstream: enabled: "{{ lookup('config', 'web-app-gitea', 'mcp.enabled') | bool }}" shared: false image: docker.gitea.com/gitea-mcp-server - version: "1.8.0" + version: "1.8.1" update: type: registry_tags image: docker.gitea.com/gitea-mcp-server From a522b459ec6d47a6bff18edffc5dd70589531165 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 9 Oct 2026 09:29:58 +0200 Subject: [PATCH 13/16] fix(web-app-prometheus): bind the docker data root cAdvisor actually reads cAdvisor bound a hardcoded /var/lib/docker/. When the daemon keeps its data root elsewhere, swarm rejects the task because the bind source does not exist ("invalid mount config for type bind: bind source path does not exist: /var/lib/docker/") and the stack never converges. In main run 37856203791 all 18 swarm jobs that deploy Prometheus failed this way after scripts/tests/deploy/utils/filesystem/docker_dataroot.sh moved every node's data root to /mnt/docker-fs/docker, on ext4, btrfs and zfs alike. The role now reads DockerRootDir from the daemon on STACK_HOST and binds that path as source and target. cAdvisor v0.55.1 takes its storage dir from docker info, so the target has to follow the daemon's root instead of staying at /var/lib/docker. The probe needs the container CLI and a running daemon, which a single-role compose deploy only gets later from sys-svc-container inside sys-stk-backend, so the role loads it first under the usual run-once guard. Verified with a local compose deploy of variant 2: the rendered compose file carries /var/lib/docker:/var/lib/docker:ro from the probe and cAdvisor runs healthy. Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/web-app-prometheus/meta/volumes.yml | 4 ++-- roles/web-app-prometheus/tasks/00_core.yml | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/roles/web-app-prometheus/meta/volumes.yml b/roles/web-app-prometheus/meta/volumes.yml index 62de8fec3b..509b5cf68e 100644 --- a/roles/web-app-prometheus/meta/volumes.yml +++ b/roles/web-app-prometheus/meta/volumes.yml @@ -75,11 +75,11 @@ host_sys: host_var_lib_docker: type: bind - source: "/var/lib/docker/" + source: &docker_root "{{ prometheus_docker_info.stdout }}" read_only: true mounts: - service: cadvisor - target: /var/lib/docker + target: *docker_root host_dev_disk: type: bind diff --git a/roles/web-app-prometheus/tasks/00_core.yml b/roles/web-app-prometheus/tasks/00_core.yml index 1330796833..5ea27032c9 100644 --- a/roles/web-app-prometheus/tasks/00_core.yml +++ b/roles/web-app-prometheus/tasks/00_core.yml @@ -6,6 +6,19 @@ vars: mcp_adapter_instance_dir: "{{ PROMETHEUS_MCP_INSTANCE_DIR }}" when: PROMETHEUS_MCP_ENABLED | bool + +- name: "🧩 Load the container CLI the data root probe calls" + include_role: + name: sys-svc-container + public: false + when: run_once_sys_svc_container is not defined + +- name: "🔎 Read the docker data root cAdvisor has to bind" + ansible.builtin.command: container info --format '{{ "{{" }}.DockerRootDir{{ "}}" }}' + register: prometheus_docker_info + changed_when: false + delegate_to: "{{ STACK_HOST }}" + - name: "🧩 load docker and proxy for '{{ application_id }}'" include_role: name: sys-stk-backend From a17ea27a6bce6b01ce4a761c4e194dd8909af757 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 9 Oct 2026 10:00:37 +0200 Subject: [PATCH 14/16] fix(web-app-matomo): allow the inline handler Matomo core puts in its top bar Matomo 5.14.0 renders the "What's new" entry of its top bar, once for the desktop menu and once for the mobile one, as (plugins/CoreAdminHome/Menu.php). Without the logout service, script-src-attr carries only 'self' 'unsafe-eval', so the browser blocks both handlers. Playwright 1.64 (Chromium 156, f1dbd2d92f) now reports those blocks on the console, and the administrator login spec of variant 1 fails on them. That broke the three compose workspace jobs of main run 37856203791. The same variant passed on Playwright 1.63 with an identical header. script-src-attr now carries 'unsafe-inline', which every logout-enabled deploy already serves through the logout injector. The CSP filter deduplicates the token there, and script-src keeps the 'unsafe-inline' it already unions in from script-src-elem. Verified on a local variant 1 stack. The Playwright trace shows exactly those two onclick anchors. With the header patched live, the spec passes; with the original header restored, it fails again with the same two violations. Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/web-app-matomo/meta/csp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/web-app-matomo/meta/csp.yml b/roles/web-app-matomo/meta/csp.yml index 356e418b88..2b7813bbfc 100644 --- a/roles/web-app-matomo/meta/csp.yml +++ b/roles/web-app-matomo/meta/csp.yml @@ -7,6 +7,7 @@ whitelist: flags: script-src-attr: unsafe-eval: true # nocheck: csp-unsafe Reason: historical, TODO: re-verify it is really required and does not open attack surface + unsafe-inline: true # nocheck: csp-unsafe Reason: Matomo core renders the top-bar "What's new" entry with an inline onclick (plugins/CoreAdminHome/Menu.php); logout-enabled deploys already grant it through the logout injector script-src-elem: unsafe-inline: true # nocheck: csp-unsafe Reason: historical, TODO: re-verify it is really required and does not open attack surface unsafe-eval: true # nocheck: csp-unsafe Reason: historical, TODO: re-verify it is really required and does not open attack surface From c715b02b31eb6620dcf8425ad7b327a47b5253f0 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 9 Oct 2026 10:05:34 +0200 Subject: [PATCH 15/16] chore(web-app-bigbluebutton): apply the quoting autoformat writes for the release regexes Every make quality run rewrites the three http_regex patterns in meta/services.yml from single to double quotes and leaves the tree dirty. Both forms load to the same strings; committing the autoformat output ends the drift. Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/web-app-bigbluebutton/meta/services.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/web-app-bigbluebutton/meta/services.yml b/roles/web-app-bigbluebutton/meta/services.yml index 41c1436a14..1391350f6f 100644 --- a/roles/web-app-bigbluebutton/meta/services.yml +++ b/roles/web-app-bigbluebutton/meta/services.yml @@ -119,7 +119,7 @@ freeswitch: update: type: http_regex url: https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags - pattern: 'repos/bigbluebutton (?Pv[0-9.]+)\nrepos/freeswitch (?Pv[0-9.]+)' + pattern: "repos/bigbluebutton (?Pv[0-9.]+)\\nrepos/freeswitch (?Pv[0-9.]+)" template: "{freeswitch}-{bbb}" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only @@ -132,7 +132,7 @@ nginx: url: - https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags - https://raw.githubusercontent.com/bigbluebutton/docker/develop/docker-compose.tmpl.yml - pattern: 'repos/bbb-playback (?Pv[0-9.]+)\n(?:.*\n)*?repos/bigbluebutton (?Pv[0-9.]+)\n(?:.*\n)*?.*bbb-docker-nginx:.*-(?P[0-9.]+)\n' + pattern: "repos/bbb-playback (?Pv[0-9.]+)\\n(?:.*\\n)*?repos/bigbluebutton (?Pv[0-9.]+)\\n(?:.*\\n)*?.*bbb-docker-nginx:.*-(?P[0-9.]+)\\n" template: "{bbb}-{playback}-{base}" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only @@ -145,7 +145,7 @@ etherpad: url: - https://raw.githubusercontent.com/bigbluebutton/docker/develop/repos/tags - https://raw.githubusercontent.com/bigbluebutton/docker/develop/docker-compose.tmpl.yml - pattern: 'repos/bbb-etherpad-plugin (?P[0-9a-f]+)\nrepos/bbb-etherpad-skin (?P[0-9a-f]+)\n(?:.*\n)*?.*bbb-docker-etherpad:(?P[0-9.]+)-s' + pattern: "repos/bbb-etherpad-plugin (?P[0-9a-f]+)\\nrepos/bbb-etherpad-skin (?P[0-9a-f]+)\\n(?:.*\\n)*?.*bbb-docker-etherpad:(?P[0-9.]+)-s" template: "{base}-s{skin}-p{plugin}" enabled: false # nocheck: playwright-service-flag: prebuilt upstream-compose image, mirror pre-pull only From b9c1d6e51cab0bc33af7e1fd22750dce601af27a Mon Sep 17 00:00:00 2001 From: "infinito-nexus-updater[bot]" <286144613+infinito-nexus-updater[bot]@users.noreply.github.com> Date: Fri, 9 Oct 2026 08:07:52 +0000 Subject: [PATCH 16/16] update(images): update Docker image versions (web-svc-collabora) --- roles/web-svc-collabora/meta/services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/web-svc-collabora/meta/services.yml b/roles/web-svc-collabora/meta/services.yml index f36cc05eba..517f7fccfe 100644 --- a/roles/web-svc-collabora/meta/services.yml +++ b/roles/web-svc-collabora/meta/services.yml @@ -25,7 +25,7 @@ collabora: enabled: true shared: true image: collabora/code - version: "26.04.4.2.1" + version: "26.04.5.1.1" name: collabora min_storage: 734MB cpus: 2