Skip to content

feat(release): bump v1.2.0 with version sync and engine docker auto-triggers - #695

Merged
slin1237 merged 1 commit into
mainfrom
slin/v1.2.0
Mar 10, 2026
Merged

slin1237 merged 1 commit into
mainfrom
slin/v1.2.0

Conversation

@slin1237

@slin1237 slin1237 commented Mar 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Bumps all workspace crates to v1.2.0 based on conventional commit analysis, and improves the release infrastructure so engine docker workflows (sglang, vllm, trtllm) auto-trigger on version bumps — matching the existing behavior of release-pypi.yml and release-docker.yml.

What changed

Version bumps (22 files)

  • model_gateway/Cargo.toml: 1.1.0 → 1.2.0
  • bindings/python/Cargo.toml: 1.1.0 → 1.2.0
  • bindings/golang/Cargo.toml: 1.1.0 → 1.2.0
  • bindings/python/pyproject.toml: 1.1.0 → 1.2.0
  • All workspace crates bumped per conventional commit analysis (minor/patch)
  • Cargo.toml workspace dependency versions synced

scripts/check_release_versions.sh

  • SMG_VERSION_SYNC registry: new mechanism to keep bindings/python/Cargo.toml, bindings/golang/Cargo.toml, bindings/python/pyproject.toml, and 4 workflow files in sync with model_gateway/Cargo.toml version
  • New crates: added smg-client and openapi-gen to the CRATES array
  • Phase 1c: detects version sync mismatches between synced files and the smg target version
  • Phase 2/3: displays proposed sync fixes and applies them (cargo, pyproject, and workflow file types)
  • Helpers: get_workflow_smg_version() / set_workflow_smg_version() for reading/updating default: 'vX.Y.Z' and || 'vX.Y.Z' patterns in workflow files

Engine docker workflows

  • Auto-trigger: added push trigger on main watching bindings/python/pyproject.toml to release-sglang-docker.yml, release-vllm-docker.yml, release-trtllm-docker.yml — they now auto-release on version bumps like release-pypi.yml
  • Fallback defaults: added || 'value' fallbacks in job with: blocks for vllm and trtllm so push events use sensible defaults
  • TensorRT-LLM default: added default: 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' for base_image_ref
  • Version sync: updated smg_commit defaults from v1.1.0 → v1.2.0 across all engine workflows and _build-engine-image.yml

Why

  • bindings/python/pyproject.toml, bindings/python/Cargo.toml, and bindings/golang/Cargo.toml were never updated by the version check script, causing them to drift from the gateway version
  • Engine docker workflows had hardcoded v1.1.0 and no push trigger, so they would never auto-run on release
  • The trtllm workflow had no default base_image_ref, requiring manual input every time

Test plan

  • Ran make check-versions end-to-end — all versions detected correctly, sync mismatches found and fixed
  • Re-ran script after fixes — "All versions consistent"
  • Verified workflow YAML syntax is valid
  • Verified || fallbacks match default: values in all engine workflows

Summary by CodeRabbit

  • Chores
    • Bumped version numbers across multiple internal libraries and bindings to 1.2.0 and minor patch releases.
    • Updated Docker image build workflow defaults from v1.1.0 to v1.2.0.
    • Enhanced version synchronization tooling for release management.

…ine docker workflows

Version bumps (v1.1.x → v1.2.0):
- model_gateway/Cargo.toml: 1.1.0 → 1.2.0
- bindings/python/Cargo.toml: 1.1.0 → 1.2.0
- bindings/golang/Cargo.toml: 1.1.0 → 1.2.0
- bindings/python/pyproject.toml: 1.1.0 → 1.2.0
- All workspace crates bumped per conventional commit analysis
- Workspace root Cargo.toml dependency versions synced

check_release_versions.sh improvements:
- Add SMG_VERSION_SYNC registry: bindings/python/Cargo.toml,
  bindings/golang/Cargo.toml, bindings/python/pyproject.toml, and
  4 workflow files must mirror model_gateway version
