Commit Graph

85752 Commits

Author SHA1 Message Date
elasticsearchmachine 44a74f9fec Mute org.elasticsearch.xpack.security.SecurityRolesMultiProjectIT testUpdatingFileBasedRoleAffectsAllProjects #126223 2025-04-04 01:15:31 +11:00
elasticsearchmachine 7807183972 Mute org.elasticsearch.entitlement.runtime.policy.PolicyUtilsTests testFormatFilesEntitlement #126176 2025-04-04 01:03:43 +11:00
Pat Whelan 69180eafe1
[ML] Refactor SSE Parsing (#125959)
ServerSentEvent is now a record with `event` and `data`, rather than
it being a record for value with a separate `ServerSentEventField`.

- `value` was renamed to `data`
- `hasValue` was renamed to `hasData`
- Parsing was refactored to read more like its spec: writing to a buffer
  and flushing when we reach a blank newline
- We now support multiline data payloads
2025-04-03 09:42:49 -04:00
elasticsearchmachine 3277ff8b28 Mute org.elasticsearch.index.engine.ThreadPoolMergeSchedulerTests testSchedulerCloseWaitsForRunningMerge #125236 2025-04-04 00:31:29 +11:00
David Turner 69f9914403
Migrate tests away from S3 SDK `MD5DigestCalculatingInputStream` (#126099)
`S3BlobContainerRetriesTests` uses `MD5DigestCalculatingInputStream`
from the AWS v1 SDK to compute a MD5 checksum, but this feature is not
available in the v2 SDK. With this commit we remove this dependency and
compute the MD5 checksums directly instead.
2025-04-03 14:11:00 +01:00
elasticsearchmachine d5c0778f70 Mute org.elasticsearch.snapshots.SharedClusterSnapshotRestoreIT testDeletionOfFailingToRecoverIndexShouldStopRestore #126204 2025-04-03 22:40:38 +11:00
Richard Dennehy f821930518
Fix NPE for missing Content Type header in OIDC Authenticator (#126191)
* Fix NPE for missing Content Type header in OIDC Authenticator

* Update docs/changelog/126191.yaml
2025-04-03 12:38:53 +01:00
Mary Gouseti 95257bbf07
Make data stream options multi-project aware (#126141) 2025-04-03 14:33:40 +03:00
Przemysław Witek 062d580899
Verify usage of CATEGORIZE function in the ES|QL telemetry tests (#126105) 2025-04-03 13:19:49 +02:00
Albert Zaharovits 0faa960aa2
Fix IndexStatsIT (#126113)
Ensures proper cleanup in the testThrottleStats test.

Fixes #125910 #125907 #125912
2025-04-03 14:09:38 +03:00
Craig Taverner 1645711ff8
Unmute already fixed test (#126194)
This was fixed last week in
https://github.com/elastic/elasticsearch/pull/125802. It seems this
report was from the day before the fix, but the PR was based on main
without the mute, so a timing issue. I'll make a PR that simply unmutes
the test.

Fixes #125735
2025-04-03 22:07:39 +11:00
Martijn van Groningen 717d00d96d
Fix TsdbDocValueBwcTests test failure. (#126182)
Don't perform version check assertion in TsdbDocValueBwcTests if security manager is active.

By default, with jvm version 24 entitlements are used instead security manager and assertOldDocValuesFormatVersion() / assertNewDocValuesFormatVersion() work as expected.

Making these methods work with security manager would require granting the server entire test codebase suppressAccessChecks and suppressAccessChecks privileges. This is undesired from a security manager perspective. Instead, only assert doc values format checks if security manager isn't active, which is always the case jvm version 24 or higher is used.

Closes #126174
2025-04-03 12:19:59 +02:00
Albert Zaharovits ecaa0b1f65
Fix ThreadPoolMergeSchedulerTests testSchedulerCloseWaitsForRunningMerge (#126110)
Fixes #125236
2025-04-03 11:11:55 +03:00
Ievgen Degtiarenko 0095f29624
Remove TableInfo (#126090) 2025-04-03 09:42:32 +02:00
Alexander Spies 28a544e0c5
ESQL: Fix ReplaceMissingFieldsWithNull (#125764)
* Revert changes to Layout.java

The change in 80125a4bac is a quick fix
and allows breaking an invariant of Layout. Revert that.

* Simplify ReplaceMissingFieldWithNull

When encountering projections, it tries to do the job of field
extraction for missing fields by injecting an Eval that creates a
literal null with the same name id as the field attribute for the
missing field. This is wrong:
1. We only insert an Eval in case that a Project relies on the missing
   attribute. There could be other plan nodes that rely on the missing
   attribute.
2. Even for Projects, we only insert an Eval in case we squarely project
   for the field - in case of aliases (e.g. from RENAME), we do nothing.
3. In case of multiple Projects that use this attribute, we create
   multiple attributes with the original field attribute's id, causing
   a wrong Layout. This triggered
   https://github.com/elastic/elasticsearch/issues/121754.

* Revive logic for EsRelation instead of Project

* Update LocalLogicalPlanOptimizerTests

* Update docs/changelog/125764.yaml

* Update test expectations

* Do not prune attributes from EsRelation

This can lead to empty output, which leads to the EsRelation being
replaced by a LocalRelation with 0 rows.

* Add tests + capability

* Update docs/changelog/125764.yaml

* Add comments
2025-04-03 09:26:26 +02:00
David Turner 9b353f69a7
Fix `CommonPrefixes` rendering in `S3HttpHandler` (#126147)
Today the `ListObjects` implementation in `S3HttpHandler` will put all
the common prefixes in a single `<CommonPrefixes>` container, but in
fact the real S3 gives each one its own container. The v1 SDK is lenient
and accepts either, but the v2 SDK requires us to do this correctly.
This commit fixes the test fixture to match the behaviour of the real
S3.
2025-04-03 07:55:07 +01:00
Nhat Nguyen b563145129
Rename METRICS command to TS (#126064)
- Rename METRICS to TS
- Disable time-series tests in mixed clusters until the development stabilizes.
2025-04-02 16:16:46 -07:00
Joe Gallo 552066e910
Revert "Bump spotless (#126125)" (#126173)
Reverting https://github.com/elastic/elasticsearch/pull/126125 due to
https://github.com/elastic/elasticsearch/pull/126125#issuecomment-2773672346.
2025-04-03 09:00:33 +11:00
Bogdan Pintea 2b512bc58a
ESQL: make `AttributeMap` and `AttributeSet` immutable (#125938)
This will allow reusing them in the plan analysis and skip recreating them in UnaryPlan/UnaryExec when not needed.
Introduce/adjust builders for them, which are now the only way to use a modifiable map/set.

Related #124395
2025-04-02 23:27:12 +02:00
elasticsearchmachine 8a44b382b8 Merge patch/serverless-fix into main 2025-04-02 21:00:39 +00:00
Benjamin Trent 33dcc921be
Mark rescore_vector as generally available (#126038)
* Mark rescore_vector as generally available

* Update docs/changelog/126038.yaml
2025-04-02 16:10:01 -04:00
Pawan Kartik c54c3afb42
Add transport version entry for backport (#126168) 2025-04-02 20:40:34 +01:00
Oleksandr Kolomiiets daed78308c
Fix KeywordFieldBlockLoaderTests (#126146) 2025-04-02 11:59:22 -07:00
Albert Zaharovits 01a1f454e1
Unmute ThreadContextTests testDropWarningsExceedingMaxSettings (#123629) 2025-04-02 21:10:29 +03:00
Ioana Tagirta 47edd0adb8
Remove SEMANTIC_TEXT data type in ES|QL (#125581) 2025-04-02 19:47:28 +02:00
Stanislav Malyshev d84b65d38b
Ensure the set of remote clusters is consistent over the life of ES|QL query (#126000)
* Ensure the set of remote clusters is consistent over the life of ES|QL query
2025-04-02 11:46:04 -06:00
Niels Bauman 483f97915c
Run `TransportGetIndexAction` on local node (#125652)
This action solely needs the cluster state, it can run on any node.
Since this is the last class/action that extends the `ClusterInfo`
abstract classes, we remove those classes too as they're not required
anymore.

Relates #101805
2025-04-02 18:41:35 +01:00
Pawan Kartik e4fb22c4f3
ES|QL: Wrap remote errors with cluster name to provide more context (#123156)
Wrap remote errors with cluster name to provide more context

Previously, if a remote encountered an error, user would see a top-level error that would provide no context about which remote ran into the error. Now, such errors are wrapped in a separate remote exception whose error message clearly specifies the name of the remote cluster and the error that occurred is the cause of this remote exception.
2025-04-02 18:08:20 +01:00
Joe Gallo 1306c6ba01
Bump spotless (#126125) 2025-04-02 13:06:42 -04:00
Joe Gallo 078f7ff9f7
Minor docs fixes (#126143) 2025-04-02 12:30:07 -04:00
Mark J. Hoy e77bf808ab
Add Bounded Window to Inference Models for Rescoring to Ensure Positive Score Range (#125694)
* apply bounded window inference model

* linting

* add unit tests

* [CI] Auto commit changes from spotless

* add additional tests

* remove unused constructor

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-04-02 11:50:04 -04:00
Niels Bauman 509a12058f
Run `TransportGetLifecycleAction` on local node (#126002)
This action solely needs the cluster state, it can run on any node.

Relates #101805
2025-04-02 16:35:25 +01:00
elasticsearchmachine fcd7c9f9f5 Mute org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT test #126139 2025-04-03 02:27:51 +11:00
Luke Whiting d816845251
ES-125727 Fix for [CI] ReindexDataStreamTransportActionIT testAlreadyUpToDateDataStream failing (#126123) 2025-04-02 15:34:43 +01:00
Mary Gouseti 25050495b9
Data stream options convert to `javaRestTests` to `yamlRestTests`. (#126037)
In this PR we introduce the data stream API in the `es-rest-api` using
the feature flag feature. This enabled us to use the `yamlRestTests`
tests instead of the `javaRestTests`.
2025-04-03 01:32:54 +11:00
elasticsearchmachine c0cac957bc Mute org.elasticsearch.xpack.security.authz.RBACEngineTests testBuildUserPrivilegeResponseCombinesIndexPrivileges #126130 2025-04-03 01:29:13 +11:00
Albert Zaharovits e93460040d
Fix testMergeSourceWithFollowUpMergesRunSequentially (#126050)
Fixes #125639
Relates #120869
2025-04-02 17:13:46 +03:00
Niels Bauman eb4d64f94a
Run `TransportGetSettingsAction` on local node (#126051)
This action solely needs the cluster state, it can run on any node.
Additionally, it needs to be cancellable to avoid doing unnecessary work
after a client failure or timeout.

Relates #101805
2025-04-02 15:05:31 +01:00
Slobodan Adamović ea8fd3b77c
[Test] Skip testAuthorizeDataStreamFailureIndices for release tests (#126112)
Adding a missing feature flag for
`IndicesPermissionTests#testAuthorizeDataStreamFailureIndices` test.

Resolves #125555 Resolves #126040
2025-04-03 00:45:31 +11:00
elasticsearchmachine 6a83480cbc Mute org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT testSearchWithRandomDisconnects #122707 2025-04-03 00:26:12 +11:00
Luigi Dell'Aquila 5fcef40c26
ES|QL: fix generative tests (#126107)
Manage envs where source field mapping is not supported
2025-04-02 14:24:22 +01:00
Albert Zaharovits edc5379e6a
Fix ThreadPoolMergeSchedulerStressTestIT testMergingFallsBehindAndThenCatchesUp (#125956)
We don't know how many semaphore merge permits we need to release, or how many are already released.

Fixes #125744
2025-04-02 16:07:18 +03:00
Slobodan Adamović 7b753d0621
[Test] Fix failing RBACEngineTests (#126106)
Adjusting the test assertion to account for the potential 3rd extra
group (https://github.com/elastic/elasticsearch/pull/125900).

Resolves https://github.com/elastic/elasticsearch/issues/126061
2025-04-02 23:57:16 +11:00
elasticsearchmachine 04e25ad200 Mute org.elasticsearch.index.mapper.blockloader.KeywordFieldBlockLoaderTests testBlockLoader {preference=Params[syntheticSource=false, preference=DOC_VALUES]} #126121 2025-04-02 23:48:08 +11:00
elasticsearchmachine eeac1a7a34 Mute org.elasticsearch.search.sort.GeoDistanceIT testDistanceSortingWithUnmappedField #126118 2025-04-02 23:21:40 +11:00
Ievgen Degtiarenko f084daaeb5
Simplify makeFieldConfig (#126021) 2025-04-02 14:07:38 +02:00
Martijn van Groningen 52d68392d0
Prepare tsdb doc values format for merging optimizations. (#125933)
The change contains the following changes:

- The numDocsWithField field moved from SortedNumericEntry to NumericEntry. Making this statistic always available.
- Store jump table after values in ES87TSDBDocValuesConsumer#writeField(...). Currently it is stored before storing values. This will allow us later to iterate over the SortedNumericDocValues once. When merging, this is expensive as a merge sort on the fly is being executed.

This change will allow all the optimizations that are listed in #125403
2025-04-02 13:39:41 +02:00
Lorenzo Dematté 40dd91b800
[Entitlements] Replace Permissions with Entitlements in InstallPluginAction (#125207)
This PR replaces the parsing and formatting of SecurityManager policies with the parsing and formatting of Entitlements policy during plugin installation.

Relates to ES-10923
2025-04-02 11:03:27 +01:00
Albert Zaharovits 1f0551a995
Slack merge throttling params for fewer merge tasks (#126016)
The intent here is to aim for fewer to-do merges enqueued for execution,
and to unthrottle disk IO at a faster rate when the queue grows longer.
Overall this results in less merge disk throttling.

Relates https://github.com/elastic/elasticsearch-benchmarks/issues/2437 https://github.com/elastic/elasticsearch/pull/120869
2025-04-02 12:36:49 +03:00
Luigi Dell'Aquila cc54010c3c
ES|QL: enable generative tests (#126097) 2025-04-02 09:57:53 +01:00