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.
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
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
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.
This makes the data stream lifecycle generally available. This will allow
data streams to take advantage of a native simplified and resilient
lifecycle implementation.
This adds a new parameter to LocalClusterSpecBuilder.user(..) to
indicate whether the user should be an operator or not.
Users added with the simplified user(username, password) method are
operators (and have the "_es_test_root" role).
For RCS 2.0, we added a RemoteClusterNodesAction (#93893) for collecting
remote cluster server nodes. This action is used in two places: 1.
Collecting nodes that can be directly connected in sniff mode 2. In the
method RemoteClusterService#collectNodes
However, in the 2nd use case, we should collect all ndoes from the
remote cluster instead of just those nodes that have remote cluster
server enabled. This is because the method is used in the context of
search instead of building connection. A remote node can be *not*
directly accessible but still hosts searchable data. Search requests
should be sent to all the data nodes and *not* limited to just the
server nodes.
This PR fixes this issue by augmenting RemoteClusterNodesAction to
support retrieving either server nodes or all nodes. The caller can
decide which set of nodes are of interest depending on the context.
Fix for #97334 where incorrect feature name was provided.
Correct more instances of synonyms_feature_flag_enabled for synonyms_api_feature_flag_enabled
Closes#96641, #97177
Sometimes it is necessary for an integ test to poke at the Java process
of Elasticsearch. This commit makes a node's pid available through
ClusterHandle.
Somet special tests like die-with-dignity need to pass additional jvm
arguments (exit on OOM). This commit adds a new jvmArg to the cluster
spec for the new test clusters infra.
This PRs adds migration tests for transform and CCR jobs from using RCS
1.0 to 2.0 then back to 1.0 again. It is not intended to cover all
possible scenarios, but rather a proof to show migration is possible in
at least some cases.
Note the migration strategy here is to update remote cluster settings in
place, i.e. reuse the same cluster alias and change its definition.
Restart is required because a node needs to the cross-cluster API key
form the keystore.
Using gradle toolchain support in gradle requires refactoring how the composite build is composed.
We added three toolchain resolver
1. Resolver for resolving defined bundled version from oracle as openjdk
2. Resolve all available jdks from Adoption
3. Resolve archived Oracle jdk distributions.
We should be able to remove the JdkDownloadPlugin altogether without having that in place, but we'll do that in a separate effort.
Fixes#95094
Fixes#82794. Upgrade the spotless plugin, which addresses the issue
around formatting `instanceof` expressions. Formatting of statements
including lambdas seems to have improved too.
This fixes yaml tests when -Dbuild.snapshot is false.
The data lifecycle functionality is not enabled unless the feature flag
is configured.
This makes the yaml tests enable the feature flag for non-snapshot builds
(it's always enabled for snapshot builds)
This adds a `keystore` method to `LocalSpecBuilder` to provide secure
keystore settings via a `Supplier<String>` to allow for lazy-evaluated
settings, such as a secure setting that resolves to the address of
dependent cluster.
This PR migrates the new RCS REST test to use the new plugin. The inline
clusters make it possible to add more test classes within the same
package (will be added as follow-ups).