Fix AKS nodegroup upgrade validation #12865
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #12862
Technical notes summary
This is a follow on from #12532 We started using
semver.coerce
on the AKS cluster version because it may not specify a patch version (eg if provisioned outside rancher,"1.30"
would be a valid cluster k8s version). Consequently theoriginalVersion
prop went from being a string to a semver object. This appears to be mostly fine, as we are mostly using semver to compare versions and semver doesn't care; however, in nodegroups we are merely checking if versions are equal and use a simple equality comparison.I think the simplest fix is to make sure that
originalVersion
is a string again. I verified that this change wont re-introduce #12525 by double-checking thatsemver.coerce("1.30").version === "1.30.0"
Areas or cases that should be tested
Areas which could experience regressions
anything to do with version comparison in the aks form - I believe I've covered all cases in the above section.
Screenshot/Video
Checklist