From 6dbeb9418a3a385dc529584bab10a25e21ad8561 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 4 Aug 2026 17:55:22 +0300 Subject: [PATCH] Stop reusing one fact name for two deprecation checks The `matrix_redis_` -> `redis_` check and the `redis_` -> `valkey_` check both stored their matches in `matrix_playbook_migration_redis_migration_vars`. Facts persist for the whole play, so the second check was silently overwriting the first one's value. Nothing reads these facts outside the block that sets them, so this was harmless in practice, but it breaks as soon as anyone reorders the checks, reads a fact later on, or disables one of the two checks and expects the other's value to still be around. Name the second one after its own check, like every other check here does. Co-Authored-By: Claude Opus 5 (1M context) --- .../matrix_playbook_migration/tasks/validate_config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/custom/matrix_playbook_migration/tasks/validate_config.yml b/roles/custom/matrix_playbook_migration/tasks/validate_config.yml index 2bde49ee2..8111d2846 100644 --- a/roles/custom/matrix_playbook_migration/tasks/validate_config.yml +++ b/roles/custom/matrix_playbook_migration/tasks/validate_config.yml @@ -270,7 +270,7 @@ - when: matrix_playbook_migration_redis_valkey_migration_validation_enabled | bool block: - ansible.builtin.set_fact: - matrix_playbook_migration_redis_migration_vars: |- + matrix_playbook_migration_redis_valkey_migration_vars: |- {{ lookup('ansible.builtin.varnames', '^redis_.+', wantlist=True) }} - name: (Deprecation) Catch and report redis variables @@ -282,8 +282,8 @@ After renaming them, please do not forget to fetch the Ansible role. See docs/maintenance-upgrading-services.md for details about how to do so. - The following variables in your configuration need to be renamed: {{ matrix_playbook_migration_redis_migration_vars | join(', ') }} - when: "matrix_playbook_migration_redis_migration_vars | length > 0" + The following variables in your configuration need to be renamed: {{ matrix_playbook_migration_redis_valkey_migration_vars | join(', ') }} + when: "matrix_playbook_migration_redis_valkey_migration_vars | length > 0" - when: matrix_playbook_migration_keydb_valkey_migration_validation_enabled | bool block: