-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Use valid REST version when determining capabilities #123864
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
Pinging @elastic/es-core-infra (Team:Core/Infra) |
So, this uses a cluster feature to determine when we should use v8 vs v9 api version by default, and doesn't need any changes on 8.x lines. |
This could be made more generic by using |
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.
This could be made more generic
I agree, and I think making it more generic would make this more robust so we don't need to make future changes (the UpdateForV10 annotation would not be needed).
server/src/main/java/org/elasticsearch/features/InfrastructureFeatures.java
Outdated
Show resolved
Hide resolved
...g/elasticsearch/action/admin/cluster/node/capabilities/TransportNodesCapabilitiesAction.java
Outdated
Show resolved
Hide resolved
...g/elasticsearch/action/admin/cluster/node/capabilities/TransportNodesCapabilitiesAction.java
Outdated
Show resolved
Hide resolved
3758cbb
to
1e9ec42
Compare
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
If the rest api version is not specified, infer the correct one to use from the major versions present on the cluster, determined using features
💚 Backport successful
|
If the rest api version is not specified, infer the correct one to use from the major versions present on the cluster, determined using features
v8 nodes don't know about v9 REST API. But when doing a capabilities check, with implicit rest version, you just want to know what the current cluster can do. So this does that.