-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add version library #12
Conversation
bfcd6e3
to
a2fcc7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall LGTM, just some minor comments
// Upgrading to dev versions is always allowed | ||
if u.upgradeVersion.isDev { | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If "strictMode=true", we can still upgrade from one dev version to another dev version. It's a bit weird to me due to the word "strict", but if we are doing this for specific purpose, please ignore this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is open to discussion. From a developer perspective, I tend to allow this kind of upgrade path (dev-to-dev upgrades) by default for the convenience of both developers and QA—actually, the part that leverages this library never bothers setting the strict mode off. It just checks the skip-check annotation and skip through the entire eligibility check, making the mode seem redundant. cc @bk201
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion, the strict-mode
for upgrade will be introduced as a new Harvester setting. I'll create a new ticket to track the progress. Thanks!
5dca299
to
7eac1e2
Compare
return nil | ||
} | ||
|
||
// Same-version upgrade is always allowed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we prohibit this in the current upgrade code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I know, no. Why the ask?
The Harvester Version library augments the widelyused SemVer package, adding Harvester-specific logic, especially for Harvester upgrades. It is meant to be consumed by the Harvester controller and command-line helper tool. Signed-off-by: Zespre Chang <[email protected]>
The Harvester Version library augments the widelyused SemVer package, adding Harvester-specific logic, especially for Harvester upgrades. It is meant to be consumed by the Harvester controller and command-line helper tool.
Related issue: harvester/harvester#2877