-
Notifications
You must be signed in to change notification settings - Fork 926
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
Set Eureka InstanceInfo to endpoint attribute #6069
base: main
Are you sure you want to change the base?
Set Eureka InstanceInfo to endpoint attribute #6069
Conversation
@@ -399,6 +400,24 @@ public List<Endpoint> apply(byte[] content) { | |||
} | |||
} | |||
|
|||
private static final class EurekaInstanceInfoUtil { |
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.
Let's:
- Remove this class because users cannot access this class to retrieve
InstanceInfo
- Move
com.linecorp.armeria.internal.common.eureka.InstanceInfo
tocom.linecorp.armeria.common.eureka.InstanceInfo
- Move the methods to the
InstanceInfo
class - Add a test to verify that users can retrieve the
InstanceInfo
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.
Okay, thanks for the steps. I will work on it.
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.
I would like your opinion on my approach for resolving some exceptions in the CI workflow and to know whether the potential modifications align with the project.
Motivation:
Since it is ensured that the public API does not expose the shaded classes, after moving com.linecorp.armeria.internal.common.eureka.InstanceInfo
to com.linecorp.armeria.common.eureka.InstanceInfo
, the same exception occurs with the following jobs:
- build-ubicloud-standard-16-jdk-*
- build-macos-latest-jdk-21
- build-windows-latest-jdk-21
Execution failed for task ':javadoc:checkJavadoc'.
> java.lang.Exception: Disallowed class(es) in the public API:
- InstanceInfo -> com.linecorp.armeria.internal.common.eureka.DataCenterInfo
- InstanceInfo -> com.linecorp.armeria.internal.common.eureka.LeaseInfo
Modifications:
- Move
com.linecorp.armeria.internal.common.eureka.DataCenterInfo
tocom.linecorp.armeria.common.eureka.DataCenterInfo
. - Move
com.linecorp.armeria.internal.common.eureka.LeaseInfo
tocom.linecorp.armeria.common.eureka.LeaseInfo
. - Make public
com.linecorp.armeria.internal.common.eureka.DataCenterInfoSerializer
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.
Yeah, we also need to move those classes. 😉
29d007a
to
b99a0b0
Compare
Related: line#6056 Motivation: Users might want to use the metadata from the Eureka `InstanceInfo` but currently, there's no way to retrieve it. Modifications: - Add a helper class to hide the implementation detail. - Set the `InstanceInfo` to the `Endpoint` as an attribute. Result: - Closes line#6056 - Now users can retrieve it.
Related: line#6056 Motivation: Users might want to use the metadata from the Eureka `InstanceInfo` but currently, there's no way to retrieve it. Modifications: - Remove helper class because users cannot access this class to retrieve `InstanceInfo`. - Move `com.linecorp.armeria.internal.common.eureka.InstanceInfo` to `com.linecorp.armeria.common.eureka.InstanceInfo`. - Move the methods to the `InstanceInfo` class. - Add a test to verify that users can retrieve the `InstanceInfo`. Result: - Closes line#6056 - Now users can retrieve it.
d205a96
to
258fd3f
Compare
Motivation: Since it is ensured that the public API does not expose the shaded classes, after moving `com.linecorp.armeria.internal.common.eureka.InstanceInfo` to `com.linecorp.armeria.common.eureka.InstanceInfo`, the same exception occurs with the following jobs: - build-ubicloud-standard-16-jdk-* - build-macos-latest-jdk-21 - build-windows-latest-jdk-21 ``` Execution failed for task ':javadoc:checkJavadoc'. > java.lang.Exception: Disallowed class(es) in the public API: - InstanceInfo -> com.linecorp.armeria.internal.common.eureka.DataCenterInfo - InstanceInfo -> com.linecorp.armeria.internal.common.eureka.LeaseInfo ``` Modifications: - Move `com.linecorp.armeria.internal.common.eureka.DataCenterInfo` to `com.linecorp.armeria.common.eureka.DataCenterInfo`. - Move `com.linecorp.armeria.internal.common.eureka.LeaseInfo` to `com.linecorp.armeria.common.eureka.LeaseInfo`. - Make public `com.linecorp.armeria.internal.common.eureka.DataCenterInfoSerializer` Result: DataCenterInfo and LeaseInfo classes are now allowed
Related: #6056
Motivation:
Users might want to use the metadata from the Eureka
InstanceInfo
but currently, there's no way to retrieve it.Modifications:
InstanceInfo
to theEndpoint
as an attribute.Result: