Skip to content

Conversation

@leedqin
Copy link
Contributor

@leedqin leedqin commented Dec 3, 2025

Motivation

The console runs sql tests by running the ./mzcompose run default script in CI and for local testing to test the sql queries in the console. Currently we only test against the latest version of Materialize but don't do any testing for previous, current and forward versions. This PR will let us pull the images for different versions and run console tests against these materialize images. Next steps would be to implement a CI job in console repo to test against different materialize versions.

Future work : When the console repo is moved into the materialize repo then this script can be expanded to run a test that tests all the versions and pull down the docker images.

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.

@leedqin leedqin requested a review from def- December 3, 2025 15:27
Comment on lines +44 to +46
# cloud-forward: newest version (index 0) (version in staging)
# cloud-current: the version released before the latest one (version in prod)
# cloud-backward: two versions back before the latest released version (version in staging)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not correct I think. We can have the same version in staging and prod at some time.

minor_versions = get_published_minor_mz_versions(newest_first=True, limit=5)

# Debug: Print minor versions
print(f"DEBUG: Minor versions (newest first): {[str(v) for v in minor_versions]}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to remove the debug print

Comment on lines +48 to +50
cloud_forward = minor_versions[0] if len(minor_versions) > 0 else None
cloud_current = minor_versions[1] if len(minor_versions) > 1 else None
cloud_backward = minor_versions[2] if len(minor_versions) > 2 else None
Copy link
Contributor

Choose a reason for hiding this comment

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

You could also assert the length of versions.


if version_str:
print(f"Docker image: materialize/materialized:{version_str}")
c.compose["services"]["materialized"]["image"] = f"materialize/materialized:{version_str}"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the correct way! It does not respect backwards-incompatible changes. This will fail when testing old versions at some point in the future.

The correct way is:

with c.override(Materialized(image=...)):

and then put the remaining code inside of that context, including the c.up.

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