소스 검색

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:


불러오는 중...
취소
저장