Skip to content

fix: patch proto to latest + update script #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Conversation

michael-0acf4
Copy link
Contributor

@michael-0acf4 michael-0acf4 commented Jan 6, 2025

Update protobuf-codegen and protobuff to latest (3.7.1)

Migration notes


  • The change comes with new or modified tests
  • Hard-to-understand functions have explanatory comments
  • End-user documentation is updated to reflect the change

Summary by CodeRabbit

Release Notes

  • Dependency Updates

    • Updated protobuf library from version 3.5.1 to 3.7.1
    • Updated protobuf-codegen crate to version 3.7.1
  • Build Configuration

    • Modified protobuf compiler output option from --rust_out to --rs_out
    • Simplified protobuf code generation command
  • Compatibility

    • Ensured compatibility with latest protobuf runtime version

Copy link
Contributor

coderabbitai bot commented Jan 6, 2025

📝 Walkthrough

Walkthrough

The pull request introduces updates to the protobuf-related dependencies and generated code across multiple files. The primary changes involve upgrading the protobuf library from version 3.5.1 to 3.7.1, which impacts the .ghjk/lock.json configuration, Cargo.toml dependencies, generated Rust protocol buffer files, and the generation task configuration. The modifications include updating version references, changing protobuf compiler output options from --rust_out to --rs_out, and ensuring compatibility with the new library version.

Changes

File Change Summary
.ghjk/lock.json - Added new port entry for protobuf-codegen v3.7.1
- Updated existing port entry from v3.5.1 to v3.7.1
src/substantial/Cargo.toml - Updated protobuf dependency from v3.6.0 to v3.7.1
src/substantial/src/protocol/events.rs - Updated protobuf version comments
- Modified version check constant
- Changed protoc output option from --rust_out to --rs_out
src/substantial/src/protocol/metadata.rs - Updated protobuf version check constant
tools/tasks/gen.ts - Updated protobuf-codegen version from 3.5.1 to 3.7.1
- Modified protoc command to use --rs_out instead of --rust_out

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Build as Build System
    participant Protoc as Protobuf Compiler
    participant Code as Generated Code

    Dev->>Build: Trigger build/generate task
    Build->>Protoc: Execute with --rs_out
    Protoc-->>Code: Generate Rust protocol buffer files
    Code-->>Build: Updated protocol buffer implementations
    Build->>Dev: Build complete
Loading

The sequence diagram illustrates the updated protobuf code generation process, highlighting the transition to the new --rs_out option and the flow from task initiation to code generation.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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.

@michael-0acf4 michael-0acf4 requested a review from j03-dev January 6, 2025 14:22
Copy link
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: 0

🧹 Nitpick comments (1)
.ghjk/lock.json (1)

733-767: Dependency entry documentation.

This new block for bciqn2ct4mwrwyise3qlnabpine33dzt3lvnrhrbnkw4pnyryfe5is5a looks correct for protobuf-codegen 3.7.1. Consider documenting why this new entry is introduced, to aid future maintainers in understanding the rationale behind multiple cryptic references in the lock file.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8c0022e and 30b40aa.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • .ghjk/lock.json (3 hunks)
  • src/substantial/Cargo.toml (1 hunks)
  • src/substantial/src/protocol/events.rs (2 hunks)
  • src/substantial/src/protocol/metadata.rs (2 hunks)
  • tools/tasks/gen.ts (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • src/substantial/src/protocol/metadata.rs
  • src/substantial/src/protocol/events.rs
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: bulid-docker (linux/arm64, custom-arm)
  • GitHub Check: bulid-docker (linux/amd64, custom-ubuntu-large)
  • GitHub Check: lint-compat (macos-14, aarch64-apple-darwin, false)
  • GitHub Check: lint-compat (macos-13, x86_64-apple-darwin, false)
  • GitHub Check: test-full
  • GitHub Check: pre-commit
🔇 Additional comments (5)
tools/tasks/gen.ts (2)

22-22: Upgrade to protobuf-codegen v3.7.1 confirmed.

This aligns with the PR objective to patch the protobuf dependency to the latest version. Ensure all references to the old version (3.5.1) have been removed and that the new library remains compatible with existing code.


31-31: Confirm that --rs_out is supported in your local environment.

The switch from --rust_out to --rs_out is correct for newer protobuf releases, but verify that your local protoc binary and protobuf plugin are up-to-date to avoid compilation errors.

Please run the following script to confirm your current protoc version and search for references to --rust_out:

src/substantial/Cargo.toml (1)

13-13: Dependencies updated to the correct version.

Upgrading the protobuf crate to 3.7.1 is consistent with the PR objective. Confirm that all generated Rust files are in sync with this version.

.ghjk/lock.json (2)

891-891: Updated install references.

This change updates the relevant installs array to reference the new crate ref, ensuring it aligns with the upgraded library. Good job keeping references consistent.


3087-3088: Confirm that the crateName references remain consistent.

The new port ID bciqifvrtbr5a6nomogpnbn7jxwscqpepdgh67lrsjpkh6t2odnjrnma correctly maps to v3.7.1 for protobuf-codegen. Double-check if the older or duplicate reference for 3.5.1 is fully removed or replaced elsewhere.

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.72%. Comparing base (8c0022e) to head (30b40aa).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #953   +/-   ##
=======================================
  Coverage   77.72%   77.72%           
=======================================
  Files         154      154           
  Lines       19154    19154           
  Branches     1930     1930           
=======================================
  Hits        14888    14888           
  Misses       4243     4243           
  Partials       23       23           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@j03-dev j03-dev merged commit c60f4ee into main Jan 8, 2025
13 of 14 checks passed
@j03-dev j03-dev deleted the protoc-codegen-fix branch January 8, 2025 07:01
Yohe-Am pushed a commit that referenced this pull request Jan 9, 2025
Update protobuf-codegen and protobuff to latest (3.7.1)

---

- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **Dependency Updates**
  - Updated `protobuf` library from version 3.5.1 to 3.7.1
  - Updated `protobuf-codegen` crate to version 3.7.1

- **Build Configuration**
- Modified protobuf compiler output option from `--rust_out` to
`--rs_out`
  - Simplified protobuf code generation command

- **Compatibility**
  - Ensured compatibility with latest protobuf runtime version

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Yohe-Am pushed a commit that referenced this pull request Jan 15, 2025
Update protobuf-codegen and protobuff to latest (3.7.1)

---

- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **Dependency Updates**
  - Updated `protobuf` library from version 3.5.1 to 3.7.1
  - Updated `protobuf-codegen` crate to version 3.7.1

- **Build Configuration**
- Modified protobuf compiler output option from `--rust_out` to
`--rs_out`
  - Simplified protobuf code generation command

- **Compatibility**
  - Ensured compatibility with latest protobuf runtime version

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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