Skip to content

chore(librarian): anchor regex in state.yaml#14464

Closed
parthea wants to merge 2 commits intomainfrom
anchor-regex
Closed

chore(librarian): anchor regex in state.yaml#14464
parthea wants to merge 2 commits intomainfrom
anchor-regex

Conversation

@parthea
Copy link
Copy Markdown
Contributor

@parthea parthea commented Sep 18, 2025

This PR addresses the feedback from #14463 (comment) to anchor the regex values in .librarian/state.yaml

@parthea parthea requested a review from a team September 18, 2025 10:35
@parthea parthea requested a review from a team as a code owner September 18, 2025 10:35
@parthea parthea requested a review from jskeet September 18, 2025 10:35
- scripts/client-post-processing
- samples/snippets/README.rst
- tests/system
- ^packages/google-cloud-dlp/CHANGELOG.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd anchor the end as well as the start, just in case there are leading substrings. (And make it clear where that's intentional.)

It feels possibly over the top, but does avoid any ambiguity.

- ^packages/google-cloud-dlp/docs/CHANGELOG.md
- ^packages/google-cloud-dlp/docs/README.rst
- ^packages/google-cloud-dlp/samples/README.txt
- ^packages/google-cloud-dlp/tar.gz
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this right? Wouldn't it be dlp.tar.gz or similar? (It's not clear to me what purpose these files serve, mind you.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a good call out. This could be fixed but instead I opted to just remove tar.gz from the preserve_regex list. The only reason it was preserved was to reduce the diff however the diff will be minimal if we allow this file to be deleted. This tar file was created by bazel. We're no longer using bazel, so we will only see a diff at the next generation and at onboarding of libraries.

See related fix googleapis/synthtool#2098

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good. For go, we're making a few one-off changes as part of migration (i.e. at the time of introducing the library into the state file) so that the diff itself from Librarian will be closer to zero. Just something to consider as a migration step - it makes no odds in the long run of course.

Copy link
Copy Markdown
Contributor Author

@parthea parthea Sep 18, 2025

Choose a reason for hiding this comment

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

Make sense. I will open a separate PR to remove the existing tar.gz files so that the diff will remain 0

- samples/snippets/README.rst
- tests/system
- ^packages/google-cloud-dlp/CHANGELOG.md
- ^packages/google-cloud-dlp/docs/CHANGELOG.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: all of the dots in here might be worth escaping. It's unlikely that there'll be a file called packages/google-cloud-dlp/docs/CHANGELOGxmd but at the moment that would match...

@parthea
Copy link
Copy Markdown
Contributor Author

parthea commented Sep 23, 2025

Closing as per an offline discussion today with @jskeet where we are switching from regex to glob, so polishing the regex is no longer a priority. (See googleapis/librarian#2294)

@parthea parthea closed this Sep 23, 2025
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