Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Imagestream fixes (#665)
Browse files Browse the repository at this point in the history
Only open one reconcilation PR at a time if component is using fallback branch
Prior to this change, a component that only has a 'master' branch, for example,
would have that branch used as a fallback for all active releases. This
made imagestreams open a PR against the master branch for reconciliation.
In these cases, we should only open a reconciliation PR against master when
the current group matches what release CI is tracking for master branches.
  • Loading branch information
jupierce committed Oct 6, 2022
1 parent f4f7f0e commit 4b5b746
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doozerlib/cli/images_streams.py
Expand Up @@ -728,6 +728,14 @@ def check_if_upstream_image_exists(upstream_image):
if not public_branch:
public_branch = source_repo_branch

if (public_branch == 'master' or public_branch == 'main') and not prs_in_master:
# If a component is not using 'release-4.x' / 'openshift-4.x' branching mechanics,
# ART will be falling back to use master/main branch for the content of ALL
# releases. In this case, only open a reconciliation PR for when the current
# group matches what release CI is tracking in master.
logger.info(f'Skipping PR for {runtime.group} : {dgk} / {public_repo_url} since associated public branch is {public_branch} but CI is tracking {master_major}.{master_minor} in that branch.')
continue

# There are two standard upstream branching styles:
# release-4.x : CI fast-forwards from default branch (master or main) when appropriate
# openshift-4.x : Upstream team manages completely.
Expand Down

0 comments on commit 4b5b746

Please sign in to comment.