From d604e526f86505ac797f0946919340e243931e35 Mon Sep 17 00:00:00 2001 From: spencergibb Date: Wed, 20 Sep 2023 13:02:28 -0400 Subject: [PATCH 1/8] updates for docs and formatting --- docs/src/main/asciidoc/README.adoc | 4 ++-- docs/src/main/asciidoc/_configprops.adoc | 3 +-- docs/src/main/asciidoc/spring-cloud-commons.adoc | 2 +- .../loadbalancer/cache/LoadBalancerCacheProperties.java | 9 +++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc index 67a65a63..281ef460 100644 --- a/docs/src/main/asciidoc/README.adoc +++ b/docs/src/main/asciidoc/README.adoc @@ -2,8 +2,8 @@ include::intro.adoc[] == Building -include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/asciidoc/building.adoc[] +include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/4.0.x/docs/src/main/asciidoc/building.adoc[] == Contributing -include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/asciidoc/contributing.adoc[] +include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/4.0.x/docs/src/main/asciidoc/contributing.adoc[] diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc index 6af212de..6a23a346 100644 --- a/docs/src/main/asciidoc/_configprops.adoc +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -36,8 +36,7 @@ |spring.cloud.loadbalancer.cache.caffeine.spec | | The spec to use to create caches. See CaffeineSpec for more details on the spec format. |spring.cloud.loadbalancer.cache.capacity | `+++256+++` | Initial cache capacity expressed as int. |spring.cloud.loadbalancer.cache.enabled | `+++true+++` | Enables Spring Cloud LoadBalancer caching mechanism. -|spring.cloud.loadbalancer.cache.ttl | `+++35s+++` | Time To Live - time counted from writing of the record, after which cache entries are expired, expressed as a {@link Duration}. The property {@link String} has to be in keeping with the appropriate syntax as specified in Spring Boot StringToDurationConverter. @see StringToDurationConverter.java -|spring.cloud.loadbalancer.call-get-with-request-on-delegates | `+++false+++` | If this flag is set to {@code true}, {@code ServiceInstanceListSupplier#get(Request request)} method will be implemented to call {@code delegate.get(request)} in classes assignable from {@code DelegatingServiceInstanceListSupplier} that don't already implement that method, with the exclusion of {@code CachingServiceInstanceListSupplier} and {@code HealthCheckServiceInstanceListSupplier}, which should be placed in the instance supplier hierarchy directly after the supplier performing instance retrieval over the network, before any request-based filtering is done. Note: in 4.1, this behaviour will become the default +|spring.cloud.loadbalancer.cache.ttl | `+++35s+++` | Time To Live - time counted from writing of the record, after which cache entries are expired. |spring.cloud.loadbalancer.clients | | |spring.cloud.loadbalancer.configurations | `+++default+++` | Enables a predefined LoadBalancer configuration. |spring.cloud.loadbalancer.eager-load.clients | | Names of the clients. diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc index 7f213d75..b3eec186 100644 --- a/docs/src/main/asciidoc/spring-cloud-commons.adoc +++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc @@ -4,7 +4,7 @@ include::_attributes.adoc[] include::intro.adoc[] // TODO: figure out remote includes in docs and replace pasted text -// include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing-docs.adoc[] +// include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/4.0.x/docs/src/main/asciidoc/contributing-docs.adoc[] NOTE: Spring Cloud is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, you can find the source code and issue trackers for the project at {docslink}[github]. diff --git a/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/cache/LoadBalancerCacheProperties.java b/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/cache/LoadBalancerCacheProperties.java index 426c9382..c2668e0e 100644 --- a/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/cache/LoadBalancerCacheProperties.java +++ b/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/cache/LoadBalancerCacheProperties.java @@ -33,11 +33,12 @@ public class LoadBalancerCacheProperties { /** * Time To Live - time counted from writing of the record, after which cache entries - * are expired, expressed as a {@link Duration}. The property {@link String} has to be - * in keeping with the appropriate syntax as specified in Spring Boot + * are expired. + */ + /* + * expressed as a {@link Duration}. The property {@link String} has to be in keeping + * with the appropriate syntax as specified in Spring Boot * StringToDurationConverter. - * @see StringToDurationConverter.java */ private Duration ttl = Duration.ofSeconds(35); From 7a4f30f2e0cad6dda7591fcabe6f90c98f1e2dd1 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 20 Sep 2023 23:49:33 +0000 Subject: [PATCH 2/8] Bumping versions --- README.adoc | 4 ++-- docs/src/main/asciidoc/_configprops.adoc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 5932161f..fe6b885f 100644 --- a/README.adoc +++ b/README.adoc @@ -124,7 +124,7 @@ author credit if we do. Active contributors might be asked to join the core tea given the ability to merge pull requests. === Code of Conduct -This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of +This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/{spring-cloud-build-branch}/docs/src/main/asciidoc/code-of-conduct.adoc[code of conduct]. By participating, you are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io. @@ -135,7 +135,7 @@ added after the original pull request but before a merge. * Use the Spring Framework code format conventions. If you use Eclipse you can import formatter settings using the `eclipse-code-formatter.xml` file from the - https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring + https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring Cloud Build] project. If using IntelliJ, you can use the https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter Plugin] to import the same file. diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc index 6a23a346..e998c885 100644 --- a/docs/src/main/asciidoc/_configprops.adoc +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -37,6 +37,7 @@ |spring.cloud.loadbalancer.cache.capacity | `+++256+++` | Initial cache capacity expressed as int. |spring.cloud.loadbalancer.cache.enabled | `+++true+++` | Enables Spring Cloud LoadBalancer caching mechanism. |spring.cloud.loadbalancer.cache.ttl | `+++35s+++` | Time To Live - time counted from writing of the record, after which cache entries are expired. +|spring.cloud.loadbalancer.call-get-with-request-on-delegates | `+++false+++` | If this flag is set to {@code true}, {@code ServiceInstanceListSupplier#get(Request request)} method will be implemented to call {@code delegate.get(request)} in classes assignable from {@code DelegatingServiceInstanceListSupplier} that don't already implement that method, with the exclusion of {@code CachingServiceInstanceListSupplier} and {@code HealthCheckServiceInstanceListSupplier}, which should be placed in the instance supplier hierarchy directly after the supplier performing instance retrieval over the network, before any request-based filtering is done. Note: in 4.1, this behaviour will become the default |spring.cloud.loadbalancer.clients | | |spring.cloud.loadbalancer.configurations | `+++default+++` | Enables a predefined LoadBalancer configuration. |spring.cloud.loadbalancer.eager-load.clients | | Names of the clients. From 583710b52e2c968de44a829a3d7fcce40e0b7b3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:10:34 +0200 Subject: [PATCH 3/8] Bump actions/upload-artifact from 2 to 3 (#1278) --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9b781b39..5e8733ce 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -36,7 +36,7 @@ jobs: with: report_paths: '**/surefire-reports/TEST-*.xml' - name: Archive code coverage results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: surefire-reports path: '**/surefire-reports/*' From 768fa3abd73785e0eb52d97672e27ced631cd5d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:11:41 +0200 Subject: [PATCH 4/8] Bump actions/setup-java from 2 to 3 (#1279) --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5e8733ce..52618e0c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: '17' From fffb31353b3d4bdc05f2c4a0a9b8d265927d217d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:13:48 +0200 Subject: [PATCH 5/8] Bump mikepenz/action-junit-report from 2 to 4 (#1282) --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 52618e0c..9105ce3a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -31,7 +31,7 @@ jobs: - name: Build with Maven run: ./mvnw -s .settings.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install -U -P sonar -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - name: Publish Test Report - uses: mikepenz/action-junit-report@v2 + uses: mikepenz/action-junit-report@v4 if: always() # always run even if the previous step fails with: report_paths: '**/surefire-reports/TEST-*.xml' From 158a3c32efc94636f6be1273e7475ce809df58c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:14:25 +0200 Subject: [PATCH 6/8] Bump actions/cache from 2 to 3 (#1283) --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9105ce3a..0a8052bc 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -22,7 +22,7 @@ jobs: distribution: 'temurin' java-version: '17' - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} From 5c6b7bac56a1060b12c786dc8573277d637dea8e Mon Sep 17 00:00:00 2001 From: Olga MaciaszekSharma Date: Tue, 26 Sep 2023 17:13:26 +0200 Subject: [PATCH 7/8] Fix endpoint reference. Based on gh-1241. --- docs/src/main/asciidoc/spring-cloud-commons.adoc | 4 ++-- .../endpoint/ServiceRegistryEndpointNoRegistrationTests.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc index b3eec186..1f89ce46 100644 --- a/docs/src/main/asciidoc/spring-cloud-commons.adoc +++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc @@ -375,9 +375,9 @@ NOTE: These events will not be fired if the `spring.cloud.service-registry.auto- ==== Service Registry Actuator Endpoint -Spring Cloud Commons provides a `/service-registry` actuator endpoint. +Spring Cloud Commons provides a `/serviceregistry` actuator endpoint. This endpoint relies on a `Registration` bean in the Spring Application Context. -Calling `/service-registry` with GET returns the status of the `Registration`. +Calling `/serviceregistry` with GET returns the status of the `Registration`. Using POST to the same endpoint with a JSON body changes the status of the current `Registration` to the new value. The JSON body has to include the `status` field with the preferred value. Please see the documentation of the `ServiceRegistry` implementation you use for the allowed values when updating the status and the values returned for the status. diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpointNoRegistrationTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpointNoRegistrationTests.java index 7e91a616..53806573 100644 --- a/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpointNoRegistrationTests.java +++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpointNoRegistrationTests.java @@ -48,12 +48,12 @@ public class ServiceRegistryEndpointNoRegistrationTests { @Test public void testGet() throws Exception { - this.mvc.perform(get("/service-registry/instance-status")).andExpect(status().isNotFound()); + this.mvc.perform(get("/serviceregistry/instance-status")).andExpect(status().isNotFound()); } @Test public void testPost() throws Exception { - this.mvc.perform(post("/service-registry/instance-status").content("newstatus")) + this.mvc.perform(post("/serviceregistry/instance-status").content("newstatus")) .andExpect(status().isNotFound()); } From 01098128f1f42805365a3784505ed21a4442e0b2 Mon Sep 17 00:00:00 2001 From: Olga MaciaszekSharma Date: Thu, 28 Sep 2023 11:16:44 +0200 Subject: [PATCH 8/8] Document context refresh not supported for AOT and native. --- docs/src/main/asciidoc/spring-cloud-commons.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc index 1f89ce46..47d91c07 100644 --- a/docs/src/main/asciidoc/spring-cloud-commons.adoc +++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc @@ -229,6 +229,8 @@ The configuration property must be present in order to update the value after a a value in your application you might want to switch your logic to rely on its absence instead. Another option would be to rely on the value changing rather than not being present in the application's configuration. +WARNING: Context Refresh is not supported for Spring AOT transformations and native images. For AOT and native images, `spring.cloud.refresh.enabled` needs to be set to `false`. + === Encryption and Decryption Spring Cloud has an `Environment` pre-processor for decrypting property values locally.