Skip to content

Commit

Permalink
expand emu version range
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefftree committed Nov 8, 2024
1 parent 854a83a commit aaff5bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions staging/src/k8s.io/component-base/version/version.go
Original file line number Diff line number Diff line change
@@ -136,13 +136,13 @@ func (m *effectiveVersion) Validate() []error {

// emulationVersion can only be 1.{binaryMinor-1}...1.{binaryMinor}.
maxEmuVer := binaryVersion
minEmuVer := binaryVersion.SubtractMinor(1)
minEmuVer := binaryVersion.SubtractMinor(2)
if emulationVersion.GreaterThan(maxEmuVer) || emulationVersion.LessThan(minEmuVer) {
errs = append(errs, fmt.Errorf("emulation version %s is not between [%s, %s]", emulationVersion.String(), minEmuVer.String(), maxEmuVer.String()))
}
// minCompatibilityVersion can only be 1.{binaryMinor-1} for alpha.
maxCompVer := binaryVersion.SubtractMinor(1)
minCompVer := binaryVersion.SubtractMinor(1)
minCompVer := binaryVersion.SubtractMinor(2)
if minCompatibilityVersion.GreaterThan(maxCompVer) || minCompatibilityVersion.LessThan(minCompVer) {
errs = append(errs, fmt.Errorf("minCompatibilityVersion version %s is not between [%s, %s]", minCompatibilityVersion.String(), minCompVer.String(), maxCompVer.String()))
}

0 comments on commit aaff5bd

Please sign in to comment.