Commit Graph

2120 Commits

Author SHA1 Message Date
Lorenzo Dematté 77dac65761
Fix NodeInfo version parsing in bwc tests (#100838)
* Mixed cluster tests with string NodeInfo version

- Move version based feature comparison to a common, deprecated method (to be replaced with real features)
- Use string comparison against old cluster version to partition new/old cluster nodes
2023-10-25 12:59:10 +02:00
Lorenzo Dematté f878a8c308
Fix NodeInfo version parsing in integration tests (#100770)
* Compatible version parsing in YAML tests
* Compatible version parsing in various IT tests
2023-10-25 10:55:15 +02:00
Armin Braun 3945ee75d0
Use assertAcked more (#101201)
Just found that we have a lot of inconsistency and needless verbosity
here in tests. We can just use `assertAcked` in a couple spots
to save `.get`, `.actionGet` etc., especially with the signature
change I added here.
2023-10-23 19:48:10 +02: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
Rene Groeschke d8f1627e27
Remove vagrant support for OS packaging tests (#100987)
- This hasnt been maintained in a while and the vagrant gradle plugin also broke compatibiliy for gradle 
  --configuration-cache. Also this removes a lot maintenance burden.
- Rework DistroTestPlugin and simplify task dependencies
- Rename :qa:os to :qa:packaging
- Update testing doc recommending buildkite tools for debugging packaging tests
2023-10-19 12:10:58 +02: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
Armin Braun 588fed797b
Remove redundant ActionType classes (#101037)
Got asked why we have these classes again last night ... figured I'd
remove some of them to get us going here.

None of these classes are necessary, we can just inline all of these
away and make `ActionType` itself final or a record now that the action
type consists only in name and reader. See #97721 that made these things
redundant I think.
2023-10-18 06:14:12 -04:00
Lorenzo Dematté e5281bfb85
Exclude desired_nodes validation tests from mixed-cluster QA (#100682) 2023-10-13 15:30:37 +02:00
Kostas Krikellas ff6ef15fff
[TEST] Mute all tsdb tests in mixedClusterTests, for versions 8.7 - 8.10 (#100805)
* Don't print synthetic source in mapping for bwc tests

* Move comment.

* Don't print synthetic source in mapping for bwc tests #2

* Don't print synthetic source in mapping for bwc tests #2

* Revert "Don't print synthetic source in mapping for bwc tests #2"

This reverts commit 034262c5d2.

* Revert "Don't print synthetic source in mapping for bwc tests #2"

This reverts commit 44e815635e.

* Revert "Don't print synthetic source in mapping for bwc tests (#100572)"

This reverts commit 9322ab9b91.

* Exclude synthetic source test from mixedClusterTests

* Update comment.

* Mute all tsdb tests in mixedClusterTests

This is an interim step to stop sporadic test failures, while we try to
fix version skip for mixed cluster tests.

* Remove old exclusion

* Add aggregations too

* Mute tests for versions between 8.7-8.10

* Remove mute
2023-10-13 13:33:03 +03:00
Yang Wang 6ed4ad54bd
Record more detailed HTTP stats (#99852)
This PR adds more details HTTP stats breaking down by HTTP routes.

Resolves: #95739
2023-10-12 07:27:04 -04:00
Kostas Krikellas 24037d6ed6
Exclude synthetic source test for TSDB from mixedClusterTests (#100592)
* Don't print synthetic source in mapping for bwc tests

* Move comment.

* Don't print synthetic source in mapping for bwc tests #2

* Don't print synthetic source in mapping for bwc tests #2

* Revert "Don't print synthetic source in mapping for bwc tests #2"

This reverts commit 034262c5d2.

* Revert "Don't print synthetic source in mapping for bwc tests #2"

This reverts commit 44e815635e.

* Revert "Don't print synthetic source in mapping for bwc tests (#100572)"

This reverts commit 9322ab9b91.

* Exclude synthetic source test from mixedClusterTests

* Update comment.
2023-10-11 14:33:01 +03:00
David Turner 63b4ee128c
Increase timeout in MixedClusterClientYamlTestSuiteIT (#100585)
This suite now has a couple of thousand tests, some of which take a
couple of seconds, so it times out occasionally. Relaxing the timeout
further.
2023-10-10 22:12:35 +01:00
Keith Massey 438b246709
Excluding 8.10.3 from the RepositoryData BWC test (#100605)
This excludes 8.10.3 from the RepositoryData BWC test, related to
#100447.
2023-10-10 10:46:17 -04:00
David Turner ff08e0208d
Reinstate RepositoryData BwC (#100447)
This commit moves back to using a `"major.minor.patch"` string for the
version field in snapshots stored in `RepositoryData`, using the marker
string `"8.11.0"` to allow older versions to filter out newer snapshots
and adding a new `index_version` field alongside.

This format is fully backwardly-compatible, except that it trips an
assertion in the versions of 8.10.x released today. When running without
assertions enabled, things work correctly in all versions.

Relates #98454
2023-10-09 10:38:59 +01:00
David Turner 09d599fdac
Improve RepositoryData BwC (#100401)
- Reinstates the few working parts of MultiVersionRepositoryAccessIT
- Fixes the version bound for compatibility with v8.9.x
- Removes an assertion that blocks fixing BwC properly in 8.11.0

Relates #98454
2023-10-06 16:28:25 +01:00
Lorenzo Dematté 1e982453b4
Removed additional usages of Version.CURRENT in strings (#100076) 2023-10-04 16:54:47 +02:00
Mark Vieira 9f08c33cb0
Mute RecoveryIT 2023-10-03 14:07:37 -07: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
Alan Woodward f580501bc9
Remove StatusToXContent interface (#99824)
The StatusToXContent interface extends ToXContent with a REST status
method. It is used by RestStatusToXContentListener, which uses the extra
method to set the status of the RestResponse. However, given the
generics parametrization of RestToXContentListener, we can already get
the status of a response object without having these extra interfaces,
which mix serialization and status concerns.

This commit removes StatusToXContent and RestStatusToXContentListener,
instead adding some extra optional parameters to RestToXContentListener to
handle retrieving status and location information from the passed in Response
object.
2023-10-02 13:57:29 +01:00
Matteo Piergiovanni d9c15c526e
Add counters to _clusters response for all states (#99566)
To help the user know what the possible cluster states are and to 
provide an accurate accounting, we added counters summarising
`running`, `partial` and `failed` clusters to the `_clusters` section.
Changes:
- Now in the response is present the number of `running` clusters.
- We split up `partial` and `successful` (before was summed up in the 
`successful` counter).
- We now have a counter for `failed` clusters.
- Now `total` is always equal to `running` + `skipped` + `failed` + 
`partial` + `successful`.
2023-09-28 09:28:45 +02:00
Lorenzo Dematté a6b651a138
Replace Version.CURRENT toString usages with Build.current() equivalents (#99870)
* Replaced some occurrences of Version.CURRENT toString
* Added unit tests for the 2 different warn header patterns in HeaderWarnings
* Comment to clarify non-semantic versions + revert change on Version.major message
2023-09-27 09:42:35 +02:00
Tim Vernum d411acecbc
Suppress this-escape warning for JDK21 (#99848)
Adds @SuppressWarnings("this-escape") to all necessary places to that
Elasticsearch can compile with -Werror on JDK21

No investigation has been done to determine whether any of the cases
are a potential source of errors - we have simply suppressed all
existing occurrences.

Resolves: #99845
2023-09-25 18:30:21 +10: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
ning pan c3dece132d
Add a docs link to the log message about each failing bootstrap check (#99644)
Add a docs link to the log message about each failing bootstrap check to
help new users to understand failing bootstrap checks.

Closes #99614
2023-09-21 02:45:28 -04:00
Simon Cooper aae2535235
Migrate rolling upgrade tests to new junit format (#99572)
Two test suites did not react well to the junit-based bwc infrastructure, so those have been separated into a legacy module using the old gradle-based system until they can be looked at properly.
This unblocks the 8.11 release.
2023-09-20 16:55:34 +01:00
Przemyslaw Gomulka b6747b48ba
Rename tracing to telemetry package (#99710)
This commit renames the tracing to telemetry.tracing in both xpack/APM and elasticserach's org.elasticsearch.tracing.Tracer (the api)
the xpack/APM is renamed as follows:
org.elasticsearch.telemetry.apm - the only exported package
org.elasticsearch.telemetry.apm.settings - APMSettings
org.elasticsearch.telemetry.apm.tracing - APMTracer

org.elasticsearch.tracing.Tracer is moved to org.elasticsearch.telemetry.tracing.Tracer (responsible for majority of the changes in this PR)
2023-09-20 16:58:02 +02:00
Jake Landis 6c26ca0751
Minor clean up of guava dependencies (#99593)
This commit bumps up the version of jimfs and jimfs_gauva and guava
that is used for security and idp plugins.
2023-09-18 10:03:03 -05:00
Simon Cooper cafa545786
Read index version from the old deployed cluster instead of inferring it in full restart tests (#99524)
The index version is needed to check the output against an upgraded cluster. Now the junit tests share a JVM between the old & upgraded clusters, we can store the old index version in the class to be read when needed
2023-09-18 08:46:19 +01:00
Przemyslaw Gomulka fe7fe7dc04
Increase limit on stdout, stderr in docker tests (#99578)
json logs used in docker tests are consuming more space than the previous 100KB
setting the limit to 1MB
relates #99508
2023-09-14 16:30:44 +02:00
Mark Vieira 7be3d2c191
Increase flexibility of test cluster execution environments (#99437) 2023-09-13 11:18:40 -07:00
Martijn van Groningen a97915f0b0
Prepare aggregation yaml tests to be included in serverless build. (#99413)
* Remove setting the number of replicas in aggregation yaml tests.
* Stop waiting for yellow/green. The create index request by default return s when at least the primary shard has been assigned.
* Adjust assertions that are sensitive to the number of shard copies.
* Muted 4 aggregation yaml tests in mixed cluster qa ([link](https://github.com/elastic/elasticsearch/pull/99413/files#diff-033fa895a9866248015cbe7871deab0b3c88fa66a5e1bc9e789079d0d1a39f24R31)). These tests assert cache hits and with replicas we currently can't reliable assert this in a multi node test cluster. Like the mentioned comment suggest if the node selector can reliable select the same node, then we can unmute. I think muting is ok for now. These yaml tests are run in aggregation module and will soon be run in serverless. I think enforcing that many yaml tests run tests against indices with no replicas is worse for test coverage than muting 4 yaml tests in this qa module. Additionally I think that testing that the request cache work should not be tested in full blown integration tests, but more targeted unit/semi integration tests.
2023-09-13 11:45:26 -04:00
Przemyslaw Gomulka aff49dc69a
Mute DockerTests.test600Interrupt (#99509)
relates #99508
2023-09-13 10:38:59 +02:00
Dianna Hohensee f69c5b1460
Call TransportService#registerRequestHandler with Executor (#99385)
Remove temporary TransportService#registerRequestHandler functions
that take String instead of Executor and update the callers. This
is part of a larger change to pass Executor into request handlers,
rather than creating and stashing Strings that are only used to
eventually fetch appropriate Executors anyway.

Extensive testing changes were required to make TransportService and
ThreadPool mocks capable of looking up Executors from Strings for
TransportAction constructors. Added a new MockUtils class to
modularize the additional test setup.

Part of the changes for #97879
2023-09-08 17:12:40 -04:00
Dianna Hohensee 7433b5122c Revert "Call TransportService#registerRequestHandler with Executor (#98998)"
This reverts commit df38bc8a84.
2023-09-08 13:40:21 -04:00
Dianna Hohensee df38bc8a84
Call TransportService#registerRequestHandler with Executor (#98998)
Remove temporary TransportService#registerRequestHandler functions
that take String instead of Executor and update the callers. This
is part of a larger change to pass Executor into request handlers,
rather than creating and stashing Strings that are only used to
eventually fetch appropriate Executors anyway.

Extensive testing changes were required to make TransportService and
ThreadPool mocks capable of looking up Executors from Strings for
TransportAction constructors. Added a new MockUtils class to
modularize the additional test setup.

Part of the changes for #97879
2023-09-08 13:21:53 -04:00
Martijn van Groningen 0eb2181bb1
Don't ignore empty index template that have no template definition. (#98840)
A composable index template with no template defined in the body is mistakingly always assumed to not be a time series template. Even if it refers to a component template that has the index.mode setting set to time_series and the component template defines mappings with dimension fields or routing paths.

Closes #98834
2023-09-06 07:47:01 +02:00
Brian Seeders 0ec47aa4f7
Set explicit file permissions in NoticeTask (#99206) 2023-09-05 18:16:56 -04:00
Alan Woodward 2a30a9676d
Mute all tests in CertGenCliTests (#99192)
See #99153
2023-09-05 09:11:37 +01:00
Ed Savage 31e6499895
Mute failing test mute_CertGenCliTests/test10Install (#99171)
See https://github.com/elastic/elasticsearch/issues/99153
2023-09-04 09:57:19 -04:00
Michael Peterson 649821e992
Support cluster/details for CCS minimize_roundtrips=false (#98457)
This commit tracks progress for each shard search by cluster alias
using a new SearchProgressListener (CCSSingleCoordinatorSearchProgressListener).
Both sync and async CCS searches use this new progress listener when
minimize_roundtrips=false.

Two of the SearchProgressListener method had to be extended to allow tracking
per-cluster took values (TransportSearchAction.SearchTimeProvider) and
whether searches timed out (by passing in QuerySearchResult to the onQueryResult
listener method).

This commit brings parity between minimize_roundtrips=true and false to have
the same _cluster/details sections in CCS search responses.

Note that there are still a few differences between minimize_roundtrips=true and false.
1. The per-cluster took value for minimize_roundtrips=true is accurate, but the
   for 'false' it is only measured at the granualarity of each partial reduce,
   so the per cluster took time is overestimated in basically all cases.
2. For minimize_roundtrips=true, a skip_unavailable=false cluster that disconnects
   during the search or has all searches on all shards fail, will cause the entire
   search to fail. This is (still) not true for minimize_roundtrips=false. The search
   is only failed if the skip_unavailable=false cluster cannot be connected to at the
   start of the search. (This will likely be changed in a follow up ticket that implements
   fail-fast logic for in-progress searches that should fail due to a skip_unavailable=true
   cluster failing.)
3. The shard accounting for minimize_roundtrips=false is always accurate (total shard counts
   are known at the start of the search). For minimize_roundtrips=true, the shard accounting
   is only accurate per cluster unless all clusters have successful (or partially successful)
   searches. For clusters that have failures we do not have shard count info.
2023-08-31 12:56:20 -04:00
Simon Cooper bebe2538b1
Bump to first non-release IndexVersion (#98478)
This bumps to an IndexVersion that is not associated with any specific release version. From this point, index metadata/data versioning will be handled in the same way as TransportVersion - a new constant for every change
2023-08-31 15:10:40 +01:00
David Turner a20ee3f8f2
Migrate simple usages of ThreadPool#schedule (#99051)
In #99027 we deprecated the string-based version of
`ThreadPool#schedule`. This commit migrates all the simple usages of
this API to the new version.
2023-08-31 07:37:31 +01:00
Simon Cooper a399fa877c
Update test version check to also include 8.10 patch releases (#99004) 2023-08-30 09:51:55 +01:00
Benjamin Trent 4b5585e428
Fix tests after indexing dense vectors by default (#98946)
By default in 8.11, vectors will be indexed by default. However, various
tests that relied on the previous behavior were not updated.

This PR updates those tests.

Related: https://github.com/elastic/elasticsearch/pull/98268
2023-08-29 11:06:02 -04:00
Armin Braun 4d29cb20b8
Add shortcuts for getting snapshot customs from cluster state (#98906)
Drying up the logic for looking up the customs and falling back to the empty default. Hopefully, this improves readability somewhat by taking away that complexity and some null checks.
I like it at least, saves a lot of clutter.

Re-revert of #98896, only fixing a single null check in tests.
2023-08-26 07:27:57 +02:00
Mark Vieira f756b046e5
Revert "Add shortcuts for getting snapshot customs from cluster state (#98331)" (#98896)
Reverts #98331.

cc @original-brownbear
2023-08-25 16:27:44 -04:00
Armin Braun 9a3f24fe2f
Add shortcuts for getting snapshot customs from cluster state (#98331)
Drying up this logic a little to hopefully improve readability somewhat.
2023-08-25 17:10:45 +02:00
Simon Cooper b67a9e1ec3
Move text references to index created version to IndexVersion (#98727) 2023-08-23 10:51:56 +01:00