-
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
fix: Fix mixin mock service and gradle build generation #1010
Conversation
1) The generated mixin mock service classes must be in the same package as the service itself (not of the mixed-in service) - this is a regression of migrating to microgenerator. For example the PR when this happened for KMS: https://github.com/googleapis/java-kms/pull/502/files#diff-59a3127359a0458dedfaa9b6bdfc658e88a2491a6d907f32e17fac462b1a3c27L16 2) In case there is a location mixin, we also need to include grpc-google-common-protos dependency for output to compile
Kudos, SonarCloud Quality Gate passed! |
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.
LGTM
@@ -131,6 +131,7 @@ def _construct_extra_deps(scope_to_deps, versions_map): | |||
"iam_java_proto": "maven.com_google_api_grpc_proto_google_iam_v1", | |||
"iam_java_grpc": "maven.com_google_api_grpc_grpc_google_iam_v1", | |||
"iam_policy_java_grpc": "maven.com_google_api_grpc_grpc_google_iam_v1", | |||
"location_java_grpc": "maven.com_google_api_grpc_grpc_google_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.
What are the dependencies here used for? Just for compiling/unit testing the generated code using gradle?
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.
Just for compiling/unit testing the generated code using gradle
Yes, but the same dependency needs to be added to pom.xml respectively (manually).
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 is already included in java-shared-dependency so I think we should be good. It's interesting that we don't really need it in gradle build until now.
1) The generated mixin mock service classes must be in the same package as the service itself (not of the mixed-in service) - this is a regression of migrating to microgenerator. For example the PR when this happened for KMS: https://github.com/googleapis/java-kms/pull/502/files#diff-59a3127359a0458dedfaa9b6bdfc658e88a2491a6d907f32e17fac462b1a3c27L16 2) In case there is a location mixin, we also need to include grpc-google-common-protos dependency for output to compile
…s to v2.10.0 (#1010) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.api.grpc:proto-google-common-protos](https://togithub.com/googleapis/java-iam/proto-google-common-protos) ([source](https://togithub.com/googleapis/java-common-protos)) | `2.9.6` -> `2.10.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-common-protos/2.10.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-common-protos/2.10.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-common-protos/2.10.0/compatibility-slim/2.9.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-common-protos/2.10.0/confidence-slim/2.9.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-common-protos</summary> ### [`v2.10.0`](https://togithub.com/googleapis/java-common-protos/blob/HEAD/CHANGELOG.md#​2100-httpsgithubcomgoogleapisjava-common-protoscomparev296v2100-2022-11-04) [Compare Source](https://togithub.com/googleapis/java-common-protos/compare/v2.9.6...v2.10.0) ##### Features - Add FirstPartyAppMetadata to the BigQueryAuditMetadata proto, it contains metadata about requests originating from Google apps, such as Google Sheets ([86a868f](https://togithub.com/googleapis/java-common-protos/commit/86a868fd3925ec91e6acb7282195df8b5ad0f372)) - Add PolicyViolation to the AuditLog proto, this will only be present when access is denied due to Organization Policy. It describes why access is denied ([#​456](https://togithub.com/googleapis/java-common-protos/issues/456)) ([86a868f](https://togithub.com/googleapis/java-common-protos/commit/86a868fd3925ec91e6acb7282195df8b5ad0f372)) - Added new events to BigQueryAuditMetadata such as UnlinkDataset and RowAccessPolicyCreation ([86a868f](https://togithub.com/googleapis/java-common-protos/commit/86a868fd3925ec91e6acb7282195df8b5ad0f372)) ##### Documentation - Updated multiple comments ([86a868f](https://togithub.com/googleapis/java-common-protos/commit/86a868fd3925ec91e6acb7282195df8b5ad0f372)) ##### Dependencies - Update dependency com.google.protobuf:protobuf-bom to v3.21.8 ([#​461](https://togithub.com/googleapis/java-common-protos/issues/461)) ([7f94cb8](https://togithub.com/googleapis/java-common-protos/commit/7f94cb874aa0dd618eb47ab85a85dfe7cdcfbf81)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.9 ([#​469](https://togithub.com/googleapis/java-common-protos/issues/469)) ([965c1a1](https://togithub.com/googleapis/java-common-protos/commit/965c1a1fad3a37124ce7692bd4ae247771234bea)) - Update dependency com.google.protobuf:protobuf-java to v3.21.8 ([#​462](https://togithub.com/googleapis/java-common-protos/issues/462)) ([185feb3](https://togithub.com/googleapis/java-common-protos/commit/185feb3813e54beaeb536d568644b26391470219)) - Update dependency com.google.protobuf:protobuf-java to v3.21.9 ([#​470](https://togithub.com/googleapis/java-common-protos/issues/470)) ([499bcac](https://togithub.com/googleapis/java-common-protos/commit/499bcacc83141fb2fcb1b84c5942dfb53d316c22)) - Update dependency io.grpc:grpc-bom to v1.50.0 ([#​458](https://togithub.com/googleapis/java-common-protos/issues/458)) ([37fae19](https://togithub.com/googleapis/java-common-protos/commit/37fae1934006613914e8123cde69c8f82158fd12)) - Update dependency io.grpc:grpc-bom to v1.50.2 ([#​463](https://togithub.com/googleapis/java-common-protos/issues/463)) ([9f5407d](https://togithub.com/googleapis/java-common-protos/commit/9f5407db1a44d331a881739d410fa67df39e3e71)) - Update dependency io.grpc:grpc-protobuf to v1.50.0 ([#​459](https://togithub.com/googleapis/java-common-protos/issues/459)) ([3f7c015](https://togithub.com/googleapis/java-common-protos/commit/3f7c0152e774bba00371f11e51efce9ca0cfa466)) - Update dependency io.grpc:grpc-protobuf to v1.50.2 ([#​464](https://togithub.com/googleapis/java-common-protos/issues/464)) ([2910c5e](https://togithub.com/googleapis/java-common-protos/commit/2910c5e862440d37e672646e2c7845eb39a3002c)) - Update dependency io.grpc:grpc-stub to v1.50.0 ([#​460](https://togithub.com/googleapis/java-common-protos/issues/460)) ([a056a8a](https://togithub.com/googleapis/java-common-protos/commit/a056a8a111974fe0c8312effcfe33da5b50c2100)) - Update dependency io.grpc:grpc-stub to v1.50.2 ([#​465](https://togithub.com/googleapis/java-common-protos/issues/465)) ([5d6780c](https://togithub.com/googleapis/java-common-protos/commit/5d6780cfcfdd7e65beb89a7e7c7dd455204901fa)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNy4xIiwidXBkYXRlZEluVmVyIjoiMzQuMTkuMCJ9-->
🤖 I have created a release *beep* *boop* --- ## [2.8.26](https://togithub.com/googleapis/java-core/compare/v2.8.25...v2.8.26) (2022-11-07) ### Dependencies * Update dependency com.google.api-client:google-api-client-bom to v2.0.1 ([#1011](https://togithub.com/googleapis/java-core/issues/1011)) ([bbcaed9](https://togithub.com/googleapis/java-core/commit/bbcaed9a9688a054adbb8d4615af14566b98a297)) * Update dependency com.google.api.grpc:proto-google-common-protos to v2.10.0 ([#1010](https://togithub.com/googleapis/java-core/issues/1010)) ([1f41e6b](https://togithub.com/googleapis/java-core/commit/1f41e6b9bf86ea94dbd0efda348d46f04e62baa4)) * Update dependency com.google.api.grpc:proto-google-iam-v1 to v1.6.7 ([#1005](https://togithub.com/googleapis/java-core/issues/1005)) ([aac06c2](https://togithub.com/googleapis/java-core/commit/aac06c231ae59e4e913a228328202bdceda39ec4)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
The generated mixin mock service classes must be in the same package as the service itself (not of the mixed-in service) - this is a regression of migrating to microgenerator. For example the PR when this happened for KMS: https://github.com/googleapis/java-kms/pull/502/files#diff-59a3127359a0458dedfaa9b6bdfc658e88a2491a6d907f32e17fac462b1a3c27L16
In case there is a location mixin, we also need to include grpc-google-common-protos dependency for output to compile