chore: Update owlbot to avoid copying generated unit tests for pure GAPIC libraries#13518
chore: Update owlbot to avoid copying generated unit tests for pure GAPIC libraries#13518lqiu96 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refines the OwlBot hermetic build configurations across numerous Java client libraries and updates the monorepo template. The changes narrow down the directory cleanup to target specific generated client and mock test files under the com/google/cloud/ path instead of removing the entire src directory, and adjust copy paths to target src/main. However, the reviewer pointed out a critical issue: hardcoding the com/google/cloud/ package prefix in the template and individual library configurations will cause cleanup failures for libraries using other namespaces (such as com/google/area120/, com/google/shopping/, com/google/iam/, and com/google/maps/), leaving stale test files. It is recommended to use a more generic regex in the template and correct the specific package paths in the affected library configurations.
b79bb42 to
34d4f50
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the OwlBot configuration files (.OwlBot-hermetic.yaml) across numerous Java modules and the monorepo template to target /src/main instead of /src for copying and removal, while refining preservation regexes to accommodate broader package structures. A critical issue was identified in java-security-private-ca/.OwlBot-hermetic.yaml where a copy rule source path uses v.* instead of the capture group (v.*), which will cause the $1 reference in the destination path to fail.
99537cf to
91b2e21
Compare
91b2e21 to
aff35c6
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the OwlBot configuration (.OwlBot-hermetic.yaml) across multiple Java client libraries and the monorepo template. The configuration is adjusted to copy only the src/main directory (instead of the entire src directory) and to remove generated client tests and mock services (such as *ClientTest.java, *ClientHttpJsonTest.java, and Mock*.java). This results in the deletion of these generated test and mock files from the repository. There are no review comments, so no additional feedback is provided.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the OwlBot hermetic configuration (.OwlBot-hermetic.yaml) across numerous Java client libraries to refine the directory structure and regex patterns used during code generation. Specifically, it narrows down the removal and copying of GAPIC source files to the src/main directory instead of the entire src directory, and adds explicit exclusions for generated client tests, HTTP/JSON tests, and mock files. Consequently, various generated mock services and client test files have been deleted. The monorepo template and golden files are also updated to align with these changes. I have no feedback to provide as there are no review comments.
|
Is next generation going to remove the unit tests? Or we have to manually remove them first? |
965c8d0 to
7df8201
Compare
I believe the next generation should remove it. The remove regex should remove the specific autogenerated tests and the copy regex only copies over the files in |
|
|



Update all the owlbot hermetic configs to not copy over the GAPIC generated unit tests. We will instead rely on the showcase tests for coverage for functionality.
This also updates the template
owlbot.yaml.monorepo.j2to prevent new client libraries from copying over the generated unit tests. All future library generations should only contain the source code.Part of #13296 to speed up the CIs (reducing the bulk test times).