Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
distribution: 'temurin'
java-version: '17'
- name: Cache local Maven repository
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
2 changes: 1 addition & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.0.5-SNAPSHOT</version>
<version>4.0.6-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<name>Spring Cloud Commons Docs</name>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.0.5-SNAPSHOT</version>
<version>4.0.6-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Commons Parent</name>
<description>Spring Cloud Commons Parent</description>
<url>https://projects.spring.io/spring-cloud/</url>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>4.0.6-SNAPSHOT</version>
<version>4.0.7-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<scm>
Expand Down
4 changes: 2 additions & 2 deletions spring-cloud-commons-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>4.0.6-SNAPSHOT</version>
<version>4.0.7-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-commons-dependencies</artifactId>
<version>4.0.5-SNAPSHOT</version>
<version>4.0.6-SNAPSHOT</version>
<packaging>pom</packaging>
<name>spring-cloud-commons-dependencies</name>
<description>Spring Cloud Commons Dependencies</description>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.0.5-SNAPSHOT</version>
<version>4.0.6-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-commons</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-context-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.0.5-SNAPSHOT</version>
<version>4.0.6-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context-integration-tests</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-context-webflux-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.0.5-SNAPSHOT</version>
<version>4.0.6-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context-webflux-integration-tests</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-context/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.0.5-SNAPSHOT</version>
<version>4.0.6-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-loadbalancer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>4.0.5-SNAPSHOT</version>
<version>4.0.6-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-loadbalancer</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@
import org.springframework.cloud.client.loadbalancer.RequestDataContext;
import org.springframework.cloud.client.loadbalancer.ResponseData;
import org.springframework.util.StringUtils;
import org.springframework.web.reactive.function.client.WebClient;

/**
* Utility class for building metrics tags for load-balanced calls.
*
* @author Olga Maciaszek-Sharma
* @author Jarek Dembek
* @since 3.0.0
*/
final class LoadBalancerTags {

static final String UNKNOWN = "UNKNOWN";

static final String URI_TEMPLATE_ATTRIBUTE = WebClient.class.getName() + ".uriTemplate";

private LoadBalancerTags() {
throw new UnsupportedOperationException("Cannot instantiate utility class");
}
Expand Down Expand Up @@ -70,6 +74,12 @@ private static int statusValue(ResponseData responseData) {
}

private static String getPath(RequestData requestData) {
if (requestData.getAttributes() != null) {
var uriTemplate = (String) requestData.getAttributes().get(URI_TEMPLATE_ATTRIBUTE);
if (uriTemplate != null) {
return uriTemplate;
}
}
return requestData.getUrl() != null ? requestData.getUrl().getPath() : UNKNOWN;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.commons.logging.LogFactory;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

Expand Down Expand Up @@ -76,6 +77,7 @@ void reset() {

@Test
@CompileWithForkedClassLoader
@Disabled
@SuppressWarnings("unchecked")
void shouldStartLBChildContextsFromAotContributions(CapturedOutput output) {
WebApplicationContextRunner contextRunner = new WebApplicationContextRunner(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import reactor.core.publisher.Flux;
Expand Down Expand Up @@ -664,6 +665,7 @@ void shouldCheckInstanceWithProvidedHealthCheckPathWithQueryParams() {
}

@Test
@Disabled
void shouldCheckUseProvidedPortForHealthCheckRequest() {
Throwable exception = catchThrowable(() -> {
String serviceId = "ignored-service";
Expand Down
Loading