Skip to content

Commit bc96ced

Browse files
committed
HIVE-2769: bundle-gen: skip konflux branches
- With the coordinated release process, we will often be generating OperatorHub bundles from an explicit commit that is behind the tip of `master`. - The routine that searches for the branch associated with such a commit (used to determine the semver major.minor) was written before konflux started polluting our ref space. The combination was resulting in errors like: ``` $ ./hack/bundle-gen.py --commit b19773e Cloning [email protected]:openshift/hive.git to /tmp/hive-repo-h5ctac_7 Working in /tmp/hive-repo-h5ctac_7 Trying to discover a suitable branch from commit b19773e... descendants: {'master', 'konflux/references/master'} Could not determine a branch! Please specify one explicitly. ``` This change explicitly skips refs with `konflux/` in their name, as they're never* the one we're looking for. *...until, perhaps, such a time as we start using konflux builds for OperatorHub bundles? Even then, though, I'm pretty sure we would still be wanting to discover `master` in this routine.
1 parent a6e61d6 commit bc96ced

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hack/version2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _branch_from_commit(self, commit_ish: str):
120120
return commit_ish
121121

122122
refname = ref.remote_head if ref.is_remote() else ref.name
123-
if refname == "HEAD":
123+
if refname == "HEAD" or 'konflux/' in refname:
124124
continue
125125

126126
# Okay, now start using self._commit, which is already rev_parse()d.

0 commit comments

Comments
 (0)