- Add smg-client and openapi-gen to CRATES array
- Add Phase 1c to detect version sync mismatches
- Add Phase 2 display and Phase 3 apply logic for sync entries
- Add get_workflow_smg_version/set_workflow_smg_version helpers

Engine docker workflow changes:
- Add push trigger on main (paths: bindings/python/pyproject.toml)
  to release-sglang-docker, release-vllm-docker, release-trtllm-docker
  so they auto-trigger on version bumps like release-pypi.yml
- Add fallback defaults (|| 'value') in job with: blocks for vllm
  and trtllm so push events use sensible defaults
- Add default base_image_ref for trtllm:
  nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6
- Update smg_commit defaults from v1.1.0 to v1.2.0 across all
  engine workflows and _build-engine-image.yml

Signed-off-by: Simo Lin <linsimo.mark@gmail.com>
@github-actions github-actions Bot added python-bindings Python bindings changes dependencies Dependency updates ci CI/CD configuration changes model-gateway Model gateway crate changes labels Mar 10, 2026
@coderabbitai

coderabbitai Bot commented Mar 10, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR performs a coordinated version bump across multiple workspace crates and bindings to v1.2.0, updates Docker release workflow defaults and triggers to reference the new version, and extends the release verification script with SMG version synchronization logic to ensure consistency across Cargo manifests, Python package metadata, and workflow files.

Changes

Cohort / File(s) Summary
Workflow SMG/Docker Image Updates
.github/workflows/_build-engine-image.yml, .github/workflows/release-sglang-docker.yml, .github/workflows/release-trtllm-docker.yml, .github/workflows/release-vllm-docker.yml
Updated default SMG commit/image tag values from v1.1.0 to v1.2.0 across build and release workflows. Added push triggers on main with path filter for bindings/python/pyproject.toml. Introduced fallback defaults for image references (e.g., vllm-openai v0.17.0) and improved input handling with conditional defaults.
Root Workspace Dependencies
Cargo.toml
Updated internal crate dependencies to match new versions: openai-protocol, llm-tokenizer, smg-mcp, kv-index, smg-data-connector, llm-multimodal, smg-wasm, smg-mesh, smg-grpc-client, and others with version increments (e.g., 1.2.0 → 1.3.0, 1.0.1 → 1.1.0).
Crate Version Manifests
crates/data_connector/Cargo.toml, crates/grpc_client/Cargo.toml, crates/kv_index/Cargo.toml, crates/mcp/Cargo.toml, crates/mesh/Cargo.toml, crates/multimodal/Cargo.toml, crates/protocols/Cargo.toml, crates/reasoning_parser/Cargo.toml, crates/tokenizer/Cargo.toml, crates/tool_parser/Cargo.toml, crates/wasm/Cargo.toml, crates/workflow/Cargo.toml
Version bumps in package manifests across all crates (e.g., 1.2.0 → 1.3.0, 1.0.2 → 1.0.3, 2.0.0 → 2.1.0). No dependency or feature changes.
Bindings Version Updates
bindings/golang/Cargo.toml, bindings/python/Cargo.toml, bindings/python/pyproject.toml, model_gateway/Cargo.toml
Bumped package versions to 1.2.0 in both Cargo and Python project manifests. Consistent version alignment across language bindings and model gateway.
Release Verification Script Enhancement
scripts/check_release_versions.sh
Added SMG version synchronization mechanism: introduced SMG_VERSION_SYNC array and helper functions get_workflow_smg_version() and set_workflow_smg_version(). Updated set_workspace_dep_version() signature to accept explicit old/new versions. Integrated phase logic to detect and sync SMG versions across Cargo, pyproject, and workflow files. Added two new crates to registry: smg-client and openapi-gen.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

dependencies, ci, docker, python-bindings, model-gateway

Suggested reviewers

  • CatherineSue
  • key4ng
  • whybeyoung
  • XinyueZhang369

Poem

🐰 A version bump hop, from one-dot-one to two,
Workflows and crates all polished anew,
SMG syncs with care, defaults align,
Docker builds ready, the timing divine!
Release script strengthened, no mismatches to brew,
The warren's version dance—coordinated and true! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: version bump to v1.2.0, addition of version sync mechanism, and engine Docker auto-triggers on version changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch slin/v1.2.0

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 710c93b37e

ℹ️ 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".

with:
engine: trtllm
base_image_ref: ${{ inputs.base_image_ref }}
base_image_ref: ${{ inputs.base_image_ref || 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep base_image_ref empty for TRTLLM source builds

Using inputs.base_image_ref || 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' makes it impossible to pass an empty base_image_ref from workflow_dispatch, even though this workflow documents “Empty = build from source.” In this repo, _build-engine-image.yml only takes the source-build path when inputs.base_image_ref == '', so manual runs that are supposed to build TRT-LLM from source will now always use the default base image and skip source builds.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/_build-engine-image.yml:
- Around line 32-35: Change the smg_commit input default from 'v1.2.0' to
'latest' so auto-triggered runs on push use HEAD instead of a
potentially-nonexistent release tag; update the input declaration for smg_commit
in this reusable workflow (the "smg_commit" input block) to default: 'latest',
and also mirror this change or ensure explicit tag passing in the caller
workflows (release-vllm-docker.yml, release-trtllm-docker.yml,
release-sglang-docker.yml) so release-tagged runs can still supply a fixed tag.

In @.github/workflows/release-trtllm-docker.yml:
- Around line 18-20: The workflow input base_image_ref currently has a default
which makes an empty manual input falsy and prevents "build from source"; change
the logic so the default value is used only for push events and manual runs
accept an empty string. Specifically, remove the unconditional default behavior
for the workflow input base_image_ref and in the places where it's consumed
(referencing the input name base_image_ref) use a conditional expression that
uses the NVCR default only when github.event_name == 'push' (e.g.
github.event_name == 'push' ? 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' :
inputs.base_image_ref) and apply the same change for the second occurrence of
base_image_ref to ensure manual workflow_dispatch runs can pass an empty value
to trigger building from source.

In `@scripts/check_release_versions.sh`:
- Around line 345-364: get_workflow_smg_version and set_workflow_smg_version
treat the workflow's SMG token as a single scalar version, but workflows can
contain multiple different SMG occurrences (smg_commit.default,
inputs.smg_commit || '...', run-name fallbacks, etc.); update the logic so you
parse and collect all distinct "vX.Y.Z" occurrences from the file (e.g., via
grep/regex) in get_workflow_smg_version and return a set/list, and change
set_workflow_smg_version to replace every unique matching token (use
escape_version and sed_inplace helpers) by the new version and then verify that
no old-version tokens remain (grep for any "v" followed by escaped_old); ensure
verification fails if any stale SMG tokens remain so mixed-version files are
fixed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f3242ae4-47fa-40e5-9b52-8f93c5d8c14a

📥 Commits

Reviewing files that changed from the base of the PR and between cce1202 and 710c93b.

📒 Files selected for processing (22)
  • .github/workflows/_build-engine-image.yml
  • .github/workflows/release-sglang-docker.yml
  • .github/workflows/release-trtllm-docker.yml
  • .github/workflows/release-vllm-docker.yml
  • Cargo.toml
  • bindings/golang/Cargo.toml
  • bindings/python/Cargo.toml
  • bindings/python/pyproject.toml
  • crates/data_connector/Cargo.toml
  • crates/grpc_client/Cargo.toml
  • crates/kv_index/Cargo.toml
  • crates/mcp/Cargo.toml
  • crates/mesh/Cargo.toml
  • crates/multimodal/Cargo.toml
  • crates/protocols/Cargo.toml
  • crates/reasoning_parser/Cargo.toml
  • crates/tokenizer/Cargo.toml
  • crates/tool_parser/Cargo.toml
  • crates/wasm/Cargo.toml
  • crates/workflow/Cargo.toml
  • model_gateway/Cargo.toml
  • scripts/check_release_versions.sh

Comment on lines 32 to +35
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'v1.1.0'
default: 'v1.2.0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Call sites for _build-engine-image and smg_commit =="
rg -n -C3 'uses:\s*\.\/\.github\/workflows\/_build-engine-image\.yml|smg_commit:' .github/workflows

echo
echo "== SMG_COMMIT handling in docker/engine.Dockerfile =="
if [ -f docker/engine.Dockerfile ]; then
  rg -n -C3 'ARG\s+SMG_COMMIT|SMG_COMMIT|git\s+(clone|checkout|fetch)' docker/engine.Dockerfile
else
  echo "docker/engine.Dockerfile not found"
fi

Repository: lightseekorg/smg

Length of output: 278


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Call sites for _build-engine-image reusable workflow =="
rg -n '_build-engine-image' .github/workflows

echo
echo "== smg_commit input usage in callers =="
rg -n -C5 'smg_commit' .github/workflows

echo
echo "== SMG_COMMIT handling in docker/engine.Dockerfile =="
if [ -f docker/engine.Dockerfile ]; then
  rg -n 'SMG_COMMIT\|ARG SMG_COMMIT' docker/engine.Dockerfile
else
  echo "docker/engine.Dockerfile not found"
fi

Repository: lightseekorg/smg

Length of output: 12024


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Checking for docker/engine.Dockerfile =="
find . -name "engine.Dockerfile" -o -name "*engine*.Dockerfile" | head -20

echo
echo "== All Dockerfiles in docker/ directory =="
ls -la docker/ 2>/dev/null | grep -i dockerfile || echo "docker/ directory or Dockerfiles not found"

echo
echo "== Search for SMG_COMMIT in all Dockerfiles =="
find . -name "*.Dockerfile" -o -name "Dockerfile*" | xargs grep -l "SMG_COMMIT" 2>/dev/null || echo "SMG_COMMIT not found in any Dockerfile"

Repository: lightseekorg/smg

Length of output: 378


🏁 Script executed:

cat docker/engine.Dockerfile

Repository: lightseekorg/smg

Length of output: 2588


Don't pin smg_commit default to a release tag when auto-triggered on push to main.

Line 35 defaults to v1.2.0, and the caller workflows (release-vllm-docker.yml, release-trtllm-docker.yml, release-sglang-docker.yml) that invoke this reusable workflow also default to v1.2.0. When these workflows auto-trigger on push to main, the tag may not exist yet, causing docker/engine.Dockerfile to fail at git checkout v1.2.0. Use latest as the default to allow the Dockerfile to clone HEAD instead, and let release-tag callers pass the tag explicitly.

Suggested fix
-        default: 'v1.2.0'
+        default: 'latest'

Note: The same timing risk exists in the caller workflows themselves (release-vllm-docker.yml, release-trtllm-docker.yml, release-sglang-docker.yml), which also default smg_commit to v1.2.0.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'v1.1.0'
default: 'v1.2.0'
smg_commit:
description: 'SMG commit/ref ("latest" for HEAD)'
required: false
default: 'latest'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/_build-engine-image.yml around lines 32 - 35, Change the
smg_commit input default from 'v1.2.0' to 'latest' so auto-triggered runs on
push use HEAD instead of a potentially-nonexistent release tag; update the input
declaration for smg_commit in this reusable workflow (the "smg_commit" input
block) to default: 'latest', and also mirror this change or ensure explicit tag
passing in the caller workflows (release-vllm-docker.yml,
release-trtllm-docker.yml, release-sglang-docker.yml) so release-tagged runs can
still supply a fixed tag.

Comment on lines 18 to 20
description: 'Base image (e.g. nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6). Empty = build from source.'
default: 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6'
required: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In GitHub Actions, if a workflow_dispatch string input is intentionally left empty and the workflow passes ${{ inputs.base_image_ref || 'fallback' }}, does the expression resolve to fallback? What pattern preserves an empty manual input while still defaulting only for push-triggered runs?

💡 Result:

Yes. In GitHub Actions expressions, an empty string ("") is falsy, so ${{ inputs.base_image_ref || 'fallback' }} will resolve to 'fallback' when the manual workflow_dispatch input is intentionally cleared. [1]

To preserve an intentionally empty manual input, but still default for non-manual runs (e.g., push, where inputs are null/absent), use case():

base_image_ref: ${{ case(github.event_name == 'workflow_dispatch', inputs.base_image_ref, 'fallback') }}

case() returns the value for the first true predicate without treating "" as a reason to fall back, and only uses 'fallback' for non-workflow_dispatch events. [1], [2]


Keep the "build from source" path reachable on manual runs.

An empty workflow_dispatch input for base_image_ref is falsy and will trigger the fallback, preventing users from actually building from source as documented on line 18. Default only for push events, and pass manual inputs through unchanged.

Suggested fix
-      base_image_ref: ${{ inputs.base_image_ref || 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' }}
+      base_image_ref: ${{ case(github.event_name == 'workflow_dispatch', inputs.base_image_ref, 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6') }}

Also applies to: 51-52

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-trtllm-docker.yml around lines 18 - 20, The
workflow input base_image_ref currently has a default which makes an empty
manual input falsy and prevents "build from source"; change the logic so the
default value is used only for push events and manual runs accept an empty
string. Specifically, remove the unconditional default behavior for the workflow
input base_image_ref and in the places where it's consumed (referencing the
input name base_image_ref) use a conditional expression that uses the NVCR
default only when github.event_name == 'push' (e.g. github.event_name == 'push'
? 'nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc6' : inputs.base_image_ref) and
apply the same change for the second occurrence of base_image_ref to ensure
manual workflow_dispatch runs can pass an empty value to trigger building from
source.

Comment on lines +345 to +364
# Extract smg_commit default version from a workflow file (e.g. "default: 'v1.2.0'")
get_workflow_smg_version() {
local file="$1"
grep -m1 "default: 'v[0-9]" "$file" | sed "s/.*default: 'v\([^']*\)'.*/\1/"
}

# Update all smg version references in a workflow file.
# Replaces the version in default: values, || fallbacks, and description examples.
set_workflow_smg_version() {
local file="$1"
local old_version="$2"
local new_version="$3"
local escaped_old
escaped_old=$(escape_version "$old_version")
sed_inplace "s/v${escaped_old}/v${new_version}/g" "$file"
if ! grep -q "default: 'v${new_version}'" "$file"; then
echo -e " ${RED}FAILED to update $file${NC}" >&2
return 1
fi
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Treat workflow SMG versions as a set, not a single scalar.

get_workflow_smg_version() and set_workflow_smg_version() assume every SMG reference inside a workflow already shares one old_version. That is no longer true in these files: the SMG ref now appears in smg_commit.default, in inputs.smg_commit || '...' fallbacks, and in release-sglang-docker.yml also in the run-name fallback. A mixed file like default=v1.2.0 + fallback v1.1.0 will still pass Phase 1c, and the fixer will not rewrite the stale token.

Also applies to: 522-543

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/check_release_versions.sh` around lines 345 - 364,
get_workflow_smg_version and set_workflow_smg_version treat the workflow's SMG
token as a single scalar version, but workflows can contain multiple different
SMG occurrences (smg_commit.default, inputs.smg_commit || '...', run-name
fallbacks, etc.); update the logic so you parse and collect all distinct
"vX.Y.Z" occurrences from the file (e.g., via grep/regex) in
get_workflow_smg_version and return a set/list, and change
set_workflow_smg_version to replace every unique matching token (use
escape_version and sed_inplace helpers) by the new version and then verify that
no old-version tokens remain (grep for any "v" followed by escaped_old); ensure
verification fails if any stale SMG tokens remain so mixed-version files are
fixed.

@slin1237
slin1237 merged commit 4b03d32 into main Mar 10, 2026
33 of 35 checks passed
@slin1237
slin1237 deleted the slin/v1.2.0 branch March 10, 2026 08:42
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 significantly enhances the project's release management and continuous integration capabilities. It ensures version consistency across core components and their bindings by introducing a robust synchronization mechanism. Furthermore, it automates the triggering of engine-specific Docker image builds upon version updates, streamlining the release process and reducing manual intervention for critical deployment artifacts.

Highlights

  • Version Bumps: All workspace crates, including model_gateway, bindings/python, bindings/golang, and bindings/python/pyproject.toml, have been bumped to v1.2.0 or minor/patch releases based on conventional commit analysis. Workspace dependency versions in the root Cargo.toml were also synchronized.
  • Enhanced Release Infrastructure: The scripts/check_release_versions.sh script was significantly improved with a new SMG_VERSION_SYNC registry to keep various files (including Python/Golang bindings and several workflow files) in sync with the model_gateway version. New helper functions were added to manage workflow file versions.
  • Engine Docker Workflow Automation: Engine docker workflows for SGLang, vLLM, and TensorRT-LLM now auto-trigger on version bumps by watching bindings/python/pyproject.toml on main branch pushes. Fallback defaults were added to job with: blocks, and smg_commit defaults were updated from v1.1.0 to v1.2.0 across these workflows.
Changelog
  • Cargo.toml
    • Updated workspace dependency versions for internal crates like openai-protocol, reasoning-parser, tool-parser, wfaas, llm-tokenizer, smg-mcp, kv-index, smg-data-connector, llm-multimodal, smg-wasm, smg-mesh, and smg-grpc-client to their latest minor or patch versions.
  • bindings/golang/Cargo.toml
    • Bumped the package version from 1.1.0 to 1.2.0.
  • bindings/python/Cargo.toml
    • Bumped the package version from 1.1.0 to 1.2.0.
  • bindings/python/pyproject.toml
    • Bumped the project version from 1.1.0 to 1.2.0.
  • crates/data_connector/Cargo.toml
    • Bumped the package version from 2.0.0 to 2.1.0.
  • crates/grpc_client/Cargo.toml
    • Bumped the package version from 1.2.0 to 1.3.0.
  • crates/kv_index/Cargo.toml
    • Bumped the package version from 1.0.1 to 1.1.0.
  • crates/mcp/Cargo.toml
    • Bumped the package version from 2.1.0 to 2.1.1.
  • crates/mesh/Cargo.toml
    • Bumped the package version from 1.1.1 to 1.1.2.
  • crates/multimodal/Cargo.toml
    • Bumped the package version from 1.2.0 to 1.3.0.
  • crates/protocols/Cargo.toml
    • Bumped the package version from 1.2.0 to 1.3.0.
  • crates/reasoning_parser/Cargo.toml
    • Bumped the package version from 1.2.0 to 1.2.1.
  • crates/tokenizer/Cargo.toml
    • Bumped the package version from 1.2.0 to 1.3.0.
  • crates/tool_parser/Cargo.toml
    • Bumped the package version from 1.1.1 to 1.1.2.
  • crates/wasm/Cargo.toml
    • Bumped the package version from 1.0.1 to 1.1.0.
  • crates/workflow/Cargo.toml
    • Bumped the package version from 1.0.2 to 1.0.3.
  • model_gateway/Cargo.toml
    • Bumped the package version from 1.1.0 to 1.2.0.
  • scripts/check_release_versions.sh
    • Added smg-client and openapi-gen to the CRATES array for version checking.
    • Introduced a new SMG_VERSION_SYNC array to define files that must mirror the model_gateway version, including bindings/python/Cargo.toml, bindings/golang/Cargo.toml, bindings/python/pyproject.toml, and several GitHub workflow files.
    • Implemented get_workflow_smg_version() and set_workflow_smg_version() helper functions to read and update version strings in workflow files.
    • Integrated a new 'Phase 1c' to detect version sync mismatches between synced files and the smg target version.
    • Updated 'Phase 2/3' to display proposed sync fixes and apply them to Cargo, pyproject, and workflow file types.
    • Adjusted the total_fixes calculation to include n_vsync for version synchronization issues.
Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/_build-engine-image.yml
    • .github/workflows/release-sglang-docker.yml
    • .github/workflows/release-trtllm-docker.yml
    • .github/workflows/release-vllm-docker.yml
Activity
  • No human activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates numerous crate and package versions across the repository and introduces a new version synchronization mechanism in scripts/check_release_versions.sh. This mechanism aims to automate the process of ensuring that versions in various project files (Cargo.toml, pyproject.toml, and workflow files) are consistent with the main smg (model_gateway) version. However, the newly added set_workflow_smg_version function has a high-severity command injection vulnerability due to unsafe sed usage with unescaped variables, and could also corrupt files if old_version is empty. Additionally, the get_workflow_smg_version function uses an overly broad grep pattern, risking incorrect version extraction from comments, which could lead to dangerous version substitutions.

Comment on lines +357 to +359
local escaped_old
escaped_old=$(escape_version "$old_version")
sed_inplace "s/v${escaped_old}/v${new_version}/g" "$file"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

The set_workflow_smg_version function is vulnerable to command injection via sed due to the unsafe use of unescaped variables (escaped_old, new_version) sourced from repository files. This could allow an attacker to inject sed commands and achieve remote code execution. For example, a malicious workflow file could lead to arbitrary command execution. Furthermore, if old_version is empty, the sed command on line 359 could corrupt the workflow file. To remediate, properly escape sed delimiters in all variables or use safer alternatives like awk, and add a guard to handle empty old_version gracefully.

Suggested change
local escaped_old
escaped_old=$(escape_version "$old_version")
sed_inplace "s/v${escaped_old}/v${new_version}/g" "$file"
local escaped_old
escaped_old=$(escape_version "$old_version")
local escaped_new
escaped_new=$(echo "$new_version" | sed 's/\//\\\//g')
local escaped_old_sed
escaped_old_sed=$(echo "$escaped_old" | sed 's/\//\\\//g')
sed_inplace "s/v${escaped_old_sed}/v${escaped_new}/g" "$file"

# Extract smg_commit default version from a workflow file (e.g. "default: 'v1.2.0'")
get_workflow_smg_version() {
local file="$1"
grep -m1 "default: 'v[0-9]" "$file" | sed "s/.*default: 'v\([^']*\)'.*/\1/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The grep pattern default: 'v[0-9] is too broad. It could incorrectly match version strings inside comments or descriptions, leading to partial or incorrect version extraction. For example, if a file contains description: "uses default: 'v1' as example", this function would extract 1. This incorrect version would then be passed to set_workflow_smg_version, potentially causing a dangerous substitution like s/v1/v1.2.0/g.

To prevent this, the pattern should be anchored to the beginning of the line to ensure it only matches actual default: keys in the YAML structure.

Suggested change
grep -m1 "default: 'v[0-9]" "$file" | sed "s/.*default: 'v\([^']*\)'.*/\1/"
grep -m1 "^[[:space:]]*default: 'v[0-9]" "$file" | sed "s/.*default: 'v\([^']\|\)\'.*/\1/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD configuration changes dependencies Dependency updates model-gateway Model gateway crate changes python-bindings Python bindings changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant