Skip to content

Commit

Permalink
fixes litmuschaos#4665 Invalid version details in backend. (litmuscha…
Browse files Browse the repository at this point in the history
…os#4666)

* fix: Invalid version details in backend.

Signed-off-by: JanhaviAlekar <janhavialekar@gmail.com>

* Checking CIVersion at start

Signed-off-by: JanhaviAlekar <janhavialekar@gmail.com>

---------

Signed-off-by: JanhaviAlekar <janhavialekar@gmail.com>
Co-authored-by: Vedant Shrotria <vedant.shrotria@harness.io>
Co-authored-by: Amit Kumar Das <amit.das@harness.io>
Co-authored-by: Namkyu Park <53862866+namkyu1999@users.noreply.github.com>
  • Loading branch information
4 people authored and kwx4957 committed Sep 1, 2024
1 parent 01daf45 commit dbe5d23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,9 @@ func fetchLatestVersion(versions map[int]string) int {

// updateVersionFormat converts string array to int by removing decimal points, 1.0.0 will be returned as 100, 0.1.0 will be returned as 10, 0.0.1 will be returned as 1
func updateVersionFormat(str string) (int, error) {
if str == CIVersion {
return 0, nil
}
var versionInt int
versionSlice := strings.Split(str, ".")
for i, val := range versionSlice {
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

0 comments on commit dbe5d23

Please sign in to comment.