This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
Ignore zshippable in minor version during upgrade #4378
Closed
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.
During dev testing of cluster upgrade functionality, some of the package versions will have the postfix "-zshippable".
The libraries used to compare versions of packages during upgrade look at a version string like "0.12.1+vmware.2-tkg.2-zshippable", and assume the minor version, "2-zshippable", is a non-number.
The libraries also look at a version string like "0.12.1+vmware.2-tkg.3", and assume the minor version "3" is a number.
The problem comes about because the same libraries see a non-number minor version as newer than any number version.
So the version 0.12.1+vmware.2-tkg.2-zshippable is newer than 0.12.1+vmware.2-tkg.3, which is incorrect
To allow for dev testing to proceed we remove the "-zshippable" postfix right before the version strings are compared.
What this PR does / why we need it
Which issue(s) this PR fixes
Fixes #4379
Describe testing done for PR
Unit test added
Release note
Additional information
Special notes for your reviewer