Commit graph

251 commits

Author SHA1 Message Date
James Baiera
7b89f4d4a6
Add ability to redirect ingestion failures on data streams to a failure store (#126973)
Removes the feature flags and guards that prevent the new failure store functionality 
from operating in production runtimes.
2025-04-18 16:33:03 -04:00
Martijn van Groningen
ae16016290
Update disable assertion jvm args from bwc/mixed cluster setups. (#125074)
Remove `-da:org.elasticsearch.index.mapper.DocumentMapper` and `-da:org.elasticsearch.index.mapper.MapperService` from mixed cluster/bwc cluster setups. Given that #122606 is now backported to the 8.18 branch.
2025-03-19 08:10:50 +01:00
Martijn van Groningen
ea8283e9c8
Avoid serializing empty _source fields in mappings. (#122606) 2025-03-06 12:20:07 +01:00
Joe Gallo
5c00341c2b
Handle 404s from the _cat/indices api in FullClusterRestartIT (#122537) 2025-02-13 21:14:04 -05:00
Mark Vieira
61dc93107f
Add lucene version compatibility tests (#121104)
This commit adds compatibility tests that target ES revisions that align with specific Lucene versions. In this case, we are intending to upgrade from Lucene 10.0 to 10.1. Since no on-prem Elasticsearch release exists with 10.0, we need another method to ensure compatibility with Lucene 10.0 indicies.

The work here is a bit hacky since all our compatibility testing infrastructure is centered around versions and we're now effectively doing compatibility tests between two different revisions of Elasticsearch that both report the same version. Ideally this specific testing would be replaced by unit tests, rather that reusing our full cluster restart tests for this purpose.

We'll also want to bump the commit referenced in the CI pipelines here to align with the last commit using Lucene 10.0.
2025-01-29 13:20:25 -08:00
Martijn van Groningen
952bf229fb
Conditionally enable logsdb by default (#121049)
Enable logsdb by default if logsdb.prior_logs_usage has not been set to true.

Meaning that if no data streams were created matching with the logs-- pattern in 8.x, then logsdb will be enabled by default for data streams matching with logs-*-* pattern.

Also removes LogsPatternUsageService as with version 9.0 and beyond, this component is no longer necessary.

Followup from #120708
Closes #106489
2025-01-29 15:03:28 +01:00
Simon Cooper
da42d7710b
Reinstate old TransportVersion BwC condition (#119669)
QueryBuilderBWCIT needs to read serialized data created by <8.8 nodes throughout 9.x releases
2025-01-10 11:39:18 +00:00
Joe Gallo
537f4ce871
Fix log message format bugs (#118354) 2024-12-10 15:01:53 -05:00
Nhat Nguyen
fe7818af04
Deprecate _source.mode in mappings (#117172)
Re-introduce #116689
2024-11-20 10:27:44 -08:00
Martijn van Groningen
ac06a84e0a
Revert "Deprecate _source.mode in mappings (#116689)" (#117150)
This reverts commit 0d7b90e22a, because of bwc testing failures.
2024-11-20 13:38:26 +01:00
Simon Cooper
9854fdc215
Add back gte version conditions on full restart tests (#117129)
Follow on from #116929. It is valid to do a full restart from any v8 cluster into a v9 cluster, so we need to maintain test conditions for those versions. Rather than historical versions, we can now use version features instead.
2024-11-20 12:10:45 +00:00
Nhat Nguyen
0d7b90e22a
Deprecate _source.mode in mappings (#116689)
This change deprecates _source.mode in mappings, replacing it with the 
index.mapping.source.mode index setting.
2024-11-19 17:53:52 -08:00
Simon Cooper
b17674b48a
Remove REST historical features (#116929) 2024-11-19 15:42:34 +00:00
Simon Cooper
cc35f1dc6a
Remove transport versions fixup listener and associated code (#116941) 2024-11-18 16:19:14 +00:00
Rene Groeschke
13c8aaeffa
[Gradle] Remove static use of BuildParams (#115122)
Static fields dont do well in Gradle with configuration cache enabled.

- Use buildParams extension in build scripts
- Keep BuildParams.ci for now for easy serverless migration
-  Tweak testing doc
2024-11-15 17:58:57 +01:00
Yang Wang
a7878a9e76
[Test] Move archived setting test into its own test class (#116460)
As title says, the archived setting needs to be moved out to not
interfere with other test methods in the same test class.

Resolves: #111798 Resolves: #111777 Resolves: #111774 Resolves: #111799
2024-11-16 01:18:54 +11:00
Simon Cooper
8cd4a2669e
Make snapshot restore release version check more lenient (#116727) 2024-11-14 10:48:17 +00:00
David Turner
f395f113e9
Increase minimum threshold in shard balancer (#115831)
Support for thresholds between 0.0 and 1.0 was deprecated in #92100.
This commit removes this support in 9.0.
2024-10-29 11:36:35 +00:00
Artem Prigoda
aa70c41aba
[test] Always assume that the old cluster support replication of closed indices (#114314)
Support for replicating closed indices was added in #39506 (7.1.0), we can expect the the cluster always supports replication of closed indices in 8.0/9.0
2024-10-23 09:30:48 +02:00
Luca Cavanna
8efd08b019
Upgrade to Lucene 10 (#114741)
The most relevant ES changes that upgrading to Lucene 10 requires are:

- use the appropriate IOContext
- Scorer / ScorerSupplier breaking changes
- Regex automaton are no longer determinized by default
- minimize moved to test classes
- introduce Elasticsearch900Codec
- adjust slicing code according to the added support for intra-segment concurrency
- disable intra-segment concurrency in tests
- adjust accessor methods for many Lucene classes that became a record
- adapt to breaking changes in the analysis area

Co-authored-by: Christoph Büscher <christophbuescher@posteo.de>
Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
Co-authored-by: ChrisHegarty <chegar999@gmail.com>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: Armin Braun <me@obrown.io>
Co-authored-by: Panagiotis Bailis <pmpailis@gmail.com>
Co-authored-by: Benjamin Trent <4357155+benwtrent@users.noreply.github.com>
2024-10-21 13:38:23 +02:00
Lorenzo Dematté
fcdfa5b18e
Remove some easy/straightforward instances of UpdateForV9 (#114134) 2024-10-04 17:07:35 +02:00
David Turner
1a92975d29
Remove obsolete tests in v9 (#113946) 2024-10-03 13:07:29 +01:00
David Turner
81bd8667cb
Define owners for UpdateForV9 annotations (#113926)
In order to better track the work needed to prepare this branch for the
major version upgrade, this commit adds a mandatory `owner` field to all
`UpdateForV9` (and `UpdateForV10`) annotations.
2024-10-02 11:37:14 +01:00
Armin Braun
99830f92ca
Move more test-only x-content parsing logic out of production codebase (#113774)
Just moving over a few more since they're not used in production code any longer.
2024-09-30 14:47:28 +02:00
Luca Cavanna
ae7cd5e008
Replace MappedFieldType#extractTerm with local query visitor (#113163)
The only usage of `MappedFieldType#extractTerm` comes from `SpanTermQueryBuilder`
which attempts to extract a single term from a generic Query obtained from calling
`MappedFieldType#termQuery`. We can move this logic directly within its only caller,
and instead of using instanceof checks, we can rely on the query visitor API.

This additionally allows us to remove one of the leftover usages of TermInSetQuery#getTermData
which is deprecated in Lucene
2024-09-20 09:55:36 +02:00
Luca Cavanna
bb78a28c4a
Remove index.mapper.dynamic setting (#113000)
This setting had been removed in the past, it was reintroudced for bw comp with 7.x with #109341. It can now be removed from main as it no longer supports indices created with 7.x
2024-09-18 10:10:44 +02:00
Mark Vieira
a59c182f9f
Add AGPLv3 as a supported license 2024-09-13 15:29:46 -07:00
Mark Vieira
4ce661cc48
Bump Elasticsearch version to 9.0.0 (#112570) 2024-09-11 09:40:11 -07:00
Armin Braun
bf7be8e23a
Save 400 LoC in tests by using indexSettings shortcut (#111573)
It's in the title, randomly saw a bunch of spots where we're
not using the shortcut, figured I'd clean this up quickly to save ~400 lines.
2024-08-05 10:21:13 +02:00
Oleksandr Kolomiiets
5e6c2e533c
Fix LogsIndexModeFullClusterRestartIT (#111362) 2024-07-29 12:34:32 -07:00
Salvatore Campagna
2fa5400e23
Test LogsDB backward compatibility (#110180)
Test LogsDB backward compatibility with a rolling upgrade and full cluster restart.
We try to start indexing logs using a `standard` index, then we switch to a `LogsDB` index.
We also improve the existing test which switches between the two index modes, `standard`
and `logs`.
2024-07-25 15:15:27 +02:00
Martijn van Groningen
696191d1c7
Fix testMapperDynamicIndexSetting() failures (#109574)
Currently these tests run against any old cluster older than 8.0.0, but
the fix that allowed `index.mapper.dynamic` to exist is only available
in 7.17.22.

Adjust these tests to only run if old cluster is after version 7.17.21
and before 8.0.0
2024-06-12 12:06:41 +10:00
Martijn van Groningen
09fc32090c
Re-define index.mapper.dynamic setting in 8.x (#109341)
Currently when upgrading a 7.x cluster to 8.x with
`index.mapper.dynamic` index setting defined the following happens:

- In case of a full cluster restart upgrade, then the index setting gets archived and after the upgrade the cluster is in a green health.
- In case of a rolling cluster restart upgrade, then shards of indices with the index setting fail to allocate as nodes start with 8.x version. The result is that the cluster has a red health and the index setting isn't archived. Closing and opening the index should archive the index setting and allocate the shards.

The change is about ensuring the same behavior happens when upgrading a
cluster from 7.x to 8.x with indices that have the
`index.mapper.dynamic` index setting defined.  By re-defining the
`index.mapper.dynamic `index setting with
`IndexSettingDeprecatedInV7AndRemovedInV8` property, the index is
allowed to exist in 7.x indices, but can't be defined in new indices
after the upgrade. This way we don't have to rely on index archiving and
upgrading via full cluster restart or rolling restart will yield the
same outcome.

Based on the test in #109301. Relates to #109160 and #96075
2024-06-11 18:17:48 +10:00
Simon Cooper
b6b20a5d6f
Update several references to IndexVersion.toString to use toReleaseVersion (#107828) 2024-04-25 10:37:02 +01:00
Moritz Mack
1f5e04b721
Migrate YAML REST tests to synthetic cluster feature check (#107068)
To simplify the migration away from version based skip checks in YAML specs, 
this PR adds a synthetic version feature `gte_vX.Y.Z` for any version at or before 8.14.0.

New test specs for 8.14 or later are expected to use respective new cluster features,
or a test-only feature supplied via ESRestTestCase#createAdditionalFeatureSpecifications
if sufficient.
2024-04-11 18:22:38 +02:00
Kostas Krikellas
755226df23
[TEST] Add full cluster restart test for downsampling (#107053)
This is a copy of the test added for rolling upgrade in #107036
2024-04-03 11:09:17 -04:00
Lorenzo Dematté
f437b7416a
Introduce oldClusterHasFeatures to full-cluster-restart (#104462)
Remove Version-based prerequisites in favour of feature-based prerequisites in ParameterizedFullClusterRestartTestCase and derived.

Follows #104279
2024-01-18 14:24:22 +01:00
Joe Gallo
af50962ec3
Fix CoreFullClusterRestartIT testRollover (#104373) 2024-01-16 10:54:17 -05:00
Mark Vieira
c6752e18f4
Fix failing test in release mode (#103883) 2024-01-03 15:27:32 -08:00
David Turner
60b833bb6d
Add utils for general XContent REST requests (#103711)
Tests that send REST requests with bodies must today build up a separate
`String` containing the body contents as JSON. This is kinda ugly, and
also means we do not cover the other supported body formats in these
tests. This commit introduces a utility to allow construction of REST
requests with `XContent` bodies directly, and generalizes things to
choose randomly between JSON and other supported body formats.
2024-01-02 13:39:21 +00:00
James Baiera
f4d791f8b4
Add failure store feature flag to bwc testing (#103341)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-12-12 15:01:11 -05:00
Lorenzo Dematté
93bd1abf2a
Addressing more Version usages in tests (#102803) 2023-12-12 16:44:24 +01:00
Lorenzo Dematté
bbe9f115cc
More version removal/mitigation (#102867) 2023-12-05 10:18:49 +01:00
Lorenzo Dematté
4e81494361
Introducing TestFeatureService to ESRestTestCase (#102243)
* Introducing TestFeatureService to ESRestTestCase

- Added RestTestLegacyFeatures to encompass legacy (historical) features that have been removed from production code but are still needed by REST tests
- Encapsulated Mark's getHistoricalFeatures method inside a FeatureProvider (ESRestTestCaseHistoricalFeatures)
- ESRestTestCaseHistoricalFeatures is not yet used, as we need to figure out how to deal with old cluster tests
2023-11-22 16:35:39 +01:00
Lorenzo Dematté
db53786601
Moved Version checks to IndexVersion to reflect production code (#102217)
Checks for soft delete support (and deprecation of non-soft delete), peer recovery retention leases and replication of closed indices are using IndexVersion in production code. Moving these checks from Version to IndexVersion in rest tests too.
2023-11-15 13:45:22 +01:00
Iraklis Psaroudakis
aa862640e5
Remove translog from bwc testRecovery (#101068)
When the test was trying to test recovering translog ops,
since we flush on close/shutdown, it failed because it never
recovered any translog ops.

The code for translog recovery is irrelevant due to that and
this PR proposes to remove it.

Alternatively, we could simulate killing nodes forcibly before
upgrading, but (a) that seems out of the ordinary for upgrades,
and (b) in trying that, it did not consistently pass the test
because sometimes the flush on close still happened.

Fixes #52031
2023-10-19 10:52:44 +03:00
William Brafford
04e478ae36
Hardcode version condition instead of calling minimumCompatibilityVersion() (#100102)
This is one of the few uses of Version#minimumCompatibilityVersion that isn't covered by other planned work. Since the minimum compatibility version for 7.14.0 is always going to be 6.8.0, we can just hardcode the value.
2023-10-02 09:59:07 -04:00
Simon Cooper
5f43cd8f46
Retry rolling upgrade junit tests (#99760)
Re-applies the changes from #99572 to move some bwc tests to a junit-based build infrastructure. Some tests that did not handle the move well have been kept in rolling-upgrade-legacy using the old gradle-based infrastructure
2023-09-22 15:52:59 +01:00
Simon Cooper
06f09d861d
Revert "Migrate rolling upgrade tests to new junit format" (#99750)
Reverts elastic/elasticsearch#99572 and #99733

The new tests are unstable, and don't work on CI. This re-opens
https://github.com/elastic/elasticsearch/issues/97200
2023-09-21 09:42:04 -04:00
Simon Cooper
1b8df61bd6
Limit test parallelism to 1 for junit bwc tests (#99733)
gradle runs test tasks in parallel, this results in multiple test clusters being created, which breaks CI.
2023-09-21 11:16:37 +01:00