fix(xwiki): rotate the swarm config name so the final deploy converges

In the swarm-DinD test the ansible controller (ansible_connection: docker) cannot read the STACK_HOST-rendered xwiki.properties, so compose_volumes' content hash falls back to the source path and the config name is constant. xwiki deploys twice (bootstrap with the OIDC block off, final with it on after the extension installs), so the config content changes but the name does not, and the final docker stack deploy fails to update the immutable config with 'only updates to Labels are allowed'.

Honor an explicit name: on config/secret entries in compose_volumes (volumes already did), and give xwiki's properties config a name that rotates with the OIDC phase, so the final deploy creates a new config instead of updating in place. Backward-compatible: no other role sets name: on a config. make test green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 4.8 committed 2026-07-03 01:11:19 +02:00
1 parent 84296b2451
commit 9bf35d672a
2 files changed
+5 -2

No files matched your search

+4 -2
View File
@@ -255,7 +255,8 @@ def compose_volumes(
if vtype == "config":
source = _maybe_render(entry.get("source", ""), render_jinja)
configs[semantic_name] = {
"name": _config_secret_name(role_entity, semantic_name, source),
"name": _maybe_render(entry.get("name", ""), render_jinja)
or _config_secret_name(role_entity, semantic_name, source),
"file": source,
}
continue
@@ -263,7 +264,8 @@ def compose_volumes(
if vtype == "secret":
source = _maybe_render(entry.get("source", ""), render_jinja)
secrets[semantic_name] = {
"name": _config_secret_name(role_entity, semantic_name, source),
"name": _maybe_render(entry.get("name", ""), render_jinja)
or _config_secret_name(role_entity, semantic_name, source),
"file": source,
}
continue
+1
View File
@@ -8,6 +8,7 @@ data:
properties:
type: config
name: "xwiki_properties_{{ 'oidc' if xwiki_oidc_enabled_switch | default(false) | bool else 'std' }}"
source: "{{ [lookup('container', 'web-app-xwiki', 'directories.config'), 'xwiki.properties'] | path_join }}"
mode: "0440"
mounts: