cluster-network-addons-operator icon indicating copy to clipboard operation
cluster-network-addons-operator copied to clipboard

Release process: Wrong versions might be created if no minor exists

Open oshoval opened this issue 7 months ago • 2 comments

What happened: If there is a stable branch named X (lets use real case 0.89.0) releasing on main must first create a minor that will assign the next available release Y (0.90.0) before issuing patch versions. Otherwise it might create release 0.89.1 which is reserved for the stable branch. This in turn cause both the new release and the old release to conflict on both U/S HCO, and on D/S.

Note that it means that when there is a stable branch for Y, it won't start with patch x.y.0.

What you expected to happen: We should add logic that prevent creating patch release on main for already existing stable branches.

How to reproduce it (as minimally and precisely as possible): Don't :) see https://github.com/kubevirt/cluster-network-addons-operator/pull/1611 which created a patch on main before creating a new minor which doesn't belong to a stable branch.

Anything else we need to know?: Once it happened we had to revert the broken release PR, untag manually, delete release. and recreate releases on both the branch and main, Then HCO could bump correctly, without images getting overriden.

Additional possible follow ups:

  1. We might want to add logic to post submit that in case either tag or quay / release isn't created it will send email / comment on the PR. (checking in parallel if we can comment on post submits, on both good / bad flows)
  2. We can consider adding additional checks, for example that if tag already exists it will fail directly, but with the above protection not sure we need.

We should assert that no minors are created on branches, but they first created on main and then from there we branch. Otherwise we would have problems like we had here (see PR desc) https://github.com/kubevirt/cluster-network-addons-operator/pull/1791 and would need to create releases manually.

Environment:

/cc @RamLavi

oshoval avatar Nov 12 '23 15:11 oshoval