Skip to content

[do not merge] prepare for migration of spring generator code#1580

Closed
emmileaf wants to merge 121 commits intomainfrom
autoconfig-gen-draft2-migration
Closed

[do not merge] prepare for migration of spring generator code#1580
emmileaf wants to merge 121 commits intomainfrom
autoconfig-gen-draft2-migration

Conversation

@emmileaf
Copy link
Copy Markdown
Contributor

@emmileaf emmileaf commented Mar 29, 2023

Not intended for merge.

This PR is to compare changes introduced in autoconfig-gen-draft2 branch (spring generator) against the current main branch after resolving conflicts, in preparation for migration to a separate bazel module in spring-cloud-gcp alongside the generated starters.

Verified spring generation workflow against this branch (as of 0b7af16) locally and in test action run.

For reviewers: mostly looking for a review on anything expected or missed in to-be-migrated changes, and on latest commits (cdc92b1 and later) manually resolving conflicts, if you have time to take a quick look :)

zhumin8 added 30 commits June 24, 2022 13:58
…trySettingsComposer to help generate declare,getter,setters for retrysettings in properties. Other WIP changes in AutoConfig.
… Also extracted method to gen spring property prefix string to util method, so all 3 occurances in sync.
@emmileaf emmileaf added the spring pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch. label Mar 29, 2023
@product-auto-label product-auto-label Bot added the size: xl Pull request size is extra large. label Mar 29, 2023
@emmileaf emmileaf added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Mar 29, 2023
Comment thread gapic-generator-java/src/main/java/com/google/api/generator/Main.java Outdated

@Before
public void setUp() {
this.context = TestProtoLoader.instance().parseShowcaseEcho();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to migrate these test protos as well, as they would not exist in the resources anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - thank you for noting! The two test protos that need to be copied are echo.proto and wicked.proto.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this might apply to the usages of TestProtoLoader and GrpcRestTestProtoLoader as well - @blakeli0 do we publish (or intend to publish) a test jar for gapic-generator-java to maven central? If not, we can also migrate an adapted version of these loaders as spring generator test utils, along with the copied protos.

@sonarqubecloud
Copy link
Copy Markdown

[gapic-generator-java-root] SonarCloud Quality Gate failed.    Quality Gate failed

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

88.8% 88.8% Coverage
3.2% 3.2% Duplication

@sonarqubecloud
Copy link
Copy Markdown

[java_showcase_integration_tests] 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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link
Copy Markdown

[java_showcase_unit_tests] 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

No Coverage information No Coverage information
0.0% 0.0% Duplication

Comment thread pom.xml
<module>gapic-generator-java</module>
<module>java-common-protos</module>
<module>java-iam</module>
<module>gapic-generator-java</module>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this change, presubmit builds (e.g. build(11)) fail on building from root.

Error:  Failed to execute goal on project gapic-generator-java: Could not resolve dependencies for project com.google.api:gapic-generator-java:jar:2.16.1-SNAPSHOT: 
Could not find artifact com.google.api.grpc:proto-google-iam-v1:jar:1.10.1-SNAPSHOT in google-maven-central-copy (https://maven-central.storage-download.googleapis.com/maven2) -> [Help 1]

Switching the submodules order resolved the issue for this PR, though I haven’t pinpointed which part of the changes led to existing build order breaking.

Leaving a note here for posterity, but will stop investigating for now since these code changes intend to be migrated away to a different repo.

@emmileaf
Copy link
Copy Markdown
Contributor Author

emmileaf commented May 4, 2023

Closing - spring generator code has been migrated as part of GoogleCloudPlatform/spring-cloud-gcp#1686.

@emmileaf emmileaf closed this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing. size: xl Pull request size is extra large. spring pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants