Skip to content

Conversation

@jskeet
Copy link
Contributor

@jskeet jskeet commented Jan 26, 2026

I'm currently regenerating everything to make sure this really doesn't remove anything it shouldn't (please don't merge until that's complete!) but this should make migration from legacy-librarian to librarian simpler, as librarian expects everything in its "keep" list to exist.

The only README.txt file that exists is in
packages/google-cloud-language. There are no README.rst files under
samples directories.
Relatively few libraries actually have these directories; where they
do, they have been left.
@jskeet jskeet requested review from a team as code owners January 26, 2026 16:27
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jskeet, 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 focuses on refining the .librarian/state.yaml configuration by systematically removing preserve_regex entries that point to files or directories which are no longer present in the repository. This essential cleanup ensures that the configuration accurately reflects the current file structure, which is a critical step for a seamless transition and compatibility with the new librarian tool, as it enforces the existence of all specified paths.

Highlights

  • Configuration Cleanup: Removed numerous references to non-existent samples/README.txt, samples/snippets/README.rst, and tests/system from the preserve_regex lists within the .librarian/state.yaml file.
  • Migration Simplification: Updated the configuration to align with the new librarian tool's expectation that all 'keep' list entries must correspond to existing files, thereby simplifying future migrations.
  • Specific Regex Adjustments: Modified remove_regex entries for several common proto packages (e.g., google-cloud-access-context-manager, googleapis-common-protos) to remove README.rst.
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
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 effectively cleans up the .librarian/state.yaml file by removing references to non-existent files from the preserve_regex lists across numerous libraries. This aligns with the goal of simplifying migration and maintaining an accurate configuration. The changes are consistent across most libraries, primarily targeting samples/README.txt, samples/snippets/README.rst, and tests/system for removal from preserve_regex. There are also a few instances where README.rst was removed from remove_regex lists, which seems to be a related cleanup.

I am having trouble creating individual review comments. Click here to see my feedback.

.librarian/state.yaml (563-565)

medium

In this section, samples/README.txt and samples/snippets/README.rst are removed from preserve_regex, which is consistent with the PR's goal of removing non-existent files. However, tests/system is also removed from this block (line 565) but then re-added at line 484 in the updated file. Could you clarify if tests/system was intended to be removed as a non-existent file, or if it should indeed be preserved and its re-addition is correct? The diff makes it appear as a move rather than a removal of a non-existent file.

remove_regex:
- ^packages/google-cloud-audit-log/google/.*/.*(?:\.proto|_pb2\.(?:py|pyi))$
- .repo-metadata.json
- README.rst
Copy link
Contributor Author

@jskeet jskeet Jan 26, 2026

Choose a reason for hiding this comment

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

Will re-add this and the few other ones.

- docs/automl_v1beta1/tables.rst
- google/cloud/automl_v1beta1/services/tables
- samples/README
- tests/system
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This move is deliberate, to put all the entries in alphabetical order.

@jskeet
Copy link
Contributor Author

jskeet commented Jan 26, 2026

There's also an entry per library starting with packages/, e.g. packages/google-ads-datamanager/CHANGELOG.md. I believe all of those can be removed too. Let me know if you'd like those to be in this PR or a different one.

@parthea
Copy link
Contributor

parthea commented Jan 26, 2026

For #15485 (comment), let's use a new PR. The files are handwritten, so we will want to preserve them, rather than delete them.

@parthea parthea merged commit 720be60 into googleapis:main Jan 26, 2026
26 checks passed
@parthea
Copy link
Contributor

parthea commented Jan 26, 2026

I'm currently regenerating everything to make sure this really doesn't remove anything it shouldn't (please don't merge until that's complete!) but this should make migration from legacy-librarian to librarian simpler, as librarian expects everything in its "keep" list to exist.

I merged this PR because I am also planning to re-generate everything today as part of a gapic-generator update which only impacts google-cloud-compute. It will be easy to see if there are any regressions related to these files as part of that work.

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