Repository navigation
chore(release): bump workspace versions for v1.1.0 - #512
Conversation
📝 WalkthroughWalkthroughUpdates many workspace package versions and Python binding versions, removes grpc_client paths from Makefile version management, and extends the release/version-check script to detect and bump Python package versions alongside Rust crates. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev
participant Repo
participant Script as check_release_versions.sh
participant GitRef as Git/Tag
participant Crates as Rust Crates
participant PyPkgs as Python Packages
Dev->>Repo: push PR
Repo->>Script: run version checks (CI)
Script->>GitRef: fetch tag/HEAD versions
Script->>Crates: read Cargo.toml versions
Script->>PyPkgs: read pyproject / __version__ files
Script->>GitRef: diff files vs tag to detect changes
alt crate or python changes found
Script->>Repo: report NEEDS_CRATE_BUMP / NEEDS_PY_BUMP
Script->>Dev: propose bump changes (show-version)
Dev->>Script: run bump-version
Script->>Crates: update Cargo.toml versions
Script->>PyPkgs: set new __version__ / pyproject version
Script->>Repo: verify updated files synced
else no changes
Script->>Dev: report clean
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Summary of ChangesHello @slin1237, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request prepares the project for the v1.1.0 release by updating version numbers across all Rust crates and Python packages within the workspace. Concurrently, it refines the internal version management scripts and build tools to provide more comprehensive and automated support for both Rust and Python components, streamlining future release processes. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Hi @slin1237, this PR has merge conflicts that must be resolved before it can be merged. Please rebase your branch: git fetch origin main
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-lease |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f4dfaac1e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/check_release_versions.sh`:
- Around line 343-348: The exclusion currently uses basename "$version_file"
which matches any __init__.py anywhere; change the diff counting line so it
excludes only the specific repo-relative version_file path (the variables
involved are TAG, path, version_file, diff_count). Replace the grep -cv
"$(basename "$version_file")$" part with an exact-match grep against
"$version_file" (for example use grep -cvFx "$version_file" or grep -cvF --
"$version_file") so the git diff --name-only output only ignores that specific
file.
- Around line 229-242: The two Python-version helper functions
get_python_version and get_python_version_at_ref should use grep -m1 to return
only the first __version__ match (to match get_crate_version behavior and avoid
picking up duplicates in comments/docstrings); update both grep calls to include
-m1 so they stop after the first match and continue piping that single line into
sed for extraction.
There was a problem hiding this comment.
Code Review
This pull request successfully bumps versions across the workspace for the v1.1.0 release and introduces valuable improvements to the version management tooling. The addition of Python package support in check_release_versions.sh is a great step toward automating release checks. However, I identified a few issues in the script's implementation, particularly regarding the handling of pyproject.toml for Python packages and some fragile regex patterns in version extraction and replacement. Addressing these will ensure the release process remains robust and consistent.
I am having trouble creating individual review comments. Click here to see my feedback.
Makefile (143-144)
Removing grpc_client/python/pyproject.toml from the Makefile's version management is premature because the new check_release_versions.sh script currently only updates the __init__.py file for Python packages. This will lead to out-of-sync versions between the package metadata and the source code.
scripts/check_release_versions.sh (83)
The Python package registry only tracks a single version_file. For packages like smg-grpc-proto, the pyproject.toml version also needs to be updated to maintain consistency. Consider expanding the registry format or the set_python_version logic to handle both files.
scripts/check_release_versions.sh (232)
Similar to the crate version extraction, this regex is greedy and will return incorrect results if the Python file contains comments with quotes on the same line as __version__.
grep '__version__' "$file" | sed 's/.*__version__ = "\([^"]*\)".*/\1/'
scripts/check_release_versions.sh (248)
This sed command is destructive as it replaces everything after __version__ = " until the last quote on the line, potentially stripping comments or other metadata. It should be restricted to the content within the first pair of quotes.
sed_inplace "s/\(__version__ = \)\"[^"]*\"/\1\"${new_version}\"/" "$file"
Version bumps across all workspace crates and Python packages: - smg (model_gateway): 1.0.1 → 1.1.0 - openai-protocol (protocols): 1.1.0 → 1.2.0 - reasoning-parser: already at 1.2.0 - tool-parser: 1.1.0 → 1.1.1 - wfaas (workflow): 1.0.1 → 1.0.2 - llm-tokenizer: 1.1.0 → 1.2.0 - smg-auth: 1.1.0 → 1.1.1 - smg-mcp: 2.0.0 → 2.1.0 - kv-index: 1.0.0 → 1.0.1 - llm-multimodal: 1.1.0 → 1.2.0 - smg-wasm: 1.0.0 → 1.0.1 - smg-mesh: 1.1.0 → 1.1.1 - smg-grpc-client: 1.1.0 → 1.2.0 - smg-grpc-proto (Python): 0.3.3 → 0.4.0 - smg-golang (bindings): 0.4.0 → 1.1.0 - smg-python (bindings): 1.0.1 → 1.1.0 Tooling improvements: - Makefile: remove grpc_client/python from bump-version targets since it is versioned independently via check_release_versions.sh - check_release_versions.sh: add Python package support so the script can detect unbumped Python packages and auto-fix them alongside Rust crates. Adds PYTHON_PACKAGES registry, get/set helpers for __version__, and wires Python packages into all three phases (check, propose, apply). Workspace root Cargo.toml dependency versions synced to match crate bumps. Signed-off-by: Simo Lin <linsimo.mark@gmail.com>
1f4dfaa to
af00253
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af002539a4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@scripts/check_release_versions.sh`:
- Around line 343-348: The exclusion currently uses basename "$version_file"
which yields "__init__.py" and accidentally excludes all files with that name;
update the diff filtering so it matches the repo-relative path in version_file
instead of its basename: when computing diff_count (the git diff command that
populates diff_count), remove the grep -v "$(basename "$version_file")$" and
replace it with a pattern that uses "$version_file" (or an anchored grep -v
"^${version_file}$") so only that specific file is excluded; ensure the git diff
path argument still uses "$path/" and preserve the || true fallback.
- Around line 229-242: In get_python_version and get_python_version_at_ref, grep
may return multiple matches (from comments/docstrings); update both functions
(get_python_version and get_python_version_at_ref) to use grep -m1 so only the
first __version__ match is returned (matching the behavior of get_crate_version)
and ensure the rest of the pipeline (sed) still processes that single line.
Summary
Bump all workspace crate and Python package versions for the SMG v1.1.0 release. Also improves version management tooling.
What changed
Version bumps (all crates since last tag)
Workspace root
Cargo.tomldependency versions synced to match.Tooling improvements
grpc_client/pythonfrombump-version/show-versiontargets since it is versioned independently (viacheck_release_versions.sh)scripts/check_release_versions.sh: Added Python package support — the script now detects unbumped Python packages (via__version__) and offers to auto-fix them alongside Rust crates. AddsPYTHON_PACKAGESregistry,get_python_version/set_python_versionhelpers, and wires into all three phases (check → propose → apply).Test plan
make check-versionspasses with all versions consistentmake show-versionshows correct versions for the 5 core filesSummary by CodeRabbit