-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(hermetic-build): prevent overwrite of Version.java in new libraries' #12742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ deep-remove-regex: | |
|
|
||
| deep-preserve-regex: | ||
| - "/java-bare-metal-solution/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" | ||
| - "/java-bare-metal-solution/google-.*/src/main/java/com/google/cloud/.*/v.*/stub/Version.java" | ||
| - "/.*google-.*/src/main/java/com/google/cloud/.*/v.*/stub/Version.java" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This golden file now contains an inconsistent preservation policy:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is due to new files being introduced to match the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the integration tests do not need this pattern because ITs are not generated, so only a pattern that prevents removal is necessary. |
||
|
|
||
| deep-copy-regex: | ||
| - source: "/google/cloud/baremetalsolution/(v.*)/.*-java/proto-google-.*/src" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generalization of the path to use
.*instead of{{ module_name }}forVersion.javaintroduces an inconsistency with the integration tests pattern on line 23, which still uses the specific{{ module_name }}. If the goal is to support libraries where the directory structure might not strictly match{{ module_name }}, or to provide a more generic template for the monorepo, line 23 should also be updated to use.*. Otherwise, integration tests for these libraries may be incorrectly overwritten during the build process.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is due to new files being introduced to match the owl-bot-staging/v.* prefix.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the integration tests do not need this pattern because ITs are not generated, so only a pattern that prevents removal is necessary.
On the other hand Version.java is both preserved and generated, where the existing Version.java needs a different pattern than the one about to be transferred (i.e.
owl-bot-staging/...), so we need a more relaxed pattern.