From 3886debfa1c1da3b372899e67436bbb1f4a2149a Mon Sep 17 00:00:00 2001 From: Vault Automation Date: Tue, 23 Sep 2025 14:36:29 -0400 Subject: [PATCH] enos: handle upgrade from FIPS 140-2 editions for all mixed release branches (#9408) (#9472) Signed-off-by: Ryan Cragun Co-authored-by: Ryan Cragun --- enos/enos-scenario-autopilot.hcl | 6 ++---- enos/enos-scenario-upgrade.hcl | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/enos/enos-scenario-autopilot.hcl b/enos/enos-scenario-autopilot.hcl index ba5ec5456c..d025cbf50a 100644 --- a/enos/enos-scenario-autopilot.hcl +++ b/enos/enos-scenario-autopilot.hcl @@ -303,10 +303,8 @@ scenario "autopilot" { packages = concat(global.packages, global.distro_packages[matrix.distro][global.distro_version[matrix.distro]]) release = { edition = strcontains(matrix.edition, "fips1403") ? ( - // Our eventual constraint will need to factor in each release branch that is mixed, e.g. - // semverconstraint(var.vault_upgrade_initial_version, "<=1.19.4-0,>=1.19.0-0 || <=1.18.10-0,>=1.18.0-0 || <=1.17.17-0,>=1.17.0-0 || <=1.16.21-0") - // But for now we've only got to consider before and after 1.19.4 - semverconstraint(var.vault_upgrade_initial_version, "<1.19.4-0") + // Handle mixed fips1402 edition lineages. + semverconstraint(var.vault_upgrade_initial_version, "<1.19.4-0,>=1.19.0-0 || <1.18.15-0,>=1.18.0-0 || <1.18.0,>=1.17.0-0 || <1.16.26-0") ? replace(matrix.edition, "fips1403", "fips1402") : matrix.edition ) : matrix.edition diff --git a/enos/enos-scenario-upgrade.hcl b/enos/enos-scenario-upgrade.hcl index 86eff6f92f..176949e44b 100644 --- a/enos/enos-scenario-upgrade.hcl +++ b/enos/enos-scenario-upgrade.hcl @@ -357,10 +357,8 @@ scenario "upgrade" { packages = concat(global.packages, global.distro_packages[matrix.distro][global.distro_version[matrix.distro]]) release = { edition = strcontains(matrix.edition, "fips1403") ? ( - // Our eventual constraint will need to factor in each release branch that is mixed, e.g. - // semverconstraint(var.vault_upgrade_initial_version, "<=1.19.4-0,>=1.19.0-0 || <=1.18.10-0,>=1.18.0-0 || <=1.17.17-0,>=1.17.0-0 || <=1.16.21-0") - // But for now we've only got to consider before and after 1.19.4 - semverconstraint(var.vault_upgrade_initial_version, "<1.19.4-0") + // Handle mixed fips1402 edition lineages. + semverconstraint(var.vault_upgrade_initial_version, "<1.19.4-0,>=1.19.0-0 || <1.18.15-0,>=1.18.0-0 || <1.18.0,>=1.17.0-0 || <1.16.26-0") ? replace(matrix.edition, "fips1403", "fips1402") : matrix.edition ) : matrix.edition