Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.

fix: correct deep-remove and deep-preserve regexes - #2572

Merged
diegomarquezp merged 2 commits into
mainfrom
use-temp-owlbot-yaml
Mar 20, 2024
Merged

fix: correct deep-remove and deep-preserve regexes#2572
diegomarquezp merged 2 commits into
mainfrom
use-temp-owlbot-yaml

Conversation

@diegomarquezp

@diegomarquezp diegomarquezp commented Mar 14, 2024

Copy link
Copy Markdown
Contributor

In this PR we fix the deep-remove and deep-preserve regexes in .OwlBot.yaml files in the monorepo by creating a temporary .OwlBot.hermetic.yaml with the corrected paths.

Why?

Because the paths specified in deep-remove-regex and deep-preserve-regex start from the library name, so if we run copy-code from inside a library, these regexes won't match any files.

What about deep-copy?

We don't need to correct the library path because copy-code sends the files from googleapis-gen (or our built temp folder in our case) to the owl-bot-staging folder. These regexes don't deal with the monorepo, they deal with the source repo, which for our case is the temp folder we build after calling generate_library. This is why deep-copy was always being "respected".

Proof

After running python generate_repo.py generate --generation-config-yaml google-cloud-java/generation_config.yaml --repository-path google-cloud-java --target-library-api-shortname merchantapi &> out, we get
image

@diegomarquezp
diegomarquezp requested a review from a team March 14, 2024 16:11
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Mar 14, 2024
@JoeWang1127

Copy link
Copy Markdown
Contributor

@diegomarquezp We should not merge this PR before release a new version of sdk-platform-java because the common proto updates only comes in with the release.

@JoeWang1127

Copy link
Copy Markdown
Contributor

@diegomarquezp could you use this branch and generate all libraries to check whether there are other changes (it should be no change except shopping and chat).

@diegomarquezp

ghost commented Mar 14, 2024

Copy link
Copy Markdown
Contributor Author

@diegomarquezp We should not merge this PR before release a new version of sdk-platform-java because the common proto updates only comes in with the release.

Sounds good. Adding a do not merge label in the meantime

@diegomarquezp diegomarquezp added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Mar 14, 2024
@diegomarquezp

ghost commented Mar 19, 2024

Copy link
Copy Markdown
Contributor Author

sdk-platform-java has been released already. It should be ready for a review

Comment thread library_generation/postprocess_library.sh Outdated
Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com>
@sonarqubecloud

ghost commented Mar 19, 2024

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@sonarqubecloud

ghost commented Mar 19, 2024

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

ghost 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.

LGTM. Once hermetic build scrips are stable, we can revert this PR and update google-cloud-java to the new format.

@diegomarquezp
diegomarquezp merged commit 4c7fd88 into main Mar 20, 2024
@diegomarquezp
diegomarquezp deleted the use-temp-owlbot-yaml branch March 20, 2024 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

kokoro:run Add this label to force Kokoro to re-run the tests. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants