-
Notifications
You must be signed in to change notification settings - Fork 374
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(policytroubleshooter): v3 PolicyTroubleshooter service added #12403
feat(policytroubleshooter): v3 PolicyTroubleshooter service added #12403
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #12403 +/- ##
==========================================
- Coverage 93.62% 93.62% -0.01%
==========================================
Files 2043 2043
Lines 180841 180841
==========================================
- Hits 169315 169314 -1
- Misses 11526 11527 +1 ☔ View full report in Codecov by Sentry. |
ad66582
to
16118b7
Compare
@@ -230,6 +230,8 @@ set(external_googleapis_installed_libraries_list | |||
google_cloud_cpp_iam_v1_iam_policy_protos | |||
google_cloud_cpp_iam_v1_options_protos | |||
google_cloud_cpp_iam_v1_policy_protos | |||
google_cloud_cpp_iam_v2_deny_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.
I think google/cloud/iam
is already compiling these protos. I believe this change introduces a second library that compiles the same protos. That is basically an ODR violation waiting to happen.
If I am right, we need to refactor these common protos to a new library or we need to have google/cloud/policytroubleshooter
depend on google/cloud/iam
. The first option seems more desirable, and it would be similar to the pure-protos library in google/cloud/grafeas
.
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 change makes it so that we always build the v2 protos.
I think we can clean it up as part of #8022.
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.
Reviewable status: 0 of 70 files reviewed, 1 unresolved discussion (waiting on @coryan)
external/googleapis/CMakeLists.txt
line 233 at r1 (raw file):
Previously, coryan (Carlos O'Ryan) wrote…
I think
google/cloud/iam
is already compiling these protos. I believe this change introduces a second library that compiles the same protos. That is basically an ODR violation waiting to happen.If I am right, we need to refactor these common protos to a new library or we need to have
google/cloud/policytroubleshooter
depend ongoogle/cloud/iam
. The first option seems more desirable, and it would be similar to the pure-protos library ingoogle/cloud/grafeas
.
So I can put them in a new common lib google_cloud_cpp_iam_v2_policy_protos
and make iam depend on that new lib, but external/googleapis/update_libraries.sh
adds both
@com_google_googleapis//google/iam/v2:deny.proto
@com_google_googleapis//google/iam/v2:policy.proto
to the iam.list
file which returns us to having the protos compiled in two places.
Thoughts?
Previously, scotthart (Scott Hart) wrote…
I think you would need to remove this line in
You would also need to change the iam CMake file to link your new common library. And you would need to change the CMake files to treat this common library as a dependency of |
Previously, coryan (Carlos O'Ryan) wrote…
FWIW, I think it would be easier (and cleaner) if you made these changes in a PR preparing for this new library. |
"language": "cpp", | ||
"library_type": "GAPIC_AUTO", | ||
"name_pretty": "Policy Troubleshooter API", | ||
"product_documentation": "https://cloud.google.com/policy-intelligence/docs/troubleshoot-access", |
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 link seems to indicate that the feature is "pre-GA" 🙄
do we need to add an experimental: true
field to the generator config? or not generate it at all...
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.
It went GA this week. There may be a rollout delay on the documentation.
7888378
to
16118b7
Compare
16118b7
to
2e0e992
Compare
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.
Sorry, looks like #12487 won the race
@@ -14,6 +14,7 @@ | |||
|
|||
include(CMakeFindDependencyMacro) | |||
# google_cloud_cpp_googleapis finds both gRPC and Protobuf, no need to load them here. | |||
find_dependency(google_cloud_cpp_iam_policy) |
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 just deleted this file out from under you...
set(GOOGLE_CLOUD_CPP_DOXYGEN_EXTRA_INCLUDES | ||
"${PROJECT_BINARY_DIR}/google/cloud/iam_policy") | ||
|
||
google_cloud_cpp_add_ga_grpc_library(policytroubleshooter | ||
"Policy Troubleshooter API") |
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 should handle the config.cmake.in
and the DOXYGEN_EXTRA_INCLUDES:
google_cloud_cpp_add_ga_grpc_library(policytroubleshooter
"Policy Troubleshooter API"
CROSS_LIB_DEPS "iam_policy")
c465f22
to
1792b2a
Compare
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.
Reviewable status: 0 of 75 files reviewed, 4 unresolved discussions (waiting on @coryan and @dbolduc)
a discussion (no related file):
Previously, dbolduc (Darren Bolduc) wrote…
(Reviewable was unable to map this GitHub inline comment thread to the right spot — sorry!)
I just deleted this file out from under you...
Rebased.
external/googleapis/CMakeLists.txt
line 233 at r1 (raw file):
Previously, coryan (Carlos O'Ryan) wrote…
FWIW, I think it would be easier (and cleaner) if you made these changes in a PR preparing for this new library.
Done.
google/cloud/policytroubleshooter/CMakeLists.txt
line 25 at r3 (raw file):
Previously, dbolduc (Darren Bolduc) wrote…
This should handle the
config.cmake.in
and the DOXYGEN_EXTRA_INCLUDES:google_cloud_cpp_add_ga_grpc_library(policytroubleshooter "Policy Troubleshooter API" CROSS_LIB_DEPS "iam_policy")
Done.
set(GOOGLE_CLOUD_CPP_DOXYGEN_EXTRA_INCLUDES | ||
"${PROJECT_BINARY_DIR}/google/cloud/iam_policy") |
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.
can remove this. It is handled by CROSS_LIB_DEPS
cmake/templates/config.cmake.in
Outdated
@@ -1,23 +0,0 @@ | |||
# Copyright 2023 Google LLC |
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.
uh oh...
ff5fd5b
to
2c8604b
Compare
cmake/templates/config.cmake.in
Outdated
@@ -14,6 +14,7 @@ | |||
|
|||
include(CMakeFindDependencyMacro) | |||
# google_cloud_cpp_googleapis finds both gRPC and Protobuf, no need to load them here. | |||
find_dependency(google_cloud_cpp_iam_policy) |
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.
gah!
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.
remove this.
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.
Reviewable status: 0 of 75 files reviewed, 6 unresolved discussions (waiting on @coryan and @dbolduc)
cmake/templates/config.cmake.in
line 0 at r5 (raw file):
Previously, dbolduc (Darren Bolduc) wrote…
(Reviewable was unable to map this GitHub inline comment thread to the right spot — sorry!)
uh oh...
hopefully correctly reverted this merge consequence
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.
Reviewed 63 of 70 files at r1, 9 of 11 files at r3, 1 of 3 files at r4, 1 of 1 files at r7, 1 of 1 files at r8, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @dbolduc and @scotthart)
This change is