ソースを参照

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) <noreply@anthropic.com>
pull/5494/head
Slavi Pantaleev 2週間前
コミット
6dbeb9418a
1個のファイルの変更3行の追加3行の削除
  1. +3
    -3
      roles/custom/matrix_playbook_migration/tasks/validate_config.yml

+ 3
- 3
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:


読み込み中…
キャンセル
保存