Revert "chore: Update owlbot to avoid copying generated unit tests for pure GAPIC libraries"#13550
Conversation
…r pure G…" This reverts commit 5ff7a0f.
There was a problem hiding this comment.
Code Review
This pull request updates the .OwlBot-hermetic.yaml configuration files across numerous Java client libraries and the monorepo template to simplify directory removal, copy the entire GAPIC source directory, and preserve integration tests. It also adds mock services and client tests for java-area120-tables and java-trace. The feedback highlights a critical issue where the deep-preserve-regex pattern hardcodes com/google/cloud/ in the template and several configuration files. Because many modules use alternative package namespaces (such as com.google.maps, com.google.shopping, com.google.chat, com.google.apps, com.google.identity, com.google.api, com.google.devicesandservices, and com.google.marketingplatform), this hardcoded path will prevent their integration tests from being correctly preserved. Updating these patterns to match the correct package structures is required.
| - "/{{ module_name }}/samples/snippets/generated" | ||
|
|
||
| deep-preserve-regex: | ||
| - "/{{ module_name }}/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The template hardcodes com/google/cloud/ in the deep-preserve-regex path. Several monorepo modules are not under the com.google.cloud package namespace. Using a more generic pattern like com/google/[^/]+/ ensures that integration tests for all modules are correctly preserved. Since integration tests are only preserved and not regenerated, they do not need to match the staging path and can use this specific pattern.
- "/{{ module_name }}/google-.*/src/test/java/com/google/[^/]+/.*/v.*/it/IT.*Test.java"
References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
|
|
||
| deep-preserve-regex: | ||
| - "/.*google-.*/src/main/java/.*/stub/Version.java" | ||
| - "/.*google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.maps, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/.*google-.*/src/test/java/com/google/maps/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
|
|
||
| deep-preserve-regex: | ||
| - "/.*google-.*/src/main/java/.*/stub/Version.java" | ||
| - "/.*google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.shopping, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/.*google-.*/src/test/java/com/google/shopping/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
|
|
||
| deep-preserve-regex: | ||
| - "/.*google-.*/src/main/java/.*/stub/Version.java" | ||
| - "/.*google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.chat, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/.*google-.*/src/test/java/com/google/chat/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
|
|
||
| deep-preserve-regex: | ||
| - "/.*google-.*/src/main/java/.*/stub/Version.java" | ||
| - "/.*google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.apps.meet, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/.*google-.*/src/test/java/com/google/apps/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
|
|
||
| deep-preserve-regex: | ||
| - "/.*google-.*/src/main/java/.*/stub/Version.java" | ||
| - "/.*google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.identity.accesscontextmanager, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/.*google-.*/src/test/java/com/google/identity/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
|
|
||
| deep-preserve-regex: | ||
| - "/.*google-.*/src/main/java/.*/stub/Version.java" | ||
| - "/.*google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.apps.events.subscriptions, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/.*google-.*/src/test/java/com/google/apps/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
| - "/java-common-protos/google-.*/src" | ||
|
|
||
| deep-preserve-regex: | ||
| - "/java-common-protos/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.api or com.google.type, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/java-common-protos/google-.*/src/test/java/com/google/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
| - "/java-health/samples/snippets/generated" | ||
|
|
||
| deep-preserve-regex: | ||
| - "/java-health/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.devicesandservices.health, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/java-health/google-.*/src/test/java/com/google/devicesandservices/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
| deep-preserve-regex: | ||
| - "/.*admin.*/src/main/java/.*/stub/Version.java" | ||
| - "/.*admin.*/src/test/java/com/google/.*/v.*/it/IT.*Test.java" | ||
| - "/.*admin.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" |
There was a problem hiding this comment.
The package namespace for this module is under com.google.marketingplatform.admin, not com.google.cloud. Hardcoding com/google/cloud/ in the deep-preserve-regex will prevent OwlBot from matching and preserving the integration tests. Update the regex to match the correct package structure. Since integration tests are only preserved, they can use a more specific path.
- "/.*admin.*/src/test/java/com/google/marketingplatform/.*/v.*/it/IT.*Test.java"References
- In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.
|
|
|
Did #13518 cause any issues? |



Reverts #13518