Skip to content

Commit

Permalink
chore(version): update furyctl compatibility chart
Browse files Browse the repository at this point in the history
We now support fury v1.28.6, v1.29.6, v1.30.1 and
v1.31.0.
  • Loading branch information
kriive committed Dec 18, 2024
1 parent 9735b40 commit d712086
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 30 deletions.
57 changes: 46 additions & 11 deletions internal/distribution/compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (c *EKSClusterCheck) IsCompatible() bool {
return false
}

max12EightVersion, err := semver.NewVersion("v1.28.5")
max12EightVersion, err := semver.NewVersion("v1.28.6")
if err != nil {
return false
}
Expand All @@ -105,7 +105,7 @@ func (c *EKSClusterCheck) IsCompatible() bool {
return false
}

max12NineVersion, err := semver.NewVersion("v1.29.5")
max12NineVersion, err := semver.NewVersion("v1.29.6")
if err != nil {
return false
}
Expand All @@ -115,7 +115,17 @@ func (c *EKSClusterCheck) IsCompatible() bool {
return false
}

max130Version, err := semver.NewVersion("v1.30.0")
max130Version, err := semver.NewVersion("v1.30.1")
if err != nil {
return false
}

min131Version, err := semver.NewVersion("v1.31.0")
if err != nil {
return false
}

max131Version, err := semver.NewVersion("v1.31.0")
if err != nil {
return false
}
Expand All @@ -125,7 +135,8 @@ func (c *EKSClusterCheck) IsCompatible() bool {
(currentVersion.GreaterThanOrEqual(min12SevenVersion) && currentVersion.LessThanOrEqual(max12SevenVersion)) ||
(currentVersion.GreaterThanOrEqual(min12EightVersion)) && currentVersion.LessThanOrEqual(max12EightVersion) ||
(currentVersion.GreaterThanOrEqual(min12NineVersion)) && currentVersion.LessThanOrEqual(max12NineVersion) ||
(currentVersion.GreaterThanOrEqual(min130Version)) && currentVersion.LessThanOrEqual(max130Version)
(currentVersion.GreaterThanOrEqual(min130Version)) && currentVersion.LessThanOrEqual(max130Version) ||
(currentVersion.GreaterThanOrEqual(min131Version)) && currentVersion.LessThanOrEqual(max131Version)
}

type KFDDistributionCheck struct {
Expand Down Expand Up @@ -179,7 +190,7 @@ func (c *KFDDistributionCheck) IsCompatible() bool {
return false
}

max12EightVersion, err := semver.NewVersion("v1.28.5")
max12EightVersion, err := semver.NewVersion("v1.28.6")
if err != nil {
return false
}
Expand All @@ -189,7 +200,7 @@ func (c *KFDDistributionCheck) IsCompatible() bool {
return false
}

max12NineVersion, err := semver.NewVersion("v1.29.5")
max12NineVersion, err := semver.NewVersion("v1.29.6")
if err != nil {
return false
}
Expand All @@ -199,7 +210,17 @@ func (c *KFDDistributionCheck) IsCompatible() bool {
return false
}

max130Version, err := semver.NewVersion("v1.30.0")
max130Version, err := semver.NewVersion("v1.30.1")
if err != nil {
return false
}

min131Version, err := semver.NewVersion("v1.31.0")
if err != nil {
return false
}

max131Version, err := semver.NewVersion("v1.31.0")
if err != nil {
return false
}
Expand All @@ -209,7 +230,9 @@ func (c *KFDDistributionCheck) IsCompatible() bool {
(currentVersion.GreaterThanOrEqual(min12SevenVersion) && currentVersion.LessThanOrEqual(max12SevenVersion)) ||
(currentVersion.GreaterThanOrEqual(min12EightVersion)) && currentVersion.LessThanOrEqual(max12EightVersion) ||
(currentVersion.GreaterThanOrEqual(min12NineVersion)) && currentVersion.LessThanOrEqual(max12NineVersion) ||
(currentVersion.GreaterThanOrEqual(min130Version)) && currentVersion.LessThanOrEqual(max130Version)
(currentVersion.GreaterThanOrEqual(min130Version)) && currentVersion.LessThanOrEqual(max130Version) ||
(currentVersion.GreaterThanOrEqual(min131Version)) &&
currentVersion.LessThanOrEqual(max131Version)
}

type OnPremisesCheck struct {
Expand Down Expand Up @@ -263,7 +286,7 @@ func (c *OnPremisesCheck) IsCompatible() bool {
return false
}

max12EightVersion, err := semver.NewVersion("v1.28.5")
max12EightVersion, err := semver.NewVersion("v1.28.6")
if err != nil {
return false
}
Expand All @@ -273,7 +296,7 @@ func (c *OnPremisesCheck) IsCompatible() bool {
return false
}

max12NineVersion, err := semver.NewVersion("v1.29.5")
max12NineVersion, err := semver.NewVersion("v1.29.6")
if err != nil {
return false
}
Expand All @@ -288,10 +311,22 @@ func (c *OnPremisesCheck) IsCompatible() bool {
return false
}

min131Version, err := semver.NewVersion("v1.31.0")
if err != nil {
return false
}

max131Version, err := semver.NewVersion("v1.31.0")
if err != nil {
return false
}

return (currentVersion.GreaterThanOrEqual(min125Version) && currentVersion.LessThanOrEqual(max125Version)) ||
(currentVersion.GreaterThanOrEqual(min126Version) && currentVersion.LessThanOrEqual(max126Version)) ||
(currentVersion.GreaterThanOrEqual(min12SevenVersion) && currentVersion.LessThanOrEqual(max12SevenVersion)) ||
(currentVersion.GreaterThanOrEqual(min12EightVersion)) && currentVersion.LessThanOrEqual(max12EightVersion) ||
(currentVersion.GreaterThanOrEqual(min12NineVersion)) && currentVersion.LessThanOrEqual(max12NineVersion) ||
(currentVersion.GreaterThanOrEqual(min130Version)) && currentVersion.LessThanOrEqual(max130Version)
(currentVersion.GreaterThanOrEqual(min130Version)) && currentVersion.LessThanOrEqual(max130Version) ||
(currentVersion.GreaterThanOrEqual(min131Version)) &&
currentVersion.LessThanOrEqual(max131Version)
}
63 changes: 44 additions & 19 deletions internal/distribution/compatibility_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func TestEKSClusterCheckIsCompatible(t *testing.T) {
expected: true,
},
{
name: "should return false if distribution version is greater than 1.28.5",
distributionVersion: "v1.28.6",
name: "should return false if distribution version is greater than 1.28.6",
distributionVersion: "v1.28.7",
expected: false,
},
{
Expand All @@ -86,13 +86,23 @@ func TestEKSClusterCheckIsCompatible(t *testing.T) {
expected: true,
},
{
name: "should return false if distribution version is greater than 1.29.5",
distributionVersion: "v1.29.6",
name: "should return false if distribution version is greater than 1.29.6",
distributionVersion: "v1.29.7",
expected: false,
},
{
name: "should return false if distribution version is greater than 1.30.0",
distributionVersion: "v1.30.1",
name: "should return false if distribution version is greater than 1.30.1",
distributionVersion: "v1.30.2",
expected: false,
},
{
name: "should return true if distribution version is greater than and less equal than 1.31.0",
distributionVersion: "v1.31.0",
expected: true,
},
{
name: "should return false if distribution version is greater than 1.31.0",
distributionVersion: "v1.31.1",
expected: false,
},
}
Expand Down Expand Up @@ -173,8 +183,8 @@ func TestKFDDistributionCheckIsCompatible(t *testing.T) {
expected: true,
},
{
name: "should return false if distribution version is greater than 1.28.5",
distributionVersion: "v1.28.6",
name: "should return false if distribution version is greater than 1.28.6",
distributionVersion: "v1.28.7",
expected: false,
},
{
Expand All @@ -183,18 +193,28 @@ func TestKFDDistributionCheckIsCompatible(t *testing.T) {
expected: true,
},
{
name: "should return true if distribution version is greater than or equals 1.29.0 and less than or equals 1.29.5",
name: "should return true if distribution version is greater than or equals 1.29.0 and less than or equals 1.29.6",
distributionVersion: "v1.29.3",
expected: true,
},
{
name: "should return false if distribution version is greater than 1.29.5",
distributionVersion: "v1.29.6",
name: "should return false if distribution version is greater than 1.29.6",
distributionVersion: "v1.29.7",
expected: false,
},
{
name: "should return false if distribution version is greater than 1.30.1",
distributionVersion: "v1.30.2",
expected: false,
},
{
name: "should return false if distribution version is greater than 1.30.0",
distributionVersion: "v1.30.1",
name: "should return true if distribution version is greater than and less equal than 1.31.0",
distributionVersion: "v1.31.0",
expected: true,
},
{
name: "should return false if distribution version is greater than 1.31.0",
distributionVersion: "v1.31.1",
expected: false,
},
}
Expand Down Expand Up @@ -270,8 +290,8 @@ func TestOnPremisesCheckIsCompatible(t *testing.T) {
expected: true,
},
{
name: "should return false if distribution version is greater than 1.28.5",
distributionVersion: "v1.28.6",
name: "should return false if distribution version is greater than 1.28.6",
distributionVersion: "v1.28.7",
expected: false,
},
{
Expand All @@ -280,20 +300,25 @@ func TestOnPremisesCheckIsCompatible(t *testing.T) {
expected: true,
},
{
name: "should return false if distribution version is greater than 1.29.5",
distributionVersion: "v1.29.6",
name: "should return false if distribution version is greater than 1.29.6",
distributionVersion: "v1.29.7",
expected: false,
},
{
name: "should return false if distribution version is greater than 1.30.0",
distributionVersion: "v1.30.1",
name: "should return false if distribution version is greater than 1.30.1",
distributionVersion: "v1.30.2",
expected: false,
},
{
name: "should return true if distribution version equals 1.30.0",
distributionVersion: "v1.30.0",
expected: true,
},
{
name: "should return false if distribution version is greater than 1.31.0",
distributionVersion: "v1.31.1",
expected: false,
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit d712086

Please sign in to comment.