ITSD-611934: Compare cached/supplied versions case-insensitively

LooseVersion only tokenises lowercase letters, so an uppercase qualifier
such as 11.0.0-CONFDCDEV-4353-m02 became a single '-CONFDCDEV-' component
that sorted above the GA '-z' marker. The cached milestone therefore won
over the supplied GA release and upgrades silently reinstalled the
milestone. Lowercase both values before comparing (comparison only).

Adds product_install/confluence_cached_with_upgrade as a regression test.
This commit is contained in:
Lee Goolsbee
2026-10-09 11:53:19 -05:00
parent 1a3c5b7392
commit 60d5a09d23
6 changed files with 122 additions and 4 deletions

View File

@@ -66,6 +66,13 @@
# there is some test logic hack to allow atlassian specfic versioning
# requirements to work as expected ie - (7.2.0 to upgrade over 7.2.0-rc1) and
# (7.2.0-beta1 to upgrade over 7.2.0-m01) in "version is not latest"
#
# The comparison values are lowercased first. LooseVersion only splits
# lowercase letters into their own components, so an uppercase qualifier
# (e.g. 11.0.0-CONFDCDEV-4353-m02) would otherwise become a single '-CONFDCDEV-'
# component that sorts *above* the GA '-z' marker, causing the cached
# milestone to win over the supplied GA release. Lowercasing only affects
# the comparison; the real version strings are left untouched.
- name: "Case: Version is latest"
block:
@@ -91,8 +98,8 @@
- name: "create atlassian ordered versioning for comparison"
ansible.builtin.set_fact:
atl_product_normalised_version: "{{ atl_z_product_version | replace('-m', '-am') }}"
atl_cached_normalised_version: "{{ atl_z_cached_version | replace('-m', '-am') }}"
atl_product_normalised_version: "{{ atl_z_product_version | lower | replace('-m', '-am') }}"
atl_cached_normalised_version: "{{ atl_z_cached_version | lower | replace('-m', '-am') }}"
- name: "Case: No cached version, or supplied is higher; use supplied"
ansible.builtin.set_fact: