Commit graph

105 commits

Author SHA1 Message Date
Mark Vieira
0b865d477e
Don't attempt to install modules into test cluster more than once (#121833) (#121863)
(cherry picked from commit 56cac1bfe9)
2025-02-06 11:56:51 +11:00
Mark Vieira
de8664c5e5
Use links when possible when installing test cluster modules (#121067) (#121081)
When we install modules into test clusters we do a full copy instead of
links. This both eats up more IO and disk space unnecessarily.
2025-01-29 07:43:55 +11:00
Mark Vieira
a47c4d20af
Allow overriding of module metadata files in integration tests (#120427) (#120430) 2025-01-18 15:28:38 +11:00
Mark Vieira
289a8239c4
Allow overriding of plugin metadata files in integration tests (#120245) (#120298) 2025-01-17 04:16:57 +11:00
Mark Vieira
0009de3575
Upgrade Bouncy Castle FIPS dependencies (#112989) (#119614)
This PR updates `bc-fips` and `bctls-fips` dependencies to the latest
minor versions.

(cherry picked from commit 6ea3e01958)

Co-authored-by: Slobodan Adamović <slobodanadamovic@users.noreply.github.com>
2025-01-07 08:03:17 +11:00
Martijn van Groningen
9348d9fcb8
Add feature flag for subobjects auto (#114616) (#114678) 2024-10-13 05:08:41 +11:00
Dan Rubinstein
760f70ffcc
Removing ChunkingSettingsFeatureFlag (#114634)
* Removing ChunkingSettingsFeatureFlag

* Removing chunking settings feature flag from tests and ModelRegistryIT
2024-10-11 14:36:02 -04:00
David Kyle
edd6326092
[ML] Remove scale to zero feature flag (#114323) (#114388)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-11 20:26:37 +11:00
Mike Pellegrini
5b8f9c12d2
[ML] Default inference endpoint for ELSER (#114164)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-08 06:58:10 +11:00
Simon Cooper
5ba445e4b2
Add jvm option to enable test features (#113108) (#113700)
The option is only enabled for test clusters, and turns on features that are only present in tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-30 19:29:26 +10:00
Jan Kuipers
2e271de3a1
backport: Adaptive allocations: scale to zero allocations (#113455) (#113664)
* Adaptive allocations: scale to zero allocations (#113455)

* Fix AdaptiveAllocationsScalerTests for release
2024-09-27 19:10:08 +10:00
Dan Rubinstein
e337ce6008
Adding ChunkingSettings logic and enabling ChunkingSettings for OpenAI embedding endpoints (#112074) (#113604)
* Adding ChunkingSettings logic and enabling ChunkingSettings for OpenAI embedding endpoints

* Cleaning up naming in ChunkingSettings logic

* Incrementing InferenceIndex version

* Removing DefaultChunkingSettings, cleaning up chunking settings class and related tests, add chunking strategy to inference index

* Adding check for up to date index mappings when creating an inference endpoint

* Fixing transport version conflict

* Adding validation for invalid chunking settings inputs and improving error messaging

* Reverting SystemIndexMappingUpdateService changes and adding error messaging on mixed cluster exception
2024-09-27 00:32:55 +10:00
Jan Kuipers
326e92005e
Remove adaptive allocations feature flag (#112798) (#113031) 2024-09-19 01:11:08 +10:00
Mark Vieira
0279c0a909
Add AGPLv3 as a supported license 2024-09-13 14:30:33 -07:00
David Turner
c48029641f
Wait for cluster to be more ready in REST test (#111606)
A freshly-started cluster processes a lot of setup tasks after it's
considered ready by the test-clusters framework. This commit makes it
also wait until the master queue is empty and there are no initializing
or relocating shards before it starts to run the test.

Closes #111395
2024-08-06 06:33:47 +10:00
Nikolaj Volgushev
4c782f7ca8
Tests for Azure Workload Identity support (#111414)
This PR builds on https://github.com/elastic/elasticsearch/pull/111344
to test support for Azure Workload Identity authentication. 

Relates: https://github.com/elastic/elasticsearch/issues/111346
2024-08-05 22:07:25 +10:00
Jan Kuipers
356af60b0a
Feature flag for adaptive allocations (#110639)
* Feature flag for adaptive allocations

* Update docs/changelog/110639.yaml

* Delete docs/changelog/110639.yaml
2024-07-10 09:42:09 +02:00
Carlos Delgado
7c2b852f65
Remove semantic_text feature flag (#110338) 2024-07-01 18:43:23 +02:00
Henning Andersen
da9282e3f5
Longer timeout for local node startup during CI (#109141)
Sometimes CI is slow enough that the 2 min timeout fails. Extending it.

Seen in CI failure from #109139
2024-05-29 16:23:22 +02:00
Carlos Delgado
e600d4186c
Add feature flag for semantic_text non-snapshot YAML tests (#108585) 2024-05-13 22:55:58 +02:00
Ryan Ernst
1bc64745f2
Add number of nodes accessor to test cluster handle (#108484)
Local test clusters have several methods allowing interaction with nodes
by ordinal number. However, there is currently no way to know how mnany
nodes were actually configured for the cluster. This commit adds an
accessor for the number of nodes the cluster handle knows about.
2024-05-09 16:30:21 -04:00
Rene Groeschke
b39b3731a7
Port krb5kdc to test container and rework hdfs handling (#106228)
This ports our krb5kdc test fixture to test container and reworks hdfs handling to also be based on test containers.
The yaml rest tests that are using hdfs required introducing variable substitution in yamlresttestparser handling.
2024-03-26 08:39:39 +01:00
Mark Vieira
2523ed90b9
Validate that test cluster BWC nodes use the default distribution (#106559)
We have instances where BWC tests configure old ES version nodes with
the integTest distribution. This isn't a valid configuration, and while
we in reality resolve the default distribution artifact, we have other
configuration logic that behaves differently based on whether the
integTest distro was _requested_. Specifically, what to set ES_JAVA_HOME
to. This bug resulted in us attempting to run old nodes using the
current bundled JDK version, which may be incompatible with that older
version of Elasticsearch.

Closes #104858
2024-03-20 12:04:52 -04:00
Johannes Fredén
2063fab989
Add user information to slowlog (#105621)
* Add user/auth information to slowlog
2024-03-11 10:16:13 +01:00
Mark Vieira
f753f6bfcf
Fix issue when installing multiple test cluster plugins (#105516) 2024-02-14 12:24:47 -08:00
Dmitry Cherniachenko
263ea5e987
Replace generic HashSet / HashMap with more efficient EnumSet / EnumMap (#105238) 2024-02-08 13:43:14 +00:00
Albert Zaharovits
f8ff5ecdc8
Grant SocketPermission in FIPS ITs to the FIPS JSSE implementation lib (#104465)
Grants the SocketPermission "*", "connect" permission to the
bouncy castle JSSE implementation lib, when running ITs under
FIPS-configured JVMs.
Note that the plugin's permissions e.g.
x-pack/plugin/ml-package-loader/src/main/plugin-metadata/plugin-security.policy
are still checked and enforced.
This new permission is required because the BC lib hooks into
the JVM when opening any TLS connection, under the stacktrace
of the plugin's AccessController.doPrivileged (so the lib's permissions
are checked first, before the doPrivileged call on the stack).

Relates #100923
Fixes #104414
2024-01-18 22:41:19 +02:00
Jake Landis
7311ab1785
Prefer new test cluster framework for new FIPS setting (#104287)
https://github.com/elastic/elasticsearch/pull/103483 introduced a new
setting for FIPS only.  Due to the way FIPS is configured with the elder
gradle test cluster framework this setting was getting applied to elder
clusters in BWC tests that did not have the settting causing test
failures. 

The new test framework has better semantics for version specific
configuration.  This commit updates applies the new setting via the new
framework with a  version specific condition. 

Adding this setting to the test clusters is a simple way to test the
setting (which will cause errors if the required providers are not found
in the cluster).  The pseudo test does not care which framework is used
for configuration.  Also, using the new framework allows to remove some
hacky configuration previously needed to handle some elder test cluster
configuration that used elder versions. 

Fixes: https://github.com/elastic/elasticsearch/issues/104234
2024-01-12 12:20:01 -05:00
Mark Vieira
142d4df606
Simplify handling of runtime java for tests clusters (#104232) 2024-01-10 14:37:38 -08:00
Aurélien FOUCRET
133008bfc5
[LTR] Enable by default on stateful only (#103333) 2023-12-14 13:45:41 +01:00
Nikolaj Volgushev
9d56e88ca4
Internal REST tests can update keystore file (#103133)
This PR adds the ability to update secure setting storage in internal
REST tests during test execution. This is useful when testing the
end-to-end flow of reloading secure settings via the [Nodes reload
secure settings
API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-reload-secure-settings.html).
Previously, re-applying secure settings was only possible with a full
test cluster restart.
2023-12-11 08:09:04 -05:00
Aurélien FOUCRET
be98a4697e
[LTR] Update the feature name from "learn to rank" to "learning to rank". (#102938) 2023-12-05 07:53:49 +01:00
Aurélien FOUCRET
bba08fc97c
Renaming inference rescorer feature flag to learn to rank. (#102883) 2023-12-04 15:31:02 +01:00
Rene Groeschke
c11315d0d7
repository-s3 yamlRestTests to new cluster test framework (#102353)
- Replace docker-compose based s3-fixture usages to use plain java
- Support lazy evaluated system properties for local cluster definitions
- Make it work with configuration cache enabled
- Port Minio fixture usage to leverage test container testing library.
2023-11-22 10:08:58 +01:00
Jake Landis
17a46a6e9f
upgrade bouncy castle jars (#100923)
This commit upgrades the Bouncy Castle jars. Bouncy Castle is used for 
some internal build concners as well as a comnand line application. 
Most notably Bouncy Castle is also used as the FIPs certified JCE/JSEE provider 
we use to test our ability to use a FIPs compliant crypto provider. 

The following changes here are a result of the upgraded Bouncy Castle jars:
* TLSv1.3 is now supported when running in FIPs mode 
* RSA PKCS#1 v1.5 is no longer allowed in FIPS mode
* Triple DES (3DES) is no longer allowed in FIPS mode
* Minor updates the security manager configuration used to test FIPs (to read permissions from the security provider)
* Minor adjustments to tests to accommodate the above changes. 
* Minor adjustments to the gradle build to accommodate new dependencies 

Note - update to the documentation will come in a later commit.
2023-11-21 11:14:41 -06:00
James Baiera
6fa7f60073
Add ability to create a data stream failure store (#99134)
Adds the ability to configure a data stream to create a new kind of backing index called a failure store which will eventually be used to store error information when ingest pipelines fail to ingest a document or when a document fails to be parsed correctly by the configured mapping on the data stream.
2023-11-15 15:32:51 -05:00
Mark Vieira
af47300567
Support "shared" test clusters (#101089)
This commit introduces the concept of shared tests clusters using the
new JUnit testing framework. Unlike normal test clusters which are
exclusive to each test suite (class), shared clusters persist across
test suites to be reused. This can be useful for test projects with a
large number of test suites that can all use a single cluster, and the
overhead of creating these clusters is the dominating factor.
2023-11-02 11:27:12 -07:00
William Brafford
8e6e0e59ea
Make some classes final to avoid suppressing "this-escape" warning (#101699)
* Avoid "this-escape" by making classes final

The "this-escape" compiler warning is intended to alert
developers to potential bugs in object initialization due to
subclassing. This class of bugs cannot occur when a class is
final. Here, we take cases where a class has no implementations
but generates a "this-escape" warning, and we make those
classes final rather than suppressing the compiler warning.
This makes the remaining suppressions more meaningful, since
they now indicate places where we may want to look for
initialization bugs.

In a few cases, making a class final meant changing some of its
protected fields and methods to private or default
accessibility.

Some classes with no implementations are mocked in testing.
Since making those classes final would involve non-trivial
rewrites of tests, I've left them alone.

* Spotless, remove redundant modifiers, clean up "protected" usage

* Revert a few more mocked classes
2023-11-02 08:34:02 -04:00
Armin Braun
b7eafce32c
Make some practically static methods static (#97565)
Another round of automated fixes to this, marking things that can be
made static as static. Saves some JIT cycles but also turns some lambdas
from capturing to non-capturing and makes the "utilityness" of some
classes visible.
2023-10-06 23:37:07 +02:00
Mark Vieira
350720e972
Fix system property value for inference rescorer tests feature flag (#100366)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-10-06 11:46:54 +02:00
Mark Vieira
8916c3dd9f
Support debugging integration tests with multiple test clusters (#100304)
Add support for passing `--debug-server-jvm` to tests that declare
multiple test clusters. This is common in tests for things like remote
cluster security, CCS, CCR, etc.

The convention for port numbers and debug settings is the same. The JVM
is expected to attach to an existing debugger in listen mode, starting
at port 5007 and incrementing from there.

Closes #94175
2023-10-04 18:54:41 -04:00
Mark Vieira
8f591b24e6
Convert core xpack rest tests to new test framework (#100301) 2023-10-04 15:06:27 -07: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
Mark Vieira
7be3d2c191
Increase flexibility of test cluster execution environments (#99437) 2023-09-13 11:18:40 -07:00
Tim Vernum
0a74a2fbaa
[test] Create subdir in config dir if required (#99218)
This commit updates the local cluster factory so that extra config files
(see `LocalSpecBuilder.configFile`) can be placed into subdirectories of
the config dir. This is needed when creating files for the
`FileSettingsService` - these k8s managed files are required to be in an
`"operator/"` directory within the general configuration directory.
2023-09-06 21:23:57 -04:00
Tim Vernum
0931d1e675
Add QA Rest Test for audit logging (#98923)
This adds an integration test for audit logging functionality
2023-08-28 21:47:02 -04:00
Mark Vieira
6258b1880d
Remove final modifier from Version class to allow for subclassing (#98748)
We need to be able to extend `Version` for certain bespoke testing
use-cases.
2023-08-22 13:43:00 -04:00
Andrei Dan
01ed7de99f
GA the data stream lifecycle (#98644)
This makes the data stream lifecycle generally available. This will allow
data streams to take advantage of a native simplified and resilient
lifecycle implementation.
2023-08-21 17:28:54 +01:00
Yang Wang
d0f64941f0
Remove RCS 2.0 feature flag for beta release (#98307)
This PR removes the RCS 2.0 feature flag so that it is ready for beta
release.
2023-08-14 08:33:37 +10:00
Mark Vieira
67a3573806
Simplify extending cluster handle implementations (#98363) 2023-08-10 13:00:59 -07:00