Commit graph

32 commits

Author SHA1 Message Date
Ryan Ernst
991e80d56e
Remove unnecessary generic params from action classes (#126364)
Transport actions have associated request and response classes. However,
the base type restrictions are not necessary to duplicate when creating
a map of transport actions. Relatedly, the ActionHandler class doesn't
actually need strongly typed action type and classes since they are lost
when shoved into the node client map. This commit removes these type
restrictions and generic parameters.
2025-04-07 16:22:56 -07:00
Rene Groeschke
ba61f8c7f7
Update Gradle wrapper to 8.12 (#118683)
This updates the gradle wrapper to 8.12

We addressed deprecation warnings due to the update that includes:

- Fix change in TestOutputEvent api
- Fix deprecation in groovy syntax
- Use latest ospackage plugin containing our fix
- Remove project usages at execution time
- Fix deprecated project references in repository-old-versions
2024-12-30 15:34:24 +01:00
Rene Groeschke
f6ac6e1c3b
[Build] Remove deprecated BuildParams (#116984) 2024-11-22 16:30:57 +01:00
David Turner
bb9d612eb6
Show only committed cluster UUID in GET / (#114275)
Today we show `Metadata#clusterUUID` in the response to `GET /`
regardless of whether this value is committed or not, which means that
in theory users may see this value change even if nothing is going
wrong. To avoid any doubt about the stability of this cluster UUID, this
commit suppresses the cluster UUID in this API response until it is
committed.
2024-10-08 08:47:28 +01:00
Mark Vieira
a59c182f9f
Add AGPLv3 as a supported license 2024-09-13 15:29:46 -07:00
Patrick Doyle
35a375329a
Move Guice to org.elasticsearch.injection.guice (#111723)
* Move files and fix imports & module exports
* Other consequences of moving Guice
2024-08-12 10:47:46 -04:00
Lorenzo Dematté
38bcf07379
Explicit handling of a different Executor in TransportAction (#100895) 2024-07-25 09:10:30 +02:00
Moritz Mack
b71fc0c561
Migrate remaining usage of skip version in YAML specs to cluster_features (#108055) 2024-05-07 09:42:17 +02:00
Ryan Ernst
b67f5a6b57
Make cluster feature predicate available to plugins (#105022)
A predicate to check whether the cluster supports a feature is available
to rest handlers defined in server. This commit adds that predicate to
plugins defining rest handlers as well.
2024-02-01 09:11:18 -08:00
David Turner
1116889819
Remove unused arg from ActionType ctor (#104650)
`ActionType` represents an action which runs on the local node, there's
no need for implementations to define a `Reader<Response>`. This commit
removes the unused constructor argument.
2024-01-25 03:28:32 -05:00
Simon Cooper
016c778321
Remove NamedWriteableRegistry from NodeClient, pass it directly through to rest actions (#103277) 2024-01-11 12:42:22 +00:00
Ryan Ernst
8a1db8c6c3
Move index version constants to IndexVersions (#101094)
Similar to the TransportVersions holder class, IndexVersions is the new
place to contain all constants for IndexVersion. This commit moves all
existing constants to the new class. It is purely mechanical.
2023-10-19 20:44:51 -04:00
David Turner
3ce905b754
Remove more unnecessary ActionType subclasses (#101053)
Relates #97721
2023-10-18 13:56:40 +01:00
William Brafford
60daef3217
Remove more uses of Version#minimumCompatibilityVersion (#99988)
* Remove more uses of Version#minimumCompatibilityVersion
* Avoid mixing use of wire compat and index compat versions
2023-10-04 15:27:35 -04:00
David Turner
76c96ad5da
MainAction is local-only (#100227)
Removes all the test-only de/serialization code and XContent parsing.

Relates #100111
2023-10-04 16:14:14 +01:00
David Turner
0a31ce64a9
Remove dangerous default executor from HandledTransportAction (#100162)
Today subclasses of `HandledTransportAction` can specify the executor on
which they run, but the executor is optional and if omitted will use
`DIRECT_EXECUTOR_SERVICE`, which means the action runs on a transport
thread. This is a dangerous default behaviour because it makes it easy
to add new transport actions which implicitly run on a network thread,
which is very hard to pick up in reviews.

This commit makes the executor explicit in all callers, and marks the
dangerous methods for removal.
2023-10-03 17:54:52 -04:00
William Brafford
00e4dfc3f1
Remove Version from MainResponseTests (#100101)
Version values can be arbitrary strings for MainResponseTests. If it turns out that we need test values that look like semantic versions, we can add those back in once we have a use case, but in general Build should be able to support arbitrary version identifiers.
2023-10-02 09:56:44 -04:00
Ryan Ernst
19257125b1
Move transport version constants to TransportVersions (#97990)
Constants for TransportVersion currently live alongeside the class
definition. This has been fine since there was only one set of
constants. However, to support serverless, some constants will need to
be defined elsewhere.

This commit moves the existing constants to a new holder class,
TransportVersions. It is almost entirely mechanical, using IntelliJ move
members. The only non mechanical part was slightly shifting how CURRENT
is found, defining a LATEST in TransportVersions that is automatically
calculated (since we already have it, no need to manually define it).
2023-09-06 15:14:41 -04:00
Simon Cooper
d47abd9ffa
Collapse transport versions 850001* into 8500020 (#99083) 2023-09-06 13:04:09 +01:00
Simon Cooper
b0c0d80f03
Move conversion of minimum index compatibility to IndexVersion (#98685) 2023-08-22 16:23:09 +01:00
Ryan Ernst
753bbc89b4
Allow more parts of Build to be filled in (#97824)
Build represents information about the running build of ES. It has
some methods that assume some structure to the existing version.
Additionally MainResponse contains Version just to be able to retrieve
the min compat versions.

This commit makes all of these bits of info part of the state of Build.
It also removes Version from MainResponse as it is no longer necessary.
2023-07-26 09:31:13 -07:00
Ryan Ernst
ca468f00b8
Fix main response to return build flavor (#97857)
Build flavor was added back in #97770, but the main endpoint response
is still hardcoded to "default". This commit updates the response to
return the flavor from the build info.
2023-07-20 15:15:18 -07:00
Ryan Ernst
18329b0c82
Add back build flavor in build info (#97770)
The Build class keeps information about the running build of
Elasticsearch. There was previously a build flavor, which has since been
narrowed to just return the "default" flavor. This commit adds flavor
back to Build so that a plugged in Build can include a change to flavor.
2023-07-19 11:38:19 -04:00
Ryan Ernst
3f8f7182be
Remove index version and transport version from main endpoint response (#97675)
The index and transport versions are low level details of how a node
behaves in a cluster. They were recently added to the main endpoint
response, but they are too low level and should be moved to another
endpoint TBD.

This commit removes those versions from the main endpoint response. Due
to the fact lucene version is now derived from index version, this
commit also adds an explicit lucene version member to the main response.
2023-07-18 06:36:46 -07:00
Simon Cooper
572716f7cc
Add IndexVersion to MainResponse (#97386) 2023-07-07 11:27:54 +01:00
Ryan Ernst
568b292bde
Encapsulate current Build (#97292)
In order for build info to be pluggable for serverless, the current
build needs to be lazily determined. This commit moves the CURRENT
constant to a static method.

relates #96861
2023-07-06 11:38:54 -07:00
Simon Cooper
94df6f2a74
Fix possible NPE when transportversion is null in MainResponse (#97203) 2023-06-29 08:31:56 +01:00
Ryan Ernst
e0ec5fc2ea
Fix serialization constant (#96981)
In #96900 a new transport version was added for additional information
in the main response. However, due to upstream conflicts, this transport
version had to be bumped a few times. In the process, the the version
was bumped, but the condition was never updated. This commit fixes the
condition to use the version that was added.
2023-06-21 10:24:39 -04:00
Ryan Ernst
3d11f42888
Add transport version to main response (#96900)
The root endpoint for Elasticsearch contains diagnostic information
about what Elasticsearch is running. This commit adds TransportVersion
to this diagnostic information, alongside the existing version
information.
2023-06-20 16:36:04 -04:00
Przemyslaw Gomulka
c6da231a5e
Change MainRequest constructor scope (#96810)
in order for the rest-root module to be reused, the scope of the constructor
has to be changed to public
2023-06-14 09:57:59 +02:00
Simon Cooper
84a85901ac
Change Version.luceneVersion to a method (#96244) 2023-05-22 14:54:54 +01:00
Przemyslaw Gomulka
dc03c47ada
Refactor RestMainAction into separate module (#95881)
we want to allow overriding info (GET /) api in serverless, therefore this commit moves the RestMainAction and is transport classes into a module that has a rest plugin

Main endpoint is often used in testing to verfiy that a cluster is ready, hence this commit also has to add a testing dependency on main to a lot of modules

relates #95422
2023-05-10 14:39:00 +02:00