@@ -78,11 +78,11 @@ func getNonVerifiedTagsJira(acceptedTags []*v1.TagReference) (current, previous
7878// from the previous minor version to use as the previousReleaseTag for nightly releases.
7979// For example, for "4.20.0-0.nightly", it would look for "4.19.0-rc.0" or "4.19.0-fc.0"
8080//
81- // Special test case: The 5 .0 -> 4.22 mapping serves as a test case for hardcoding a previous release
81+ // Special test case: The 6 .0 -> 5.55 mapping serves as a test case for hardcoding a previous release
8282// when the normal calculation logic would not work. Used 5.0 as it is not a planned OpenShift release.
8383// If a major version transition requires a specific previous release mapping, follow this pattern.
8484func (c * Controller ) calculatePreviousReleaseTagForNightly (currentVersion semver.Version ) (* releasecontroller.VerifyIssuesTagInfo , error ) {
85- // Get all stable releases (includes both 4-stable and 4 -dev-preview streams)
85+ // Get all stable releases (includes 4-stable, 4-dev-preview, 5- stable, and 5 -dev-preview streams)
8686 stableReleases , err := releasecontroller .GetStableReleases (c .parsedReleaseConfigCache , c .eventRecorder , c .releaseLister )
8787 if err != nil {
8888 return nil , fmt .Errorf ("unable to get stable releases: %w" , err )
@@ -91,14 +91,14 @@ func (c *Controller) calculatePreviousReleaseTagForNightly(currentVersion semver
9191 // Calculate the target minor version (previous minor)
9292 var targetMajor , targetMinor uint64
9393
94- // Special case: 5 .0 uses 4.22 as a test case for hardcoded previous release logic.
94+ // Special case: 6 .0 uses 5.55 as a test case for hardcoded previous release logic.
9595 // This demonstrates how to handle major version transitions that require a specific
96- // previous release rather than calculated previous minor. Using 5 .0 as this is not
97- // a planned release.
98- if currentVersion .Major == 5 && currentVersion .Minor == 0 {
99- targetMajor = 4
100- targetMinor = 22
101- klog .V (4 ).Infof ("jira: special case for version 5 .0, using hardcoded previous version 4.22 (test case)" )
96+ // previous release rather than calculated previous minor. Using 6 .0 as this is not
97+ // a planned release at this time .
98+ if currentVersion .Major == 6 && currentVersion .Minor == 0 {
99+ targetMajor = 5
100+ targetMinor = 55
101+ klog .V (4 ).Infof ("jira: special case for version 6 .0, using hardcoded previous version 5.55 (test case)" )
102102 } else if currentVersion .Minor == 0 {
103103 return nil , fmt .Errorf ("cannot calculate previous minor version for %d.%d" , currentVersion .Major , currentVersion .Minor )
104104 } else {
0 commit comments