Skip to content

Conversation

@SangJunBak
Copy link
Contributor

@SangJunBak SangJunBak commented Dec 5, 2025

  • Adjusted the major version check to allow minor versions greater than or equal to 147

https://github.com/MaterializeInc/database-issues/issues/9951

Motivation

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (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).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

- Adjusted the major version check to allow minor versions greater than or equal to 147
@SangJunBak SangJunBak requested a review from a team as a code owner December 5, 2025 16:55
if next_version.major == 26
&& active_version.major == 0
&& active_version.minor == 164
&& active_version.minor >= 147
Copy link
Contributor

@def- def- Dec 5, 2025

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;
Copy link
Contributor

@def- def- Dec 5, 2025

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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

Copy link
Contributor

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)

Copy link
Contributor Author

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
Copy link
Contributor

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)),
Copy link
Contributor

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

Copy link
Contributor Author

@SangJunBak SangJunBak Dec 5, 2025

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
@SangJunBak SangJunBak enabled auto-merge (squash) December 5, 2025 17:20
@SangJunBak SangJunBak merged commit be8b438 into MaterializeInc:main Dec 5, 2025
130 checks passed
bosconi pushed a commit that referenced this pull request Dec 5, 2025
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants