Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Update protobuf version#363

Merged
NickCao merged 4 commits intomainfrom
protobuf
Mar 20, 2025
Merged

Update protobuf version#363
NickCao merged 4 commits intomainfrom
protobuf

Conversation

@NickCao
Copy link
Copy Markdown
Collaborator

@NickCao NickCao commented Mar 20, 2025

Summary by CodeRabbit

  • New Features

    • Enhanced generated message definitions with a new message type and updated response fields, offering expanded endpoint information.
  • Chores

    • Upgraded the Protocol Buffers dependency across the project, ensuring that all configuration and generated code benefit from the latest version improvements.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 2025

Walkthrough

The changes update version references for Protocol Buffers across the project. In the buf.gen.yaml file, the remote plugin version is revised from v29.3 to v30.1. Several generated Python files have been updated to use Protobuf Python version 6.30.1 instead of 5.29.3. In one file, new Protocol Buffer definitions were added, including an Endpoint message and an updated GetReportResponse message with an alternative_endpoints field. Additionally, the protobuf dependency in pyproject.toml was updated to require version 6.30.1 or greater.

Changes

File(s) Change Summary
buf.gen.yaml Updated Protocol Buffers remote plugin version from v29.3 to v30.1.
packages/…/client_pb2.py, packages/…/kubernetes_pb2.py, packages/…/router_pb2.py Upgraded Protobuf Python version in comments and runtime validations from 5.29.3 to 6.30.1.
packages/…/jumpstarter_pb2.py Upgraded Protobuf Python version from 5.29.3 to 6.30.1; added a new Endpoint message and updated GetReportResponse to include an alternative_endpoints field, with corresponding DESCRIPTOR modifications.
packages/…/pyproject.toml Updated the protobuf dependency version constraint from >=5.29.3 to >=6.30.1.

Poem

I'm a hopper, coding in delight,
Leaping through updates with all my might.
Old versions shed as new ones shine,
Endpoints and fields now neatly align.
Carrots and code in every byte,
Hoppin' on forward into the night!

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 20, 2025

Deploy Preview for jumpstarter-docs ready!

Name Link
🔨 Latest commit c87f2ad
🔍 Latest deploy log https://app.netlify.com/sites/jumpstarter-docs/deploys/67dc1e9c51e2010008616090
😎 Deploy Preview https://deploy-preview-363--jumpstarter-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9fef5c7 and b6b86fa.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • buf.gen.yaml (1 hunks)
  • packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/client/v1/client_pb2.py (2 hunks)
  • packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/jumpstarter_pb2.py (4 hunks)
  • packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/kubernetes_pb2.py (2 hunks)
  • packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/router_pb2.py (2 hunks)
  • packages/jumpstarter-protocol/pyproject.toml (1 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/jumpstarter_pb2.py

32-32: Line too long (6872 > 120)

(E501)

⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: pytest-matrix (3.12)
  • GitHub Check: pytest-matrix (3.13)
  • GitHub Check: pytest-matrix (3.11)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter-devspace .devfile/Containerfile.client)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter Dockerfile)
  • GitHub Check: build-and-push-image (jumpstarter-dev/jumpstarter-utils Dockerfile.utils)
🔇 Additional comments (12)
packages/jumpstarter-protocol/pyproject.toml (1)

11-14: Updated Protobuf Dependency Version.
The dependency constraint for protobuf has been updated to protobuf>=6.30.1, which is consistent with the overall project update to leverage the newer Protobuf features and fixes.

packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/client/v1/client_pb2.py (2)

5-5: Updated Protobuf Version Comment.
The comment now correctly reflects the Protobuf Python Version as 6.30.1, ensuring that the documentation aligns with the updated dependency.


14-16: Updated Runtime Version Validation Parameters.
The parameters passed to _runtime_version.ValidateProtobufRuntimeVersion have been updated to 6, 30, and 1. This ensures that the runtime validation is fully aligned with the new Protobuf library version.

buf.gen.yaml (1)

5-5: Updated Protocol Buffers Plugin Version.
The remote plugin version has been updated to v30.1, which is consistent with the Protobuf version upgrade across the project.

packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/kubernetes_pb2.py (2)

5-5: Updated Protobuf Version Comment.
The comment now correctly indicates the Protobuf Python Version as 6.30.1, aligning with the new dependency.


14-16: Updated Runtime Version Validation Parameters.
The validation call now passes the new version numbers (6, 30, 1), which ensures consistency with the Protobuf dependency declared in the project.

packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/router_pb2.py (2)

5-5: Updated Protobuf Version Comment.
The header comment now reflects Protobuf Python Version 6.30.1, ensuring that the file’s metadata is current.


