fix(internal/gapicgen): handle deleted files in git history#13200
fix(internal/gapicgen): handle deleted files in git history#13200quartzmo merged 3 commits intogoogleapis:mainfrom
Conversation
The genbot would previously crash if it encountered a commit that deleted a proto file. This was because it was trying to read the file from the current filesystem, where it no longer existed. This change updates the genbot to read the file content from the historical commit directly, making the process resilient to file deletions and renames.i refs: googleapis#13188 refs: googleapis#13189
Summary of ChangesHello @quartzmo, 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 improves the Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request effectively addresses a crash that occurred when the genbot processed a commit involving a deleted proto file. The approach of reading file content from the git history is sound, and the refactoring of goPkg into parseGoPkg improves code modularity. I have one suggestion to enhance the error logging for better debuggability. Overall, this is a solid improvement.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Please resolve vet failures. |
|
@bhshkh Sorry, vet was broken by the Gemini reviewer's suggested commit! Fixed now. |
The genbot would previously crash if it encountered a commit that deleted a proto file. This was because it was trying to read the file from the current filesystem, where it no longer existed.
This change updates the genbot to read the file content from the historical commit directly, making the process resilient to file deletions and renames.i
refs: #13188
refs: #13189