-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
fix the apollo version logic by reading the server version instead of the apollo-core version #5105
Conversation
… the apollo-core version
WalkthroughThese updates centralize the versioning information of the Apollo server by introducing a new Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5105 +/- ##
============================================
- Coverage 50.38% 50.25% -0.14%
+ Complexity 2013 2010 -3
============================================
Files 387 388 +1
Lines 12213 12216 +3
Branches 1207 1207
============================================
- Hits 6154 6139 -15
- Misses 5696 5712 +16
- Partials 363 365 +2 ☔ View full report in Codecov by Sentry. |
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (3)
- apollo-common/src/main/java/com/ctrip/framework/apollo/common/constants/ApolloServer.java (1 hunks)
- apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/ApolloInfoController.java (2 hunks)
- apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SystemInfoController.java (3 hunks)
Check Runs (1)
codecov/patch failure (3)
- apollo-common/src/main/java/com/ctrip/framework/apollo/common/constants/ApolloServer.java: 22-24: Added lines #L22 - L24 were not covered by tests
- apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/ApolloInfoController.java: 40-40: Added line #L40 was not covered by tests
- apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SystemInfoController.java: 72-72: Added line #L72 was not covered by tests
Additional comments: 2
apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/ApolloInfoController.java (1)
- 40-40: Switching to
ApolloServer.VERSION
for version information inApolloInfoController
aligns with the PR's objectives. Ensure this change is reflected in all relevant parts of the application and consider adding test coverage for this new reference.apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SystemInfoController.java (1)
- 72-72: The use of
ApolloServer.VERSION
inSystemInfoController
is consistent with the PR's goal of accurately representing the server version. Ensure the change is thoroughly tested, especially since this modification impacts how the system version is determined and displayed.
public class ApolloServer { | ||
public final static String VERSION = | ||
"java-" + ApolloServer.class.getPackage().getImplementationVersion(); |
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.
The introduction of ApolloServer.VERSION
is a positive change for accurately representing the server version. However, consider adding a fallback mechanism or ensuring through documentation that the ImplementationVersion
in the package metadata is always set to avoid the java-null
scenario.
What's the purpose of this PR
fix the apollo version logic by reading the server version instead of the apollo-core version
Brief changelog
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.Summary by CodeRabbit
SystemInfoController
initialization process.