Skip to content

chore(sidekick/rust): Add flag to control RPC sample generation#3240

Merged
amanda-tarafa merged 1 commit intogoogleapis:mainfrom
amanda-tarafa:rpc-samples-flag
Dec 12, 2025
Merged

chore(sidekick/rust): Add flag to control RPC sample generation#3240
amanda-tarafa merged 1 commit intogoogleapis:mainfrom
amanda-tarafa:rpc-samples-flag

Conversation

@amanda-tarafa
Copy link
Copy Markdown
Contributor

Closes googleapis/google-cloud-rust#2689

Note: I've added this flag on the migrate-sidekick command also.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @amanda-tarafa, 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 enhances the sidekick tool for Rust code generation by introducing a new configuration option to control the generation of RPC samples. This provides greater flexibility for users to customize the output of the code generation process, addressing a specific need for fine-grained control over sample inclusion.

Highlights

  • New Configuration Flag: A new flag, generate-rpc-samples, has been introduced to the sidekick tool for Rust code generation, allowing control over whether RPC samples are generated.
  • migrate-sidekick Command Integration: The migrate-sidekick command now supports the new generate-rpc-samples flag, enabling its configuration through .sidekick.toml files.
  • Internal Codebase Updates: The internal config and librarian packages have been updated to incorporate the GenerateRpcSamples field into the RustCrate struct and modify the codec logic accordingly.
  • Comprehensive Test Coverage: New test cases have been added and existing ones updated to ensure the correct parsing, handling, and annotation of the generate-rpc-samples flag within the sidekick tool.
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.

Copy link
Copy Markdown
Contributor

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

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 adds a new flag generate-rpc-samples to control the generation of RPC samples for Rust. The changes are applied consistently across the configuration, migration tool, and tests. However, I've found a critical copy-paste error in a struct tag that needs to be addressed.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.76%. Comparing base (46a0d29) to head (542ecca).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3240      +/-   ##
==========================================
+ Coverage   80.75%   80.76%   +0.01%     
==========================================
  Files         160      160              
  Lines       13332    13342      +10     
==========================================
+ Hits        10766    10776      +10     
  Misses       2020     2020              
  Partials      546      546              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amanda-tarafa amanda-tarafa marked this pull request as ready for review December 12, 2025 04:56
@amanda-tarafa amanda-tarafa requested a review from a team December 12, 2025 04:56
@amanda-tarafa amanda-tarafa requested a review from a team as a code owner December 12, 2025 04:56
@amanda-tarafa amanda-tarafa merged commit 53af826 into googleapis:main Dec 12, 2025
8 of 9 checks passed
@amanda-tarafa amanda-tarafa deleted the rpc-samples-flag branch December 12, 2025 16:51
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.

Sample generation API based flag.

2 participants