From 2bb5009c81dbbb51c0235d36c21f8738e02e7896 Mon Sep 17 00:00:00 2001 From: Ben Hearsum Date: Wed, 17 Apr 2024 08:34:11 -0400 Subject: [PATCH] hack: Keep 125.0.1 as a major version --- api/src/shipit_api/admin/product_details.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/api/src/shipit_api/admin/product_details.py b/api/src/shipit_api/admin/product_details.py index eb2210efa..b434a8c49 100644 --- a/api/src/shipit_api/admin/product_details.py +++ b/api/src/shipit_api/admin/product_details.py @@ -455,16 +455,24 @@ def get_release_history( continue # skip all releases which don't fit into product category - if product_category is ProductCategory.MAJOR and ( - release_version.patch_number is not None or release_version.beta_number is not None or release_version.is_esr - ): - continue + # short term hack: 125.0.1 is a major release. we should replace this with + # https://github.com/mozilla-releng/mozilla-version/pull/109 + if not (release_version.major_number != "125" and release_version.patch_number != "1"): + if product_category is ProductCategory.MAJOR and ( + release_version.patch_number is not None or release_version.beta_number is not None or release_version.is_esr + ): + continue elif product_category is ProductCategory.DEVELOPMENT and (release_version.beta_number is None or release_version.is_esr): continue - elif product_category is ProductCategory.STABILITY and (release_version.beta_number is not None or release_version.patch_number is None): - continue + elif product_category is ProductCategory.STABILITY: + # short term hack: 125.0.1 is a major release. we should replace this with + # https://github.com/mozilla-releng/mozilla-version/pull/109 + if not (release_version.major_number == "125" and release_version.patch_number == "1"): + continue + if (release_version.beta_number is not None or release_version.patch_number is None): + continue history_version = release.version if history_version.endswith("esr"):