-
Notifications
You must be signed in to change notification settings - Fork 101
Allow Innovative upgrades to be skipped during upgrade #1091
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
Allow Innovative upgrades to be skipped during upgrade #1091
Conversation
f8bc57e to
1eb558e
Compare
25af9a3 to
0e69032
Compare
0e69032 to
3cd3910
Compare
e9f8c7c to
ca1c124
Compare
ca1c124 to
7764040
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.
Pull Request Overview
This pull request enables users to skip innovative upgrades during the upgrade process and adds new end‑to‑end tests along with supporting functions and test cases to validate the behavior.
- Adds a new e2e test to verify that innovative upgrades can be skipped.
- Introduces helper functions (getReleaseType, generateReleases, getNextReleases, getPreviousReleases) in the update package for upgrade/rollback logic.
- Updates both the production code and corresponding tests and internal helper definitions.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| e2e/upgrades/upgrades_test.go | Adds a new test for skipping innovative upgrades during major version upgrades. |
| pkg/update/update_cockroach_version_common.go | Introduces new functions and modifies upgrade/rollback logic to support skipping innovative releases. |
| pkg/update/update_cockroach_version_common_test.go | Updates and renames tests to match new function names and adds tests for new release functions. |
| pkg/update/internal.go | Adds a new ReleaseType type and related constant definitions. |
| pkg/update/update_cockroach_version.go | Refactors calls to use the new upgrade/rollback functions. |
Comments suppressed due to low confidence (2)
pkg/update/update_cockroach_version_common.go:278
- [nitpick] Consider caching the formatted current version (e.g. using a variable) to avoid recomputing the same string in the loop, which could improve clarity and minor performance.
nextPossibleRelease := getNextReleases(fmt.Sprintf("%d.%d", currentVersion.Major(), currentVersion.Minor()))
pkg/update/update_cockroach_version_common_test.go:115
- [nitpick] Consider using require.Equal(test.result, isMajorUpgradeAllowed(test.wantVersion, test.currentVersion)) for clearer assertions and more descriptive error messages in tests.
require.True(t, isMajorUpgradeAllowed(test.wantVersion, test.currentVersion) == test.result, "isMajorUpgradeAllowed test failed")
7764040 to
c677694
Compare
Fixes: #1088