Commit graph

221 commits

Author SHA1 Message Date
Mark Vieira
f236efc1d5
Convert remaining plugin projects to new test clusters framework (#125626) (#125726)
(cherry picked from commit 930b4ab995)

# Conflicts:
#	plugins/discovery-azure-classic/build.gradle
#	plugins/discovery-gce/qa/gce/build.gradle
2025-03-27 09:41:37 +11:00
Patrick Doyle
4f7947c917
Silence known entitlement warnings (#124883) (#125106) 2025-03-19 03:03:24 +11:00
Lorenzo Dematté
525aeb5e3d
Revert "missing file entitlement used by google-http-client for oauth2 (#123985)" (#124329) (#124431)
This reverts commit 404c9e6290.
2025-03-09 10:25:08 +11:00
Lorenzo Dematté
07ac78a07a
missing file entitlement used by google-http-client for oauth2 (#123985) (#124014) 2025-03-05 03:22:20 +11:00
Lorenzo Dematté
e9b772bc60
[8.18][Entitlements] Add URLConnection instrumentation (#123966)
* [Entitlements] Add URLConnection instrumentation (#123503)

* [Entitlements] Add URLConnection instrumentation for ftp, http and https protocols (#123802)
2025-03-04 20:30:02 +11:00
Lorenzo Dematté
d91427e5c1
[Entitlements] Add set_https_connection_properties entitlement and checks (#118577) (#119464) 2025-01-03 03:19:40 +11:00
Rene Groeschke
6b7cd0339e
Update Gradle wrapper to 8.12 (#118683) (#119363)
This updates the gradle wrapper to 8.12

We addressed deprecation warnings due to the update that includes:

- Fix change in TestOutputEvent api
- Fix deprecation in groovy syntax
- Use latest ospackage plugin containing our fix
- Remove project usages at execution time
- Fix deprecated project references in repository-old-versions

(cherry picked from commit ba61f8c7f7)
2024-12-31 08:36:31 +01:00
Rene Groeschke
617644f781
[8.x] [Gradle] Remove static use of BuildParams (#115122) (#117436)
* [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

(cherry picked from commit 13c8aaeffa)

# Conflicts:
#	TESTING.asciidoc
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/RestTestBasePlugin.java
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/compat/compat/AbstractYamlRestCompatTestPlugin.java
#	build.gradle
#	modules/ingest-geoip/qa/full-cluster-restart/build.gradle
#	qa/mixed-cluster/build.gradle
#	x-pack/plugin/ent-search/qa/full-cluster-restart/build.gradle
#	x-pack/plugin/eql/qa/rest/build.gradle
#	x-pack/plugin/fleet/qa/rest/build.gradle
#	x-pack/plugin/kql/build.gradle
#	x-pack/plugin/mapper-unsigned-long/build.gradle
#	x-pack/plugin/ml/qa/multi-cluster-tests-with-security/build.gradle
#	x-pack/plugin/security/qa/multi-cluster/build.gradle
#	x-pack/plugin/sql/qa/jdbc/build.gradle
#	x-pack/plugin/transform/qa/multi-cluster-tests-with-security/build.gradle

* fix merge issue

* Fix more merge conflicts

* Fix merge conflicts

* Update TESTING.asciidoc
2024-11-25 18:28:51 +01:00
Mark Vieira
0279c0a909
Add AGPLv3 as a supported license 2024-09-13 14:30:33 -07:00
David Turner
8f07d60c2c
Fix trappy timeouts in o.e.a.a.cluster.* (#112674)
Removes all usages of `TRAPPY_IMPLICIT_DEFAULT_MASTER_NODE_TIMEOUT` in
cluster-related APIs in `:server`.

Relates #107984
2024-09-10 08:17:09 +01:00
David Turner
6f1e5547a4
Remove String-based timeout support (#107747)
Today various APIs accept both a `TimeValue` and a `String` to specify
the same timeout, with the API implementation taking care of the
conversion from `String` to `TimeValue`. This was convenient for users
of the transport client, but these days it's not necessary. This commit
removes the unnecessary overloads and parsing code and migrates all
callers to creating a proper `TimeValue`.
2024-04-25 10:57:35 +01: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
Volodymyr Krasnikov
6e7bc27622
Update Guava dependency version to 32.0.1-jre (#97033)
* Update Guava dependency version

* Update gradle verification metadata

* fix :repository-gcs:thirdPartyAudit

* fix :discovery-gce:thirdPartyAudit

* Use single sha256 hash in allowed list
2023-06-27 09:14:10 -07:00
Simon Cooper
f554a6ab2d
Remove the DiscoveryNode constructor that takes a Version (#97136) 2023-06-27 16:41:45 +01:00
Armin Braun
dd7d381922
Dry up getting cluster admin client in tests (#96952)
Drying this up further and adding the same short-cut for single node
tests. Dealing with most of the spots that I could grab via automatic
refactorings.
2023-06-22 14:27:23 +02:00
Ryan Ernst
164e97e2ca
Encapsulate TransportVersion.CURRENT (#96681)
This commit changes access to the latest TransportVersion constant to
use a static method instead of a public static field. By encapsulating
the field we will be able to (in a followup) lazily determine what the
latest is, outside of clinit.
2023-06-13 18:44:15 -04:00
Armin Braun
af5c11702b
Use string list setting throughout codebase (#95901)
We can dry things up a little here and also making things a little faster
(in case we missed a corner case where a list setting is hot) with the optimized
string list setting constructor.
2023-05-09 11:22:28 +02:00
Simon Cooper
0d09580110
Add separate TransportVersion parameter to MockTransportService (#94105) 2023-02-27 09:24:22 +00:00
Joe Gallo
582f1be95e
Update log4j2 LICENSE and NOTICE files (#93611) 2023-02-09 08:53:43 -05:00
Jake Landis
93ecc4d7b3
Consolidate google-oauth-client to latest version (#91722)
related: #87800
fixes #90126
2023-02-01 12:01:52 -06:00
Mark Vieira
c2eda511de
Add JUnit rule based integration test cluster orchestration framework (#92379)
This commit adds a new test framework for configuring and orchestrating
test clusters for both Java and YAML REST testing. This will eventually
replace the existing "test-clusters" Gradle plugin and the build-time
cluster orchestration.
2022-12-21 15:33:46 -08:00
Ievgen Degtiarenko
cd820b6f6d
Replace needless map builder with Map.of(..) (#91310) 2022-11-07 09:39:12 +01:00
Simon Cooper
71455f87d5
Change plugins to use elasticsearch logging (#90227)
Change hdfs, gce, azure, ec2 plugins to use ES logging API
2022-09-29 10:59:31 +01:00
Rene Groeschke
3909b5eaf9
Add verification metadata for dependencies (#88814)
Removing the custom dependency checksum functionality in favor of Gradle build-in dependency verification support. 

- Use sha256 in favor of sha1 as sha1 is not considered safe these days.

Closes https://github.com/elastic/elasticsearch/issues/69736
2022-08-04 09:51:16 +02:00
Chris Hegarty
453f12c72d
Upgrade to Log4J 2.18.0 (#88237) 2022-07-04 11:30:38 +01:00
Przemyslaw Gomulka
705b27ae3b
Refactor ParameterizedMessage used in lambda and casted to Supplier (#87156)
This is a result of structural search/replace in intellij. This only affects log methods with a signature
logger.info((Supplier) ()-> ParametrizedMessage) logger.info((Supplier) ()-> ParametrizedMessage, Throwable)

relates #86549
2022-05-31 08:46:35 +02:00
Ryan Ernst
12b98b37b6
Remove remaining single arg ParameterizedMessages (#86715)
This commit removes the remaining ParameterizedMessages that take a
single argument, this time where the argument contains method calls.
This was again done almost entirely through find/replace with regex in
IntelliJ.

relates #86549
2022-05-12 10:09:11 +02:00
Ryan Ernst
af7525e1f0
Upgrade jackson to 2.13.2 (#86051)
Most of the Jackson uses, eg in x-content and azure, have already been
upgraded. This commit upgrades the rest of the uses. Note that it does
not yet upgrade the aws sdk, this should also be done on its own.
2022-04-22 07:21:17 -07:00
Ryan Ernst
b2c9028384
Move io utils to core package (#85954)
Most classes under elasticsearch-core had been moved to the o.e.core
package. However, a couple io related classes remained in an "internal"
package. This commit moves Streams and IOUtils to the core package, as
they are no more "internal" than the rest of the classes in core.
2022-04-19 21:26:28 -07:00
Artem Prigoda
b841b5f7d5
[discovery-gce] Fix initialisation of transport in FIPS mode (#85817)
Load the the keystore with Google certificates in the JKS format
instead of the default p12 which is not compatible with FIPS.
2022-04-13 10:57:37 +02:00
Artem Prigoda
dfb39f50d2
[discovery-gce] Upgrade all Google dependencies (#85132)
* [discovery-gce] Upgrade google-oauth-client to 1.33.1

* Update api_services_compute to v1-rev20220322-1.32.1

* Pinpoint google-api-client to 1.33.1

* Pinpoint correct third-part dependencies

* Upgrade google-oauth-client

* Update JSR-305 dependency
2022-04-11 09:46:49 +02:00
Ryan Ernst
070fcaa0ad
Move x-content implementation to a separate classloader (#83705)
This change isolates the Jackson implementation of x-content parsers and generators to a separate classloader. The code is loaded dynamically upon accessing any x-content functionality.

The x-content implementation is embedded inside the x-content jar, as a hidden set of resource files. These are loaded through a special classloader created to initialize the XContentProvider through service loader. One caveat to this approach is that IDEs will no longer trigger building the x-content implementation when it changes. However, running any test from the command line, or running a full Build in IntelliJ will trigger the directory to be built.

Co-authored-by: ChrisHegarty <christopher.hegarty@elastic.co>
2022-03-07 15:44:59 -08:00
Claudio Marins
2bcc03db27
[GCE Discovery] Correcly handle large zones with 500 or more instances (#83785)
Discovery gce plugin has some issues while running in large pools of vms instances.

This pr attempts to solve it.

Closes #83783
2022-02-15 19:08:19 +01:00
Mary Gouseti
4499050341
Use pattern matching for instanceof in plugins through qa, server/internalClusterTest (#82161) 2022-01-12 11:34:15 +01:00
Costin Leau
dddff27498
Upgrade to log4j 2.17.1 (#82111)
Upgrade to log4j 2.17.1
2021-12-28 23:33:07 +02:00
Chris Hegarty
1cc69f86fe
Upgrade to log4j 2.17.0 (#81902) 2021-12-18 17:40:36 +00:00
Artem Prigoda
442a13a46d
Upgrade log4j to 2.15.0 (#81709)
Originally we tried to a log4j update in #47298, but we were unable to
that due to the `DeprecationLoggerTests.testLogPermissions` test
failing. The test relied on mocking and got removed in
https://github.com/elastic/elasticsearch/pull/61474/files#diff-70de5a6ba5c637e7f19c51341417760d6e957beb5a1fa5703049095ea2719ee0L47

Now we should be able to the upgrade and then we can address the Security
Manager permission questions raised in #47298 separately.

* Initialize pattern layout with AccessController.doPrivileged

We need the `getClassLoader` permissions

* Disable the SecurityManager for command testing because of `CommandLoggingConfigurator` 
which fails under the `SecurityManager`
2021-12-15 14:31:30 +01:00
Mark Vieira
06d7e1682e
Bump source compatibility version to Java 17 (#80851) 2021-12-06 10:58:56 -08:00
Rory Hunter
add386dd00
Fix shadowed vars pt5 (#80855)
Part of #19752. Fix more instances where local variable names were shadowing field names.
2021-11-19 10:47:26 +00:00
Mark Vieira
12ad399c48 Reformat Elasticsearch source 2021-10-27 08:19:51 -07:00
Chris Hegarty
20c9f756d2
Fix split package org.elasticsearch.common.xcontent (#78831)
Fix the split package org.elasticsearch.common.xcontent, between server and the x-content lib. Move the x-content lib exported package from org.elasticsearch.common.xcontent to org.elasticsearch.xcontent ( following the naming convention of similar libraries ). Removing split packages is a prerequisite to modularization.
2021-10-08 17:14:26 +01:00
Tim Vernum
e73d16dc20
Update to OpenSAML v4.0 Library (#77012)
This commit switches the security and identity-provider plugins to use
v4.0.1 of the OpenSAML library (upgraded from v3.4).

In order to facilitate this upgrade the following changes are also
made:
- Common Codec is upgraded to 1.14 across all modules
- Guava is upgraded to v28.2 in the 2 affected modules

Relates: #71983
2021-09-22 18:15:34 +10:00
Rene Groeschke
35ec6f348c
Introduce simple public yaml-rest-test plugin (#76554)
This introduces a basic public yaml rest test plugin that is supposed to be used by external 
elasticsearch plugin authors. This is driven by #76215

- Rename yaml-rest-test to intern-yaml-rest-test
- Use public yaml plugin in example plugins

Co-authored-by: Mark Vieira <portugee@gmail.com>
2021-08-31 08:45:52 +02:00
Armin Braun
734f72714c
Remove Apache Http Client from GCE Discovery Plugin (#76291)
This was fixed for the repository plugin at some point as well.
We don't need the Apache http client here since we're using the
net http one.
=> One less dependency on our system wide http dependency to think about.
2021-08-10 16:30:20 +02:00
Jake Landis
4553bf03d5
Remove MavenFilteringHack (#73637) 2021-07-20 17:05:16 -04:00
Ryan Ernst
68817d7ca2
Rename o.e.common in libs/core to o.e.core (#73909)
When libs/core was created, several classes were moved from server's
o.e.common package, but they were not moved to a new package. Split
packages need to go away long term, so that Elasticsearch can even think
about modularization. This commit moves all the classes under o.e.common
in core to o.e.core.

relates #73784
2021-06-08 09:53:28 -07:00
Rene Groeschke
5bcd02cb4d
Restructure build tools java packages (#72030)
Related to #71593 we move all build logic that is for elasticsearch build only into
the org.elasticsearch.gradle.internal* packages

This makes it clearer if build logic is considered to be used by external projects
Ultimately we want to only expose TestCluster and PluginBuildPlugin logic
to third party plugin authors.

This is a very first step towards that direction.
2021-04-26 14:53:55 +02:00
Jason Tedor
32314493a2
Pass override settings when creating test cluster (#71203)
Today when creating an internal test cluster, we allow the test to
supply the node settings that are applied. The extension point to
provide these settings has a single integer parameter, indicating the
index (zero-based) of the node being constructed. This allows the test
to make some decisions about the settings to return, but it is too
simplistic. For example, imagine a test that wants to provide a setting,
but some values for that setting are not valid on non-data nodes. Since
the only information the test has about the node being constructed is
its index, it does not have sufficient information to determine if the
node being constructed is a non-data node or not, since this is done by
the test framework externally by overriding the final settings with
specific settings that dicate the roles of the node. This commit changes
the test framework so that the test has information about what settings
are going to be overriden by the test framework after the test provide
its test-specific settings. This allows the test to make informed
decisions about what values it can return to the test framework.
2021-04-02 10:20:36 -04:00
Mark Vieira
6339691fe3
Consolidate REST API specifications and publish under Apache 2.0 license (#70036) 2021-03-26 16:20:14 -07:00
Mark Vieira
a92a647b9f Update sources with new SSPL+Elastic-2.0 license headers
As per the new licensing change for Elasticsearch and Kibana this commit
moves existing Apache 2.0 licensed source code to the new dual license
SSPL+Elastic license 2.0. In addition, existing x-pack code now uses
the new version 2.0 of the Elastic license. Full changes include:

 - Updating LICENSE and NOTICE files throughout the code base, as well
   as those packaged in our published artifacts
 - Update IDE integration to now use the new license header on newly
   created source files
 - Remove references to the "OSS" distribution from our documentation
 - Update build time verification checks to no longer allow Apache 2.0
   license header in Elasticsearch source code
 - Replace all existing Apache 2.0 license headers for non-xpack code
   with updated header (vendored code with Apache 2.0 headers obviously
   remains the same).
 - Replace all Elastic license 1.0 headers with new 2.0 header in xpack.
2021-02-02 16:10:53 -08:00