-
Notifications
You must be signed in to change notification settings - Fork 489
fix: update version checks for environmentd image reference #34371
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
fix: update version checks for environmentd image reference #34371
Conversation
- Adjusted the major version check to allow minor versions greater than or equal to 147
| if next_version.major == 26 | ||
| && active_version.major == 0 | ||
| && active_version.minor == 164 | ||
| && active_version.minor >= 147 |
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.
On further thought it seems like the problem is that not all versions in v0.147 and >= v0.148 have the necessary patch for the forwards compatibility. Which is why we tell customers:
👉 Note: Before upgrading from v25.2 to v26.0, upgrade first to version 25.2.16. Afterwards, you can upgrade to v26.0.
I think only v0.147.20 (or >= 20) and v0.164.X are fine.
| // We require customers to upgrade to 0.147.20 or higher before upgrading to 26.0.0 | ||
| let is_v_147_20_or_higher = (active_version.minor == 147 | ||
| && active_version.patch >= 20) | ||
| || active_version.minor > 147; |
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.
v0.148.0 doesn't have those changes for example: #34037
I think only v0.147.20 (or >= 20) and v0.164.X are fine.
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.
Ah good catch! 🙈
| // We require customers to upgrade to 0.147.20 or higher before upgrading to 26.0.0 | ||
| let is_v_147_20_or_higher = (active_version.minor == 147 | ||
| && active_version.patch >= 20) | ||
| || active_version.minor > 147; |
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 isn't right - should be (active_version.minor == 147 && active_version.patch >= 20) || active_version.minor >= 164
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.
(the fix went in for 0.164.0, and then it was backported to 0.147.20)
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.
My bad! 🙈
| return true; | ||
| if next_version.major == 26 { | ||
| // We require customers to upgrade to 0.147.20 or higher before upgrading to 26.0.0 | ||
| let is_v_147_20_or_higher = (active_version.minor == 147 |
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.
Now the variable name is wrong ;)
| // Disallow anything before 0.147.20 to upgrade | ||
| (Version::new(0, 147, 1), Version::new(26, 0, 0)), | ||
| // Disallow anything between 0.148.0 and 0.164.0 to upgrade | ||
| (Version::new(0, 148, 0), Version::new(26, 0, 0)), |
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.
Should also add a test for v0.164.0 -> v26.0.0
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 test already exists above! This one passes
- Fix documentation - Enhance error message
- Adjusted the major version check to allow minor versions greater than or equal to 147 MaterializeInc/database-issues#9951 <!-- Describe the contents of the PR briefly but completely. If you write detailed commit messages, it is acceptable to copy/paste them here, or write "see commit messages for details." If there is only one commit in the PR, GitHub will have already added its commit message above. --> ### Motivation <!-- Which of the following best describes the motivation behind this PR? * This PR fixes a recognized bug. [Ensure issue is linked somewhere.] * This PR adds a known-desirable feature. [Ensure issue is linked somewhere.] * This PR fixes a previously unreported bug. [Describe the bug in detail, as if you were filing a bug report.] * This PR adds a feature that has not yet been specified. [Write a brief specification for the feature, including justification for its inclusion in Materialize, as if you were writing the original feature specification.] * This PR refactors existing code. [Describe what was wrong with the existing code, if it is not obvious.] --> ### Tips for reviewer <!-- Leave some tips for your reviewer, like: * The diff is much smaller if viewed with whitespace hidden. * [Some function/module/file] deserves extra attention. * [Some function/module/file] is pure code movement and only needs a skim. Delete this section if no tips. --> ### Checklist - [ ] This PR has adequate test coverage / QA involvement has been duly considered. ([trigger-ci for additional test/nightly runs](https://trigger-ci.dev.materialize.com/)) - [ ] This PR has an associated up-to-date [design doc](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/README.md), is a design doc ([template](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/00000000_template.md)), or is sufficiently small to not require a design. <!-- Reference the design in the description. --> - [ ] If this PR evolves [an existing `$T ⇔ Proto$T` mapping](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/command-and-response-binary-encoding.md) (possibly in a backwards-incompatible way), then it is tagged with a `T-proto` label. - [ ] If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label ([example](MaterializeInc/cloud#5021)). <!-- Ask in #team-cloud on Slack if you need help preparing the cloud PR. --> - [ ] If this PR includes major [user-facing behavior changes](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/guide-changes.md#what-changes-require-a-release-note), I have pinged the relevant PM to schedule a changelog post.
https://github.com/MaterializeInc/database-issues/issues/9951
Motivation
Tips for reviewer
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.