-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fixing swagger setup using localhost as host name #13254
fixing swagger setup using localhost as host name #13254
Conversation
cc: @abhioncbr |
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.
We do set host on server before. We might need to check the history on that. Maybe no one ever uses server swagger
@@ -50,12 +50,6 @@ public static void setupSwagger(String componentType, String resourcePackage, bo | |||
beanConfig.setResourcePackage(resourcePackage); | |||
beanConfig.setScan(true); | |||
|
|||
try { |
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.
Do we want to set the host based on the config for better customization? We can make a separate issue to support that.
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.
It was introduced in #5941, and doesn't seem required. We can remove it for now and revisit later. This seems like a bug to me
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #13254 +/- ##
============================================
+ Coverage 61.75% 62.16% +0.41%
+ Complexity 207 198 -9
============================================
Files 2436 2534 +98
Lines 133233 139016 +5783
Branches 20636 21541 +905
============================================
+ Hits 82274 86419 +4145
- Misses 44911 46135 +1224
- Partials 6048 6462 +414
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
3a06f96
to
628a5c5
Compare
Introduced https://github.com/apache/pinot/pull/13122/files#diff-7c6118ecbf342922f9e9288c5fbaf9c8dd3f158895d2a7e4e5582762249ecd06R54
We shouldn't set swagger hostname as localhost, which might not be accessible from the external environment.
E.g. pinot deployed in k8s will using
pinot-controller-1
as lcoalhost name, but this hostname is not exposed outside.Current Behavior is using machine hostname:
After fix: