Commit graph

2075 commits

Author SHA1 Message Date
Rene Groeschke
342083100b
[Build] Add support for publishing to maven central (#128659)
This ensures we package an aggregation zip with all artifacts we want to publish to maven central as part of a release.
Running zipAggregation will produce a zip file in the build/nmcp/zip folder. The content of this zip is meant to match the maven artifacts we have currently declared as dra maven artifacts.
2025-06-06 17:35:44 +02:00
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
496c38e5a5
Reapply "Update Gradle wrapper to 8.13 (#122421)" (#123889) (#123896)
This reverts commit 36660f2e5f.
2025-03-05 08:02:13 +01:00
Rene Groeschke
36660f2e5f
Revert "Update Gradle wrapper to 8.13 (#122421)" (#123889)
This reverts commit e19b2264af.
2025-03-03 15:51:07 +01:00
Rene Groeschke
e19b2264af
Update Gradle wrapper to 8.13 (#122421)
* Fix Gradle Deprecation warning as declaring an is- property with a Boolean type has been deprecated.
* Make use of new layout.settingsFolder api to address some cross project references
* Fix buildParams snapshot check for multiprojet projects
2025-03-03 14:10:00 +01:00
Mark Vieira
eb6a49b7af
Upgrade mockito (#121849) 2025-02-06 09:36:04 -08:00
Jake Landis
c3e11a7188
Fix and unmute FIPS tests (#119618)
Fixes and un-mutes tests associated with FIPS.
Most of the fixes are due to differing expected exceptions or log messages when using BouncyCastle as the JCE/JSSE provider.
Only test code is changed with this commit.

fixes: #49094
2025-01-08 11:38:08 -06: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
5278159987
Reapply "[Build] Do not invalidate configuration cache when branch is switched (#118894)" (#119300) (#119325)
* Reapply "[Build] Do not invalidate configuration cache when branch is switched (#118894)" (#119300)

The original PR (#118894) has broken serverless.

* Fix gitinfo plugin for serverless usage

* Update buildscan git revision reference
2024-12-30 08:54:42 +01:00
Mark Vieira
9d0f08bedf
Revert "[Build] Do not invalidate configuration cache when branch is switched (#118894)" (#119300)
This reverts commit f9c6a6c0b2.
2024-12-27 10:05:53 +11:00
Rene Groeschke
f9c6a6c0b2
[Build] Do not invalidate configuration cache when branch is switched (#118894)
* [Build] Do not invalidate configuration cache when branch is switched
* Update build tools tests
* Update GitInfoValueSource.java
2024-12-23 14:51:33 +00:00
Ryan Ernst
e5d5c17c99
Use directory name as project name for libs (#115720)
The libs projects are configured to all begin with `elasticsearch-`.
While this is desireable for the artifacts to contain this consistent
prefix, it means the project names don't match up with their
directories. Additionally, it creates complexities for subproject naming
that must be manually adjusted.

This commit adjusts the project names for those under libs to be their
directory names. The resulting artifacts for these libs are kept the
same, all beginning with `elasticsearch-`.
2024-10-29 13:02:28 -07: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
Mark Vieira
1a05273232
Upgrade Mockito dependency (#108637) 2024-05-14 14:03:40 -07:00
Dmitry Cherniachenko
a50e58d99a
Use single-char variant of String.indexOf() where possible (#105205)
* Use single-char variant of String.indexOf() where possible

indexOf(char) is more efficient than searching for the same one-character String.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-02-12 14:14:32 -05:00
Joe Gallo
d54329011f
Remove HLRC from ES codebase (#105406) 2024-02-12 11:50:01 -05:00
Ignacio Vera
a129da23f0
Remove aggregation test testing the high level rest client (#105294)
Removing those test and the actual HLRC classes. TheHLRC is not a thing any longer.
2024-02-12 10:34:25 +01:00
Armin Braun
5c8006499a
Move test-only search response x-content-parsing code to test codebase (#105308)
Loads of code here that is only used in tests and one duplicate unused
class that was only used as an indirection to parsing the
`AsyncSearchResponse`. Moved what I could easily move via automated
refactoring to `SearchResponseUtils` in tests and removed the duplicate
now unused class from the client codebase.
2024-02-09 11:56:39 +01: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
Ignacio Vera
79f801b754
Remove unused ParsedAggregation (#104848)
This abstraction was introduced to support the high level rest client and is not needed any more.
2024-01-29 14:59:11 +01: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
eyalkoren
6f4e293d29
Add require_data_stream feature (#101872)
Closes #97032

Adding the ability to set `require_data_stream` parameter (boolean) on bulk and indexing APIs.
For document indexing, this flag requires the indexing operation to either be pointed at a data stream, or match a template that will create a data stream.
2024-01-18 09:15:48 -07:00
Mark Vieira
66509df642
Update mockito dependency (#104494) 2024-01-18 06:58:48 -08:00
Simon Cooper
016c778321
Remove NamedWriteableRegistry from NodeClient, pass it directly through to rest actions (#103277) 2024-01-11 12:42:22 +00:00
David Turner
cd2bb08957
Set thread name used by REST client (#103160)
By default the REST client uses a thread factory which names its threads
with the generic pattern `I/O dispatcher %d`. This commit adds the
prefix `elasticsearch-rest-client-`, and a client-instance-specific ID,
to the name of these threads to make them easier to identify.
2024-01-09 08:22:41 +00:00
Armin Braun
36f08ea441
Make use of constants and utility methods to build empty SearchHits instances (#103983)
This are to be made ref-counted shortly. There's no point in having any
pooling/leak-tracking for empty instances though. To prepare for that,
lets add some short-cuts for dealing with empty instances to make the
overall change smaller and cleanup code already.
2024-01-05 17:43:06 +01:00
Armin Braun
073351bdfb
Use ref-count aware chunked-xcontent listener in most spots (#103803)
We had a lot of spots where the search response wasn't yet handled by
the ref-counting version of the listener. I figured, since all but 2
usages of the plain listener involved a ref counted (albeit noop)
transport response anyway, I might as well mostly use that one to aid
potential future refactoring.
2024-01-02 19:21:27 +01:00
Armin Braun
7fc1fcb2ee
Remove InternalSearchResponse as well as most usage of SearchResponseSections (#103583)
This indirection isn't really necessary now that its use in the high
level rest client went away. -> flattened the `SearchResponse` class to
make ref counting easier -> removed `InternalSearchResponse` whose
functionality was completely redundant now -> removed serialization and
most of the usage of `SearchResponseSections`, only keeping this for the
few search execution spots that currently use it and where removing it
won't get us anything and will be a huge changeset.

enables the last steps in #102030
2023-12-20 12:57:36 -05:00
David Turner
e8c3a72785
Extract constant for ?ignore pseudo-parameter (#102365)
Today `RestClient` interprets an `?ignore=` request parameter as an
indication that certain HTTP response codes should be considered
successful and not raise a `ResponseException`. This commit replaces the
magic literal `"ignore"` with a constant and adds a utility to specify
the ignored codes as `RestStatus` values.
2023-11-20 03:37:02 -05:00
Joe Gallo
94b58f5f94
Remove the RestHighLevelClient and some supporting classes (#102305) 2023-11-16 17:58:36 -05:00
Joe Gallo
29aa74b1ce
More miscellaneous tidying towards removing the HLRC (#102175) 2023-11-14 18:14:48 -05:00
Armin Braun
ae6d180379
Clean up some more dead code in o.e.s.aggregations (#101820)
Another iteration of mostly automatic cleanup on top of #101806.
2023-11-07 20:07:17 +01:00
Joe Gallo
b750f6e980
Remove HLRC from EQL tests (#101697) 2023-11-02 11:39:59 -04:00
Joe Gallo
3c2d8f265d
Remove HLRC from repository-old-versions test (#101696) 2023-11-02 09:34:05 -04:00
Rene Groeschke
4fa18ff42b
Make forbidden apis check cacheable and cc compatible (#101217)
* Make forbidden apis check cacheable and cc compatible
* Port CheckForbiddenApiTask to use worker api
* Simplify runtime classpath for CheckForbiddenApisTask
2023-11-01 16:24:28 +01:00
Joe Gallo
e9179ae71e
Miscellaneous tidying towards removing the HLRC (#101604) 2023-11-01 10:10:44 -04:00
Christoph Büscher
f08ae65f50
Unmute RestClientMultipleHostsIntegTests.testCancelAsyncRequests (#101592)
The underlying issue is closed, so either this test should be running
correctly now, is still failing for valid reasons or can be removed.
Either way we need to enable it to see.
2023-10-31 06:44:58 -04:00
David Turner
3ce905b754
Remove more unnecessary ActionType subclasses (#101053)
Relates #97721
2023-10-18 13:56:40 +01:00
Keith Massey
92ec9d6605
Add executed pipelines to bulk api response (#100031)
This change allows users to pass a new list_executed_pipelines parameter
to the bulk API, which results in an executed_pipelines list being returned.
2023-10-17 09:39:09 -05: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
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
Rene Groeschke
b8627079b4
Update Gradle Wrapper to 8.2 (#96686)
- Convention usage has been deprecated and was fixed in our build files
- Fix test dependencies and deprecation
2023-07-04 15:35:15 +02:00
Armin Braun
63e64ae61b
Cleanup Stream usage in various spots (#97306)
Lots of spots where we did weird things around streams like redundant stream creation, redundant collecting
before adding all the collected elements to another collection or so, redundant streams for joining strings
and using less efficient `Collectors.toList` and in a few cases also incorrectly relying on the result being mutable.
2023-07-03 14:24:57 +02:00
Chris Hegarty
ccd9efb807
Update to Mockito 5.4.0 (#97285) 2023-06-30 18:27:47 +01:00
Michael Peterson
8b1cd47455
Support CCS minimize round trips in async search (#96012)
* Support CCS minimize round trips in async search

This commit makes the smallest set of changes to allow async-search based cross-cluster search
to work with the CCS minimize_round_trips feature without changing the internals/architecture of
the search action.

When ccsMinimizeRoundtrips is set to true on SubmitAsyncSearchRequest, the AsyncSearchTask on the
primary CCS coordinator sends a synchronous SearchRequest to all to clusters for a remote coordinator
to orchestrate and return the entire result set to the CCS coordinator as a single response.

This is the same functionality provided by synchronous CCS search using minimize_roundtrips.
Since this is an async search, it means that the async search coordinator has no visibility
into search progress on the remote clusters while they are running the search, thus losing one of
the key features of async search. However, this is a good first approach for improving overall search
latency for cross cluster searches that query a large number of shards on remote clusters, since
Kibana does not currently expose incremental progress of an async search to users.

Relates #73971
2023-06-01 10:34:16 -04:00
Alan Woodward
a3edf6b454
Add XContent chunking to SearchResponse (#94736)
This commit adds xcontent chunking to SearchResponse and MultiSearchResponse
by making SearchHits implement ChunkedToXContent.

Relates to #89838
2023-05-12 12:45:44 +01:00
Rory Hunter
fe1083f6c5
Upgrade spotless plugin to 6.17.0 (#94994)
Fixes #82794. Upgrade the spotless plugin, which addresses the issue
around formatting `instanceof` expressions. Formatting of statements
including lambdas seems to have improved too.
2023-04-04 10:03:32 +01:00
David Turner
343225b07b
Remove all blocking on Listenable*Future (#94411)
There are almost no places where we block a thread to wait on the result
of a `ListenableFuture` or `ListenableActionFuture`, and the few places
that do so can trivially use a `PlainActionFuture` instead. This commit
removes all blocking on `ListenableFuture` or `ListenableActionFuture`.

Relates #94386
2023-03-10 16:29:23 +00:00
Armin Braun
49898d4a60
Remove most of o.e.c.i.Requests (#94266)
We don't have the transport client anymore and this was a questionable
class to begin with. Removing the pointless constructor wrappers and
deprecating it for removal. Mostly to save hundreds of LoC and make
tests a little more homogeneous.
2023-03-02 16:14:49 +01:00