From dab0c7c606801a7266ee5c65135a66af6f8e0e30 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 6 Oct 2023 11:57:01 +0000 Subject: [PATCH] Use Debian major version in Debian wheel filenames Between September 4 and 5, our wheel cache publication began failing for Debian distributions. The ansible_distribution_version fact began to differentiate between Debian minor versions (so e.g. bullseye went from "11" to "11.7"), and this does not match our cache scheme in AFS so resulted in attempts to write to a nonexistent directory. This corresponds to when I9527fc847e18a80414139ebd6f19a9dbb9a5778e merged to switch the tenant's default Ansible version to 8, so is very likely a behavior change in Ansible itself. Switch the logic in our wheel-mirror playbook to use ansible_distribution_major_version like we do for Ubuntu, and rename the tasks to be a little more generic. Change-Id: Ie95e99bce1ed01aa9c284871b517e6c28c278d16 --- playbooks/publish/wheel-mirror.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/playbooks/publish/wheel-mirror.yaml b/playbooks/publish/wheel-mirror.yaml index 3aeb7fe5e3..f60da83fb8 100644 --- a/playbooks/publish/wheel-mirror.yaml +++ b/playbooks/publish/wheel-mirror.yaml @@ -7,16 +7,16 @@ serial: 1 pre_tasks: - - name: Generate AFS slug - CentOS + - name: Generate AFS slug - Major version distros set_fact: afs_slug: "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}" - when: ansible_distribution == "CentOS" + when: ansible_distribution == "CentOS" or + ansible_distribution == "Debian" - - name: Generate AFS slug - Debuntu + - name: Generate AFS slug - Major.Minor version distros set_fact: afs_slug: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}-{{ ansible_architecture }}" - when: ansible_distribution == "Ubuntu" or - ansible_distribution == "Debian" + when: ansible_distribution == "Ubuntu" - name: Set fact for AFS dir set_fact: