Skip to content

feat(sidekick/rust): Generate samples for undelete methods.#3706

Merged
amanda-tarafa merged 1 commit intogoogleapis:mainfrom
amanda-tarafa:rust-undelete-samples
Jan 22, 2026
Merged

feat(sidekick/rust): Generate samples for undelete methods.#3706
amanda-tarafa merged 1 commit intogoogleapis:mainfrom
amanda-tarafa:rust-undelete-samples

Conversation

@amanda-tarafa
Copy link
Copy Markdown
Contributor

Undelete methods are identified as per AIP/135

Undelete methods are identified as per AIP/135
@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 significantly enhances the sidekick tool by integrating support for Google Cloud's API Improvement Proposal (AIP) 135, specifically for 'undelete' methods. It updates the core API model to recognize these methods and extends the Rust client code generation capabilities to produce accurate sample code for them. This ensures that the tool can properly handle and generate consistent code for a broader range of standard API operations.

Highlights

  • AIP-135 Undelete Recognition: The system now correctly identifies methods conforming to AIP-135 for undelete operations, extending the existing AIP standard checks.
  • New Undelete Information Structure: A new AIPStandardUndeleteInfo struct and an associated method have been introduced to extract and encapsulate relevant details for undelete operations, such as the resource name request field.
  • Rust Sample Code Generation for Undelete: The Rust client method sample templates have been updated to generate appropriate builder fields and parameters for AIP-135 compliant undelete methods, ensuring consistency with other standard operations.
  • Comprehensive Testing: Extensive unit tests have been added for the new AIPStandardUndeleteInfo method, covering various valid and invalid scenarios to ensure robust identification and information extraction for undelete methods.
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 support for generating samples for AIP-135 undelete methods in Rust. The changes introduce the necessary logic in the Go API model to identify these methods and update the Rust-specific mustache templates accordingly. The implementation is consistent with the existing support for other standard AIP methods like Get and Delete, and the new logic is well-tested. I have one suggestion to improve maintainability by reducing duplication in the templates, which could be addressed in a follow-up.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.29%. Comparing base (096b0ac) to head (a579e12).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/sidekick/api/model.go 87.50% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3706   +/-   ##
=======================================
  Coverage   82.28%   82.29%           
=======================================
  Files         138      138           
  Lines       12713    12728   +15     
=======================================
+ Hits        10461    10474   +13     
- Misses       1774     1775    +1     
- Partials      478      479    +1     

☔ 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 January 22, 2026 20:48
@amanda-tarafa amanda-tarafa requested a review from a team January 22, 2026 20:48
@amanda-tarafa
Copy link
Copy Markdown
Contributor Author

This is ready for review, generation results can be seen in googleapis/google-cloud-rust#4340.

@amanda-tarafa amanda-tarafa merged commit 6f50393 into googleapis:main Jan 22, 2026
11 of 12 checks passed
@amanda-tarafa amanda-tarafa deleted the rust-undelete-samples branch January 22, 2026 21:27
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.

2 participants