-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[REST Compatible API] Route refactoring #69573
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
Conversation
|
Crucially, these sorts of methods fall out: And now there is only |
.../rest/src/main/java/org/elasticsearch/xpack/deprecation/TestDeprecationHeaderRestAction.java
Outdated
Show resolved
Hide resolved
143bc38 to
9c4f16c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@pgomulka 7bb0919 should address your comment w.r.t. imports |
pgomulka
left a comment
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.
LGTM, thank you!
jaymode
left a comment
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 left a few minor comments, otherwise LGTM.
server/src/main/java/org/elasticsearch/rest/DeprecationRestHandler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/rest/MethodHandlers.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/rest/MethodHandlers.java
Outdated
Show resolved
Hide resolved
and add comments explaining their size
Collapse two constructors into one, document the new parameter that it grew, and add a test that exercises the new parameter.
|
Thank you @jakelandis, @jaymode, and @pgomulka for working with me on this one. I'm really happy with where it ended up! Now to resurrect the |
Related to elastic#51816 Makes `Route`s `RestApiVersion` -aware (and `RestHandler`s `RestApiVersion` -agnostic). Refactors how `Route`s are constructed in the case of deprecation or replacement of routes.
Related to #51816
Makes
RoutesRestApiVersion-aware (andRestHandlersRestApiVersion-agnostic). Refactors howRoutes are constructed in the case of deprecation or replacement of routes.Some examples of how this affects Rest Actions
Very normal existing rest action, no change on this PR:
A rest action with a deprecated route, before:
And after:
A rest action with some replaced routes, before:
And after: