-
Notifications
You must be signed in to change notification settings - Fork 921
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
Autofill homePageUrl
and statusPageUrl
of an InstanceInfo
in Eureka using path properties.
#5465
Conversation
…reka using path properties. Motivation: Following up on the improvements introduced in line#5369, it's beneficial to extend the autofill feature to include `homePageUrl` and `statusPageUrl` of an `InstanceInfo`. This enhancement streamlines configuration by automatically populating these URLs based on corresponding path properties. Modifications: - Introduce `homePageUrlPath` and `statusPageUrlPath` properties to `InstanceInfo` and their respective builders. - Implement autofill functionality for `homePageUrl` and `statusPageUrl` using the configured path properties. Result: - `homePageUrl` and `statusPageUrl` of an `InstanceInfo` in Eureka are correctly set if corresponding path properties are configured. - Close line#5464
@codefromthecrypt Could you check this, please? 😉 |
cool this afternoon I will integration test this and let you know! |
@CsvSource({ | ||
"'',/,'',/,'',/", | ||
"custom-health,/custom-health,home-page,/home-page,status-page,/status-page", | ||
"/custom-health,/custom-health,/home-page,/home-page,/status-page,/status-page", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
🚢 diff --git a/pom.xml b/pom.xml
index 3560f8dbc..01f4ed50e 100755
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,7 @@
<!-- This allows you to test feature branches with jitpack -->
<armeria.groupId>com.linecorp.armeria</armeria.groupId>
- <armeria.version>1.27.1</armeria.version>
+ <armeria.version>1.27.2-SNAPSHOT</armeria.version>
<!-- Match Armeria version to avoid conflicts including running tests in the IDE -->
<netty.version>4.1.106.Final</netty.version>
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/eureka/ZipkinEurekaDiscoveryProperties.java b/zipkin-server/src/main/java/zipkin2/server/internal/eureka/ZipkinEurekaDiscoveryProperties.java
index b783dfbe5..8513a5cd6 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/eureka/ZipkinEurekaDiscoveryProperties.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/eureka/ZipkinEurekaDiscoveryProperties.java
@@ -106,7 +106,8 @@ class ZipkinEurekaDiscoveryProperties implements Serializable { // for Spark job
EurekaUpdatingListenerBuilder toBuilder() {
EurekaUpdatingListenerBuilder result = EurekaUpdatingListener.builder(serviceUrl)
- .healthCheckUrlPath("/health");
+ .healthCheckUrlPath("/health")
+ .statusPageUrlPath("/info");
if (auth != null) result.auth(auth);
if (appName != null) result.appName(appName);
if (instanceId != null) result.instanceId(instanceId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍
@@ -36,7 +36,8 @@ | |||
/** | |||
* An instance information. | |||
*/ | |||
@JsonIgnoreProperties(value = { "healthCheckUrlPath" }, ignoreUnknown = true) | |||
@JsonIgnoreProperties( | |||
value = { "homePageUrlPath", "statusPageUrlPath", "healthCheckUrlPath" }, ignoreUnknown = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional) @JsonIgnore
would be more maintainable to exclude some fields from serialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot about it. 😉
}) | ||
void customHealthCheckPath(String healthCheckUrlPath, String expectedHealthCheckUrlPath) | ||
void customHealthCheckPath(String healthCheckUrlPath, String expectedHealthCheckUrlPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
void customHealthCheckPath(String healthCheckUrlPath, String expectedHealthCheckUrlPath, | |
void customPaths(String healthCheckUrlPath, String expectedHealthCheckUrlPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks @minwoox 🙇 👍 🙇
hostnameOrIpAddr(hostnameOrIpAddr) + ':' + portWrapper.getPort(); | ||
} | ||
|
||
private static String concatPath(String baseURL, String oldHealthCheckUrlPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit; since the method isn't specific to healthcheck
private static String concatPath(String baseURL, String oldHealthCheckUrlPath) { | |
private static String concatPath(String baseURL, String urlPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. Thanks!
do you have an ETA for 1.28? I would like to release this fix and there isn't any clean way to work around it without the new code.. |
actually we could consider this 1.27.2 maybe if nothing else is merged |
We will release 1.27.2 this week. 😉 |
…reka using path properties. (line#5465) Motivation: Following up on the improvements introduced in line#5369, it's beneficial to extend the autofill feature to include `homePageUrl` and `statusPageUrl` of an `InstanceInfo`. This enhancement streamlines configuration by automatically populating these URLs based on corresponding path properties. Modifications: - Introduce `homePageUrlPath` and `statusPageUrlPath` properties to `InstanceInfo` and their respective builders. - Implement autofill functionality for `homePageUrl` and `statusPageUrl` using the configured path properties. Result: - `homePageUrl` and `statusPageUrl` of an `InstanceInfo` in Eureka are correctly set if corresponding path properties are configured. - Close line#5464
Motivation:
Following up on the improvements introduced in #5369, it's beneficial to extend the autofill feature to include
homePageUrl
andstatusPageUrl
of anInstanceInfo
. This enhancement streamlines configuration by automatically populating these URLs based on corresponding path properties.Modifications:
homePageUrlPath
andstatusPageUrlPath
properties toInstanceInfo
and their respective builders.homePageUrl
andstatusPageUrl
using the configured path properties.Result:
homePageUrl
andstatusPageUrl
of anInstanceInfo
in Eureka are correctly set if corresponding path properties are configured.