14-16: Updated Runtime Version Validation Parameters.
The version numbers in the runtime validation function have been updated to (6, 30, 1), which is in line with the updated dependency across the project.

packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/jumpstarter_pb2.py (4)

32-32: Line exceeds recommended length but acceptable for generated code.

The Ruff analysis flagged this line as too long (6872 > 120 characters), but this is acceptable since this is auto-generated protocol buffer code.

🧰 Tools
🪛 Ruff (0.8.2)

32-32: Line too long (6872 > 120)

(E501)


80-113: Serialized positions updated to accommodate new message types.

The serialized positions for all message types after the Endpoint message have been adjusted. This is an expected change when Protocol Buffer definitions are modified. No action needed.


78-79:

Details

✅ Verification successful

New Endpoint message type added.

The descriptor includes a new Endpoint message type that contains fields for endpoint, certificate, client_certificate, and client_private_key. This is a significant addition that extends the API.


🏁 Script executed:

#!/bin/bash
# Check if any new imports or references to the Endpoint message type exist
# to ensure proper integration of this new type

echo "Checking for existing usage of the new Endpoint type..."
rg "Endpoint" --type=python -C 3

Length of output: 184


🏁 Script executed:

#!/bin/bash
echo "Re-checking for existing usage of the new Endpoint message type in Python files using the correct file extension..."
rg --type py "Endpoint" -C 3 .

Length of output: 10710


Integration Confirmed: New Endpoint Message Type Added

  • The updated protobuf descriptor in packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/jumpstarter_pb2.py correctly integrates the new Endpoint message type with its four fields: endpoint, certificate, client_certificate, and client_private_key.
  • The serialized index values at lines 78–79 reflect the changes generated by the proto compiler.
  • Note that while the term "Endpoint" appears in other parts of the code (e.g., in jumpstarter-driver-yepkit/driver.py), those references pertain to USB endpoint handling and are unrelated to the protobuf message.

5-5:

Details

✅ Verification successful

Protocol Buffer version update looks good.

The update from version 5.29.3 to 6.30.1 has been properly reflected both in the file header comment and in the runtime version validation.

Also applies to: 14-16


🏁 Script executed:

#!/bin/bash
# Check if any import errors or compatibility issues might occur with the updated protobuf version
# by scanning for imports of this module in the codebase

echo "Searching for files importing jumpstarter_pb2..."
rg -l "import.*jumpstarter_pb2" --type=python

echo -e "\nChecking protobuf version requirement in pyproject.toml..."
cat pyproject.toml | grep -A 5 "protobuf"

Length of output: 360


Action: Manual Verification Required for Protobuf Version Update

  • Confirm that the header in packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/jumpstarter_pb2.py correctly shows the updated version (6.30.1).
  • Ensure no Python files (especially those without an explicit file type filter) import an outdated version of jumpstarter_pb2.
  • Verify that pyproject.toml includes an appropriate protobuf dependency reflecting the update.

Please run the updated script above and manually inspect the results. Once verified, the protocol buffer version update appears correct.


🏁 Script executed:

#!/bin/bash
echo "Verifying header of jumpstarter_pb2.py..."
sed -n '1,10p' packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/jumpstarter_pb2.py

echo -e "\nSearching for Python files importing jumpstarter_pb2 (without file type filter)..."
rg -l "import.*jumpstarter_pb2"

echo -e "\nChecking protobuf version requirement in pyproject.toml..."
grep -A 5 "protobuf" pyproject.toml || echo "No protobuf dependency found in pyproject.toml"

Length of output: 1616


Protocol Buffer Version Update Verified

  • The header in packages/jumpstarter-protocol/jumpstarter_protocol/jumpstarter/v1/jumpstarter_pb2.py now correctly shows # Protobuf Python Version: 6.30.1.
  • Files importing jumpstarter_pb2 (e.g., in logging, lease, core, client, and driver modules) were identified, and there’s no evidence of compatibility issues.
  • Note: No explicit protobuf dependency was found in pyproject.toml. If relying on an externally managed or global protobuf installation is intentional, this is acceptable; otherwise, please verify that the dependency management meets project requirements.

Overall, the update from version 5.29.3 to 6.30.1 is properly reflected in the generated code and its runtime version validation.

@NickCao NickCao enabled auto-merge March 20, 2025 14:03
@NickCao NickCao merged commit 1f68b0d into main Mar 20, 2025
16 checks passed
@NickCao NickCao deleted the protobuf branch March 31, 2025 15:44
@mangelajo mangelajo added this to the 0.6.0 milestone May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants