-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: search gapic additional protos in BUILD.bazel
#2004
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4765f15
fix: search additional protos in `BUILD.bazel`
JoeWang1127 0ae9731
add unit tests
JoeWang1127 c6917cd
modify readme
JoeWang1127 e8eb12f
only search in proto_library_with_info
JoeWang1127 cf1cf50
fix showcase ci
JoeWang1127 ea7554b
add option: gapic_additional_protos
JoeWang1127 34b6a74
change showcase
JoeWang1127 cda8f83
change default value
JoeWang1127 319d107
remove unused function
JoeWang1127 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
library_generation/test/resources/search_additional_protos/BUILD_common_resources.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# this file is only used in testing `get_gapic_additional_protos_from_BUILD` in utilities.sh | ||
|
||
proto_library_with_info( | ||
deps = [ | ||
] | ||
) |
8 changes: 8 additions & 0 deletions
8
library_generation/test/resources/search_additional_protos/BUILD_iam_locations.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# this file is only used in testing `get_gapic_additional_protos_from_BUILD` in utilities.sh | ||
|
||
proto_library_with_info( | ||
deps = [ | ||
"//google/iam/v1:iam_policy_proto", | ||
"//google/cloud/location:location_proto", | ||
] | ||
) |
7 changes: 7 additions & 0 deletions
7
library_generation/test/resources/search_additional_protos/BUILD_iam_policy.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# this file is only used in testing `get_gapic_additional_protos_from_BUILD` in utilities.sh | ||
|
||
proto_library_with_info( | ||
deps = [ | ||
"//google/iam/v1:iam_policy_proto", | ||
] | ||
) |
7 changes: 7 additions & 0 deletions
7
library_generation/test/resources/search_additional_protos/BUILD_locations.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# this file is only used in testing `get_gapic_additional_protos_from_BUILD` in utilities.sh | ||
|
||
proto_library_with_info( | ||
deps = [ | ||
"//google/cloud/location:location_proto", | ||
] | ||
) |
10 changes: 0 additions & 10 deletions
10
...ch_additional_protos/common_resources/search_additional_protos_common_resources_test.yaml
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...ration/test/resources/search_additional_protos/iam/search_additional_protos_iam_test.yaml
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...ces/search_additional_protos/iam_location/search_additional_protos_iam_location_test.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...t/resources/search_additional_protos/location/search_additional_protos_location_test.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we still need to search for these protos from BUILD now that they are being passed in as parameters?
In addition, do we need to read anything else from BUILD file other than searching for common protos?
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.
All functions that read BUILD are used by
generate_library_integration_test.sh
for testing against googleapis-gen. They are not intest_utilities.sh
because they are part ofgenerate_sdk_libraries.sh
later.transport
,rest_numeric_enums
andinclude_samples
are also read from BUILD for testing.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.
I'm not sure we need it in
generate_sdk_libraries.sh
either. We would still need to keep the bazel interface, so for a single client library, the flow would bebazel build
->java_gapic_assembly_gradle_pkg
->generate_library.sh
, wherejava_gapic_assembly_gradle_pkg
would pass all the info from bazel file to our shell script. Sogenerate_sdk_libraries.sh
would just be callingbazel build
for each service in this case.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.
If that's the case then we probably don't need these utility functions.
Right now it's only used in testing and can be removed without impacting
generate_library.sh
.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.
We can still keep them and move them to the test utils.
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.
How about I create another PR to refactor test utilities into
test_utilities.sh
. I think there are other functions can move intotest_utilities.sh
as well.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.
SGTM