| |
@@ -44,6 +44,10 @@
|
| |
pp_phase_maintenance = 600
|
| |
pp_phase_name_lookup[pp_phase_maintenance] = "Maintenance"
|
| |
|
| |
+ # Phase 1000 is "Unsupported" (AKA, end-of-life)
|
| |
+ pp_phase_unsupported = 1000
|
| |
+ pp_phase_name_lookup[pp_phase_unsupported] = "Unsupported"
|
| |
+
|
| |
# Default lookup location for unsynced packages
|
| |
default_distrobaker_config = "https://gitlab.cee.redhat.com/osci/distrobaker_config/-/raw/rhel9/distrobaker.yaml?ref_type=heads"
|
| |
|
| |
@@ -525,9 +529,7 @@
|
| |
|
| |
# Query the "package pages" API for the current active Y-stream release
|
| |
request_params = {
|
| |
- "phase__in": "{},{}".format(
|
| |
- pp_phase_devtestdoc, pp_phase_stabilization, pp_phase_maintenance
|
| |
- ),
|
| |
+ "phase__in": f"{pp_phase_devtestdoc},{pp_phase_stabilization},{pp_phase_maintenance},{pp_phase_unsupported}",
|
| |
"product__shortname": "rhel",
|
| |
"relgroup__shortname": rhel_version,
|
| |
"format": "json",
|
| |
@@ -612,27 +614,44 @@
|
| |
prior_release_branch = format_branch(
|
| |
x_version, active_y_version - 1, is_beta=False
|
| |
)
|
| |
+ current_release_branch = format_branch(x_version, active_y_version, is_beta=False)
|
| |
|
| |
logger.debug("Prior release branch: {}".format(prior_release_branch))
|
| |
|
| |
- try:
|
| |
- branch_exists = does_branch_exist(
|
| |
- rhel_dist_git, namespace, repo_name, prior_release_branch
|
| |
- )
|
| |
- except gitpython.GitCommandError as e:
|
| |
- raise RHELError("Could not read from RHEL dist-git. Are you on the VPN?")
|
| |
+ # Determine which phase the prior release is in:
|
| |
+ prior_release_phase = phase_lookup[prior_release_branch]
|
| |
+
|
| |
+ # If the prior release is in the Unsupported Phase, it probably means
|
| |
+ # that we're dealing with an EOL CentOS Stream (like 8.10). We need
|
| |
+ # to use the stream rules in this case.
|
| |
+ prior_is_eol = bool(prior_release_phase == pp_phase_unsupported)
|
| |
|
| |
- if branch_exists:
|
| |
- # The branch is there, so work on the active Y-stream, which is always
|
| |
- # in DevTestDoc Phase
|
| |
- phase = pp_phase_devtestdoc
|
| |
+ if not prior_is_eol:
|
| |
+ try:
|
| |
+ branch_exists = does_branch_exist(
|
| |
+ rhel_dist_git, namespace, repo_name, prior_release_branch
|
| |
+ )
|
| |
+ except gitpython.GitCommandError as e:
|
| |
+ raise RHELError("Could not read from RHEL dist-git. Are you on the VPN?")
|
| |
+
|
| |
+ if prior_is_eol or branch_exists:
|
| |
+ # The branch is there or the previous branch is EOL, so work on the
|
| |
+ # active Y-stream, which is always in either DevTestDoc Phase or
|
| |
+ # Maintenance Phase (in the case of an end-of-life CentOS Stream)
|
| |
+ # We'll catch the unexpected case of Unsupported Phase as well, just
|
| |
+ # to be safe.
|
| |
+ phase = phase_lookup[current_release_branch]
|
| |
check_tickets_branch = cs_branch
|
| |
rhel_target_default = "latest"
|
| |
- enforcing = False
|
| |
target_version = latest_version
|
| |
+ if phase >= pp_phase_maintenance:
|
| |
+ enforcing = True
|
| |
+ else:
|
| |
+ enforcing = False
|
| |
else:
|
| |
# The branch is not present, so we'll work on the prior Y-stream
|
| |
check_tickets_branch = prior_release_branch
|
| |
+ phase = prior_release_phase
|
| |
|
| |
target_x, target_y, target_extra = parse_rhel_branchname(prior_release_branch)
|
| |
target_version = "{}.{}{}".format(
|
| |
@@ -645,9 +664,6 @@
|
| |
# phase, so it always enforces.
|
| |
enforcing = True
|
| |
|
| |
- # Determine which phase the prior release is in:
|
| |
- phase = phase_lookup[prior_release_branch]
|
| |
-
|
| |
if phase == pp_phase_stabilization:
|
| |
# We're in the Stabilization phase, so we can't automatically determine
|
| |
# between the "zstream" and "exception" targets.
|
| |
The string wasn't updated properly to include the MAINTENANCE phase
lookup, so it broke detection of RHEL 8.10.
Signed-off-by: Stephen Gallagher sgallagh@redhat.com