Skip to content
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

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

vam-google
Copy link
Contributor

  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

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
@vam-google vam-google requested review from a team as code owners June 25, 2022 23:09
@vam-google vam-google requested a review from Neenu1995 June 25, 2022 23:09
@sonarcloud
Copy link

sonarcloud bot commented Jun 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Collaborator

@blakeli0 blakeli0 left a 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",
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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.

@vam-google vam-google merged commit d896e6e into googleapis:main Jun 27, 2022
suztomo pushed a commit that referenced this pull request Dec 16, 2022
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
suztomo pushed a commit that referenced this pull request Mar 21, 2023
…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#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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-->
suztomo pushed a commit that referenced this pull request Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants