#123 DRAFT: determine_rhel_state: Handle z-stream branches
Opened 6 days ago by sgallagh. Modified 6 days ago
centos/ sgallagh/centpkg zstream  into  develop

file modified
+7 -4
@@ -516,7 +516,9 @@ 

      # First, check if this package has a RHEL counterpart or is CentOS Stream

      # only.

      try:

-         if repo_name in get_unsynced_projects(distrobaker_config, namespace):

+         if not cs_branch.startswith("rhel-") and repo_name in get_unsynced_projects(

+             distrobaker_config, namespace

+         ):

              # We don't need to do any looking up, because it will always use the

              # stream version and never enforce tickets. It will return

              # rhel_target_default="none" to instruct distrobaker not to attempt
@@ -536,9 +538,10 @@ 

      try:

          x_version, rhel_version = stream_mapping(cs_branch)

      except StreamMappingError as e:

-         # This is not a standard branch name, so it's probably either a custom

-         # branch or a module stream branch. Either way, we'll return it as-is

-         # and always treat it as if it is in enforcing mode.

+         # This is not a standard branch name, so it's probably a RHEL Z-stream

+         # branch, a custom branch or a module stream branch. In any of these

+         # cases, we'll return it as-is and always treat it as if it is in

+         # enforcing mode.

          return rhel_state_nt(

              latest_version=cs_branch,

              target_version=cs_branch,

This function is called by the check-tickets task in the Gitlab
pipelines, which now also run for Z-stream branches for some RHEL
packages. We need to ensure that they are properly validating the rules
for those Z-stream branches. Prior to this patch, they were being
bundled into the handling for stream branches (which is to say their
rules were being ignored).

Signed-off-by: Stephen Gallagher sgallagh@redhat.com

This is /untested/, but I think it should work; I'll try to test it when I'm back in the office on Monday.

Metadata