Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #4665 Invalid version details in backend. #4666

Merged
merged 5 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions chaoscenter/graphql/server/pkg/chaos_infrastructure/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -911,11 +911,13 @@ func updateVersionFormat(str string) (int, error) {
var versionInt int
versionSlice := strings.Split(str, ".")
for i, val := range versionSlice {
x, err := strconv.Atoi(val)
if err != nil {
return -1, err
if val != CIVersion {
Jonsy13 marked this conversation as resolved.
Show resolved Hide resolved
x, err := strconv.Atoi(val)
if err != nil {
return -1, err
}
versionInt += x * int(math.Pow(10, float64(2-i)))
}
versionInt += x * int(math.Pow(10, float64(2-i)))
}
return versionInt, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function KubernetesChaosInfrastructureUpgradeController({
...scope,
options: {
skip: !isUpgradeAvailable,
onError: err => showError(err)
onError: err => showError(err.message)
}
});

Expand Down
Loading