Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Revert "chore: Update owlbot to avoid copying generated unit tests for pure GAPIC libraries"#13550

Merged
JoeWang1127 merged 1 commit into
mainfrom
revert-13518-disable-tests-pure-gapic
Jun 24, 2026
Merged

Revert "chore: Update owlbot to avoid copying generated unit tests for pure GAPIC libraries"#13550
JoeWang1127 merged 1 commit into
mainfrom
revert-13518-disable-tests-pure-gapic

Conversation

@JoeWang1127

Copy link
Copy Markdown
Contributor

Reverts #13518

@JoeWang1127 JoeWang1127 marked this pull request as ready for review June 24, 2026 14:06
@JoeWang1127 JoeWang1127 requested review from a team as code owners June 24, 2026 14:06

@gemini-code-assist gemini-code-assist Bot left a comment

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.

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"

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.

high

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
  1. 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"

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.

high

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
  1. 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"

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.

high

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
  1. 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"

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.

high

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
  1. 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"

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.

high

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
  1. 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"

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.

high

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
  1. 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"

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.

high

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
  1. 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"

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.

high

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
  1. 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"

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.

high

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
  1. 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"

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.

high

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
  1. In owlbot.yaml files, files that are only preserved, like integration tests, can use a more specific path.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@blakeli0

Copy link
Copy Markdown
Contributor

Did #13518 cause any issues?

@JoeWang1127 JoeWang1127 enabled auto-merge (squash) June 24, 2026 14:32
@JoeWang1127

Copy link
Copy Markdown
Contributor Author

Yes, the preserve logic in OwlBot.yaml is not used in librarian.

@zhumin8 will work with @lqiu96 to resolve this problem.

Did #13518 cause any issues?

@JoeWang1127 JoeWang1127 merged commit 255166c into main Jun 24, 2026
207 of 211 checks passed
@JoeWang1127 JoeWang1127 deleted the revert-13518-disable-tests-pure-gapic branch June 24, 2026 14:51
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.

3 participants