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

feat(ast): array values #1073

Closed
wants to merge 46 commits into from
Closed

Conversation

diegomarquezp
Copy link
Contributor

No description provided.

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.
zhumin8 and others added 16 commits September 7, 2022 14:17
…uto-configurations (#1044)

Spring Boot 2.7 has introduced [changes to how auto-configurations](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#changes-to-auto-configuration) are registered. Both changes are backward compatible, but the older `spring.factories` style [will be removed in Spring Boot 3.0](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M5-Release-Notes#auto-configuration-registration). 
Also consider that Spring Boot 2.6.x goes out of support by 11-24-2022, switching this code to 2.7's new style.
Some small cleanups on code:
- remove SpringAutoConfigClassComposer code for RETRY_PARAM_DEFINITIONS, which is not used.
- remove unused parameter in SpringWriter
- fix test setup differences in SpringComposerTest and the two test in SpringAutoConfigClassComposerTest.
* Updates annotation parameter placeholder strings in SpringAutoConfigClassComposer for parameters of type class
* Updates annotation parameter placeholder strings in SpringAutoConfigClassComposer for multiple parameters
* Adds @qualifier annotations on variables
* Adds @NestedConfigurationProperty annotation on credentials field in SpringPropertiesClassComposer
…tation (#1055)

Renames credential provider from googleCredentials to [serviceName]Credentials in both qualifier annotation and generated method definition.
…sers (#1052)

* Separates SpringPropertiesClassComposerTest from SpringAutoConfigClassComposerTest
* Replaces string comparisons with golden file testing
…1061)

Updates and moves three pieces of naming-related logic in spring codegen into util methods:
* getSpringPropertyPrefix (e.g. com.google.cloud.vision.v1.spring.auto.image-annotator): Replaced earlier use of libname due to ambiguity
* getLibName (e.g. vision): Intended for descriptive purposes; Includes three options considered by design doc - currently implements option 2 (parse from package name) with the intention to switch to option 3 (parse from default host) in alignment with SampleGen
* getSpringPackageName (e.g. com.google.cloud.vision.v1.spring): Since this was also used in a couple of places, extracted to util in case of future need to update
* feat(log): added log statements to gend autocfg

Added log statements and setup in autoconfig class. Some common methods
were put in Util in case they have to be reused

* fix(log): fixes from PR comments

- added rest of logger statements (1 per if-statement)
- used getExecutorThreadCount() to log number of threads
- moved logging utils to its own class

* fix(format): ran google_java_format

* fix(test): updated goldens

* fix: add license header to LoggerUtil
…#1059)

* Add SpringPackageInfoComposer.java to generate package-info.java, similar to ClientLibraryPackageInfoComposer.java but customized for spring.
* In SpringWriter.java, remove generation of gapic_metadata.json for spring libraries.
This is a draft to generate pom.xml for Spring Starters modules. The placeholders in this generated file will be replaced in spring-cloud-gcp when triggering the generation (e.g. via script)

Update: updated to use utils added in #1061
We'll likely need to make more changes to pom generation depending on the project structure on spring-cloud-gcp side. But I'd like to merge this in first, and iterate as needed together with spring-cloud-gcp side.
@diegomarquezp diegomarquezp deleted the autoconfig-gen-draft2-array-value branch October 27, 2022 17:55
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

87.0% 87.0% Coverage
3.9% 3.9% Duplication

suztomo pushed a commit that referenced this pull request Mar 21, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.grpc:grpc-bom](https://togithub.com/grpc/grpc-java) | `1.51.1` -> `1.52.1` | [![age](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.52.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.52.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.52.1/compatibility-slim/1.51.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grpc:grpc-bom/1.52.1/confidence-slim/1.51.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>grpc/grpc-java</summary>

### [`v1.52.1`](https://togithub.com/grpc/grpc-java/releases/tag/v1.52.1)

[Compare Source](https://togithub.com/grpc/grpc-java/compare/v1.52.0...v1.52.1)

##### Bug Fixes

-   xds: Fix an internal bug in xds resource subscription that might cause xds stream not accepting response update for that resource type entirely. ([#&#8203;9810](https://togithub.com/grpc/grpc-java/issues/9810))

### [`v1.52.0`](https://togithub.com/grpc/grpc-java/releases/tag/v1.52.0)

[Compare Source](https://togithub.com/grpc/grpc-java/compare/v1.51.3...v1.52.0)

#### gRPC Java 1.52.0 Release Notes

**grpc-xds starting with 1.51.0 had a regression where resources might stop receiving updates. The trigger could happen hours or days after the binary had started. xDS users should avoid this release and use 1.50.x until patch releases with the fix are available. [https://togithub.com/grpc/grpc-java/pull/9809](https://togithub.com/grpc/grpc-java/pull/9809)**

##### API Changes

-   Fix CallOptions to be properly `@Immutable` ([#&#8203;9689](https://togithub.com/grpc/grpc-java/issues/9689))
-   binder: Promote out of experimental status ([#&#8203;9669](https://togithub.com/grpc/grpc-java/issues/9669)). Much of the API is now stable

##### New Features

-   xds: Support localities in multiple priorities ([#&#8203;9683](https://togithub.com/grpc/grpc-java/issues/9683))
-   xds: Log xDS node ID with verbosity INFO when environment variable GRPC_LOG_XDS_NODE_ID=true ([#&#8203;9731](https://togithub.com/grpc/grpc-java/issues/9731))

##### Examples

-   Add examples for name resolver and load balancer ([#&#8203;9700](https://togithub.com/grpc/grpc-java/issues/9700))
-   Swap to ChannelCredentials/ServerCredentials API, as it is preferred

##### Bug Fixes

-   xds:Fix ConcurrentModificationException in PriorityLoadBalancer ([#&#8203;9728](https://togithub.com/grpc/grpc-java/issues/9728))
-   ManagedChannelImpl.SubchannelImpl fix args check to avoid NPE ([#&#8203;9651](https://togithub.com/grpc/grpc-java/issues/9651))
-   okhttp: Add missing server support for TLS ClientAuth ([#&#8203;9711](https://togithub.com/grpc/grpc-java/issues/9711))
-   binder: Ensure the security interceptor is always closest to the actual transport ([#&#8203;9716](https://togithub.com/grpc/grpc-java/issues/9716))
-   bazel: Include [@&#8203;Generated](https://togithub.com/Generated) dep for autovalue. This fixes builds of xds and rls using Java 9+
-   xds: Nack xds response when weighted cluster total weight sums zero  ([#&#8203;9738](https://togithub.com/grpc/grpc-java/issues/9738))
-   core: Fix a bug about a retriable stream lifecycle. It stops using the call executor resource in a retriable stream when the client call is closed, thus preventing potential channel panics. ([#&#8203;9626](https://togithub.com/grpc/grpc-java/issues/9626))

##### Behavior Changes

-   binder: Set default idle timeout to 60 seconds, and enable "strict lifecycle management". ([#&#8203;9486](https://togithub.com/grpc/grpc-java/issues/9486))
-   xds: Limit ring hash max size to 4K instead of 8M ([#&#8203;9709](https://togithub.com/grpc/grpc-java/issues/9709)). `RingHashOptions.setRingSizeCap()` can increase the limit
-   binder: Set default idle timeout to 60 seconds, and add `BinderChannelBuilder.strictLifecycleManagement()` which disables idle timeout and prevents it from being changed ([#&#8203;9486](https://togithub.com/grpc/grpc-java/issues/9486)). Disabling idle timeout can be useful to find bugs in applications that fail to promptly shut down the channel and are particularly sensitive to keeping Binder instances alive.
-   bazel: Replace ctx.host_configuration.host_path_separator with ctx.configuration.host_path_separator ([#&#8203;9742](https://togithub.com/grpc/grpc-java/issues/9742)). This changes no behavior today, but improves future compatibility with newer versions of Bazel
-   xds: Refactor internal logics about LDS and CDS resource handling. It may cause minor log line changes about corresponding RDS and EDS subscriber event notification, but it should not change xds name resolution and LB behavior. ([#&#8203;9724](https://togithub.com/grpc/grpc-java/issues/9724))

##### Dependencies

##### Acknowledgement

[@&#8203;RapperCL](https://togithub.com/RapperCL)
[@&#8203;Smityz](https://togithub.com/Smityz)
[@&#8203;pandaapo](https://togithub.com/pandaapo)

### [`v1.51.3`](https://togithub.com/grpc/grpc-java/releases/tag/v1.51.3)

[Compare Source](https://togithub.com/grpc/grpc-java/compare/v1.51.1...v1.51.3)

##### Bug Fixes

-   xds: Fix an internal bug in xds resource subscription that might cause xds stream not accepting response update for that resource type entirely. ([https://togithub.com/grpc/grpc-java/pull/9811](https://togithub.com/grpc/grpc-java/pull/9811))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNC43My4zIiwidXBkYXRlZEluVmVyIjoiMzQuOTcuNiJ9-->
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.

None yet

3 participants