eventmesh icon indicating copy to clipboard operation
eventmesh copied to clipboard

[ISSUE #4767] Refactor Admin server http handler.

Open karsonto opened this issue 1 year ago • 3 comments

Fixes #4767

Motivation

Explain the content here. Explain why you want to make the changes and what problem you're trying to solve.

Modifications

Describe the modifications you've done.

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

karsonto avatar Feb 06 '24 10:02 karsonto

Codecov Report

Attention: Patch coverage is 0% with 605 lines in your changes are missing coverage. Please review.

Project coverage is 16.20%. Comparing base (172804a) to head (d383da0).

Files Patch % Lines
...ventmesh/runtime/admin/handler/MetricsHandler.java 0.00% 49 Missing :warning:
...esh/runtime/admin/handler/AbstractHttpHandler.java 0.00% 47 Missing :warning:
...ntmesh/runtime/admin/handler/TCPClientHandler.java 0.00% 42 Missing :warning:
...tmesh/runtime/admin/handler/GrpcClientHandler.java 0.00% 39 Missing :warning:
...e/admin/handler/RedirectClientByIpPortHandler.java 0.00% 31 Missing :warning:
...tmesh/runtime/admin/handler/HTTPClientHandler.java 0.00% 29 Missing :warning:
...ime/admin/handler/RedirectClientByPathHandler.java 0.00% 29 Missing :warning:
...dmin/handler/RedirectClientBySubSystemHandler.java 0.00% 27 Missing :warning:
...ime/admin/handler/RejectClientByIpPortHandler.java 0.00% 27 Missing :warning:
.../admin/handler/RejectClientBySubSystemHandler.java 0.00% 26 Missing :warning:
... and 18 more
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #4768       +/-   ##
=============================================
+ Coverage          0   16.20%   +16.20%     
- Complexity        0     1711     +1711     
=============================================
  Files             0      856      +856     
  Lines             0    30898    +30898     
  Branches          0     2684     +2684     
=============================================
+ Hits              0     5007     +5007     
- Misses            0    25424    +25424     
- Partials          0      467      +467     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 07 '24 21:02 codecov[bot]

HttpCommand will be deprecated, we will only use requestURI method for http request, no need to add the requestURI for HttpCommand, you can add the @Deprecated annotation for HttpCommand. @karsonto

xwm1992 avatar Feb 19 '24 02:02 xwm1992

In addition to the admin server, HttpCommand is also used in the Processor of the http server. This class should not be deprecated. @xwm1992

karsonto avatar Feb 19 '24 06:02 karsonto

So HttpCommand shall be deprecated or not?

Pil0tXia avatar Feb 22 '24 10:02 Pil0tXia

In addition to the admin server, HttpCommand is also used in the Processor of the http server. This class should not be deprecated. @xwm1992

why not use HttpRequest URL instead of HttpCommand ?

xwm1992 avatar Feb 23 '24 02:02 xwm1992

Because in addition to the HttpRequest URL , HttpCommand also wraps other information such as http method header. @xwm1992

karsonto avatar Feb 23 '24 03:02 karsonto

Any more problems with the usage of HttpCommand?

Pil0tXia avatar Mar 28 '24 07:03 Pil0tXia

Codecov Report

Attention: Patch coverage is 0% with 607 lines in your changes are missing coverage. Please review.

Project coverage is 16.20%. Comparing base (172804a) to head (a62d321).

:exclamation: Current head a62d321 differs from pull request most recent head f90458a. Consider uploading reports for the commit f90458a to get more accurate results

Files Patch % Lines
...ventmesh/runtime/admin/handler/MetricsHandler.java 0.00% 49 Missing :warning:
...esh/runtime/admin/handler/AbstractHttpHandler.java 0.00% 48 Missing :warning:
...ntmesh/runtime/admin/handler/TCPClientHandler.java 0.00% 42 Missing :warning:
...tmesh/runtime/admin/handler/GrpcClientHandler.java 0.00% 39 Missing :warning:
...e/admin/handler/RedirectClientByIpPortHandler.java 0.00% 31 Missing :warning:
...tmesh/runtime/admin/handler/HTTPClientHandler.java 0.00% 29 Missing :warning:
...ime/admin/handler/RedirectClientByPathHandler.java 0.00% 29 Missing :warning:
...ime/admin/handler/RejectClientByIpPortHandler.java 0.00% 27 Missing :warning:
...dmin/handler/RedirectClientBySubSystemHandler.java 0.00% 26 Missing :warning:
.../admin/handler/RejectClientBySubSystemHandler.java 0.00% 26 Missing :warning:
... and 19 more
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #4768       +/-   ##
=============================================
+ Coverage          0   16.20%   +16.20%     
- Complexity        0     1710     +1710     
=============================================
  Files             0      857      +857     
  Lines             0    30883    +30883     
  Branches          0     2685     +2685     
=============================================
+ Hits              0     5005     +5005     
- Misses            0    25410    +25410     
- Partials          0      468      +468     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 03 '24 03:04 codecov-commenter

@xwm1992 @Pil0tXia I have revised it according to your suggestion.

karsonto avatar Apr 03 '24 03:04 karsonto

@Pil0tXia All the issues mentioned previously have been resolved.

karsonto avatar Apr 03 '24 07:04 karsonto