diff --git a/cli/contributing/update/README.md b/cli/contributing/update/README.md index 00eff7b60f..84e5e19a02 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 | | --------------- | --------------------- | -------------------------------------- | diff --git a/roles/svc-ai-ollama/meta/services.yml b/roles/svc-ai-ollama/meta/services.yml index 9258318c6b..b1bfbaf050 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.0 + version: 0.40.1 name: ollama gpu: true min_storage: 3473MB diff --git a/roles/web-app-bigbluebutton/meta/services.yml b/roles/web-app-bigbluebutton/meta/services.yml index bde7a3e1fc..280be150f5 100644 --- a/roles/web-app-bigbluebutton/meta/services.yml +++ b/roles/web-app-bigbluebutton/meta/services.yml @@ -104,55 +104,55 @@ prometheus: # nocheck: dynamic-flag: fixed upstream-compose sub-service, not group-gated bbb-web: image: alangecker/bbb-docker-web - version: "v3.0.39" + version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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" + version: "v1.10.12-v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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" + version: "v3.0.23-v5.4.4-1.29" # nocheck: docker-version: one release set with bigbluebutton.ref 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" + version: "2.4.2-s8328b77-p88f3f6b" # nocheck: docker-version: one release set with bigbluebutton.ref 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" + version: "v1.5.8" # nocheck: docker-version: one release set with bigbluebutton.ref 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.39" + version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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.24.0" + version: "v2.22.0" # nocheck: docker-version: one release set with bigbluebutton.ref 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.39" + version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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.39" + version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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 @@ -163,37 +163,37 @@ bbb-graphql-server: timeout: 10s retries: 5 image: alangecker/bbb-docker-graphql-server - version: "v3.0.39" + version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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.39" + version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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.39" + version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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" + version: "v3.0.0" # nocheck: docker-version: one release set with bigbluebutton.ref 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.39" + version: "v3.0.23" # nocheck: docker-version: one release set with bigbluebutton.ref 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" + version: "v0.14.0" # nocheck: docker-version: one release set with bigbluebutton.ref 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 diff --git a/roles/web-app-opentalk/README.md b/roles/web-app-opentalk/README.md index a0e8cd2c26..4e3c89ed38 100644 --- a/roles/web-app-opentalk/README.md +++ b/roles/web-app-opentalk/README.md @@ -15,7 +15,7 @@ This role deploys the OpenTalk stack using Docker Compose and exposes the web fr - **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. ## Developer Notes 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 9e7e2dcc42..db849d7e9d 100644 --- a/roles/web-app-opentalk/meta/services.yml +++ b/roles/web-app-opentalk/meta/services.yml @@ -65,7 +65,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 @@ -84,7 +88,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 @@ -147,7 +155,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 1e1e4a5d89..5d6c271172 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 261b9ac2ef..98cc90dd8a 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 | 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') }}" diff --git a/roles/web-app-socialhome/meta/services.yml b/roles/web-app-socialhome/meta/services.yml index b1f16bcb44..44f07fe13d 100644 --- a/roles/web-app-socialhome/meta/services.yml +++ b/roles/web-app-socialhome/meta/services.yml @@ -13,7 +13,7 @@ socialhome: # nocheck: default-placement-manager embedded sqlite in a node-local volume; no clustered storage placement: manager image: ghcr.io/social-home-io/socialhome - version: "2026.10.6" + version: "2026.10.7" ports: local: http: 8089 diff --git a/roles/web-app-wordpress/meta/services.yml b/roles/web-app-wordpress/meta/services.yml index e2bb223243..1e97e6e6a8 100644 --- a/roles/web-app-wordpress/meta/services.yml +++ b/roles/web-app-wordpress/meta/services.yml @@ -66,7 +66,7 @@ wordpress: enabled: true swarm: enabled: true - version: 7.1.2 + version: 7.1.3 image: wordpress custom: true name: wordpress 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/utils/update/base.py b/utils/update/base.py index 892cbd7be3..c4fa188346 100644 --- a/utils/update/base.py +++ b/utils/update/base.py @@ -105,3 +105,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 589495d8a4..37c737d1c6 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] = [] @@ -282,6 +301,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