Skip to content
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

loosen version upgrade checks to allow for lts version upgrades #31079

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

doy-materialize
Copy link
Contributor

Motivation

lts releases are going to be on their own versioning scheme, and so we need to define the relationship between those versions and the existing weekly release versions to allow self-hosted users to upgrade and allow us to test the upgrade process between lts releases.

Tips for reviewer

i'm a bit nervous about this change because it is pretty critical to correctness - definitely open to better ideas around testing here (i wrote some more tests for the valid upgrade check but it's not super clear to me where tests should go for the catalog compatibility check).

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.

@doy-materialize doy-materialize requested review from a team as code owners January 16, 2025 23:07
@def-
Copy link
Contributor

def- commented Jan 17, 2025

i'm a bit nervous about this change because it is pretty critical to correctness - definitely open to better ideas around testing here

I was hoping we only need the test in a few weeks/months. The logic being that we don't do 0dt upgrades, and we mainly have to ensure that v0.130.0 is whitelisted as an allowed direct upgrade path to whatever the current main version is. We also have to make sure we keep migrations around for 6 months at least. And then test direct upgrades from it to main with the existing testing frameworks: legacy-upgrade and platform-checks. @jkosh44 Does this sound reasonable?

@jkosh44
Copy link
Contributor

jkosh44 commented Jan 17, 2025

we need to define the relationship between those versions and the existing weekly release versions to allow self-hosted users to upgrade and allow us to test the upgrade process between lts releases.

It would be helpful for me if we wrote down somewhere exactly what this relationship is and what guarantees we provide. It's not immediately clear to me from reading the code.

we mainly have to ensure that v0.130.0 is whitelisted as an allowed direct upgrade path to whatever the current main version is. We also have to make sure we keep migrations around for 6 months at least. ... @jkosh44 Does this sound reasonable?

Yes, I only want to add that we'd want to come up with a way to do this for all LTS versions going forward, not just v0.130.0.

Migrations should work fine, even if we skip over versions, but we also need @MaterializeInc/persist to weigh in on the forwards/backwards compatibility implications. Right now they only allow one version of forwards compatibility.

Copy link
Contributor

@def- def- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add some e2e tests for this and push them into this PR

@@ -36,6 +36,11 @@ use crate::operators::STORAGE_SOURCE_DECODE_FUEL;
use crate::project::OPTIMIZE_IGNORED_DATA_DECODE;
use crate::read::READER_LEASE_DURATION;

const LTS_VERSIONS: &[Version] = &[
// 25.1
Version::new(0, 130, 0),
Copy link
Contributor

@def- def- Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the patch number matter here? (It shouldn't because we might have to bump it a few times)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, patch version shouldn't matter.

@def- def- force-pushed the push-yzkkkoprlllq branch from 7ac77f2 to 763cdfe Compare January 24, 2025 07:57
@def- def- requested a review from a team as a code owner January 24, 2025 07:57
@def- def- force-pushed the push-yzkkkoprlllq branch from 763cdfe to d19eec2 Compare January 24, 2025 09:07
Copy link
Contributor

@def- def- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E2E tests added in a new commit, nightly run should be green: https://buildkite.com/materialize/nightly/builds/10954 (Edit: green)

@def- def- force-pushed the push-yzkkkoprlllq branch 2 times, most recently from 9c6b6c4 to eb3fc53 Compare January 24, 2025 09:33
src/persist-client/src/cfg.rs Outdated Show resolved Hide resolved
src/persist-client/src/cfg.rs Outdated Show resolved Hide resolved
src/persist-client/src/cfg.rs Show resolved Hide resolved
@doy-materialize
Copy link
Contributor Author

@bkirwi: how's this?

@doy-materialize doy-materialize added the lts-backport need to be backported into the lts release label Jan 27, 2025
Copy link
Contributor

@bkirwi bkirwi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! I think this now behaves like we'd expect.

This should be okay to merge whenever, since we're past 0.130.x on main, but we should make sure we only backport it once we've landed all the other forward-compatible changes we need to backport...

@doy-materialize
Copy link
Contributor Author

yeah, i'm going to merge it now so that we can start getting the upgrade tests running regularly, but yeah, we should start coordinating on the changes that will need to be backported soon

@doy-materialize doy-materialize merged commit 3b86bc3 into main Jan 28, 2025
84 checks passed
@doy-materialize doy-materialize deleted the push-yzkkkoprlllq branch January 28, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lts-backport need to be backported into the lts release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants