Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:MaterializeInc Materialize Bump Version Tool

From Leeroopedia


Knowledge Sources misc/python/materialize/release/cut_release.py (lines 105-117), bin/bump-version, bin/ci-builder
Domains Release Engineering, CLI Tooling, Version Management, SBOM
Last Updated 2026-02-08

Overview

Concrete version bumping invocation provided by the bin/bump-version CLI tool, executed within Materialize's ci-builder container during the release process.

Description

This implementation covers the version bumping step in the cut_release.py script (lines 105-117). After the console image has been confirmed on DockerHub, the script invokes bin/bump-version inside the ci-builder container to update all version references throughout the Materialize codebase.

The tool is invoked with three flags:

  • --no-commit: Prevents the tool from creating a git commit, since the calling script handles committing with the correct git author.
  • --no-console-bump: Skips console version bumping, since that was already handled in the cross-repo coordination step.
  • --sbom: Generates a Software Bill of Materials for the release.

This is an external tool -- it is not a Python function that can be imported, but a CLI binary invoked via subprocess through spawn.runv(). The ci-builder wrapper ensures the tool runs in a stable, reproducible container environment.

Usage

Use this reference when understanding how Materialize bumps versions during a release, when debugging version inconsistencies post-release, or when modifying the set of files that contain version references.

Code Reference

Source Location

misc/python/materialize/release/cut_release.py, lines 105-117.

Underlying tool: bin/bump-version (executed inside bin/ci-builder run stable).

Signature

# Invocation within cut_release.py:
print(f"Bumping version to {version}")
spawn.runv(
    [
        MZ_ROOT / "bin" / "ci-builder",
        "run",
        "stable",
        MZ_ROOT / "bin" / "bump-version",
        version,
        "--no-commit",
        "--no-console-bump",
        "--sbom",
    ]
)

CLI equivalent:

bin/ci-builder run stable bin/bump-version v0.79.0 --no-commit --no-console-bump --sbom

Import

This is an external tool, not an importable Python module. It is invoked via subprocess from within cut_release.py:

# The cut_release module that calls this tool:
from materialize.release.cut_release import main

I/O Contract

Inputs

Parameter Type Required Description
version str (positional) Yes Target version string with v prefix (e.g., v0.79.0)
--no-commit Flag No Prevents the tool from creating a git commit
--no-console-bump Flag No Skips bumping the console version (handled externally)
--sbom Flag No Generates a Software Bill of Materials

Outputs

Output Type Description
Modified source files Side effect All version references across the codebase are updated to the target version
SBOM file File artifact A Software Bill of Materials is generated when --sbom is specified
Exit code int 0 on success, non-zero on failure (propagated as CalledProcessError)

Usage Examples

Standard release invocation:

# From the Materialize repository root
bin/ci-builder run stable bin/bump-version v0.79.0 --no-commit --no-console-bump --sbom

Full version bump with commit (without cut_release wrapper):

# If you want bump-version to also commit:
bin/ci-builder run stable bin/bump-version v0.79.0 --sbom

Dry-run verification (inspect changes without committing):

bin/ci-builder run stable bin/bump-version v0.79.0 --no-commit --no-console-bump --sbom
git diff  # Review all version changes before committing

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment