Commit graph

3297 commits

Author SHA1 Message Date
Ryan Ernst
9a477f7816
Rename environment dir accessors (#121803) (#121834)
The node environment has many paths. The accessors for these currently
use a "file" suffix, but they are always directories. This commit
renames the accessors to make it clear these paths are directories.
2025-02-06 10:14:00 +11:00
Ryan Ernst
b3d679d2a3
Fix compilation of custom auth engine example (#121089) (#121697)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-05 12:08:10 +11:00
Rene Groeschke
2b16515166
Update Gradle wrapper to 8.12.1 (#120960) 2025-01-28 15:41:44 +01:00
Kostas Krikellas
8de9539e29
Lazy initialization for SyntheticSourceSupport.loader() (#120896)
* Lazy initialization for `SyntheticSourceSupport.loader()`

* [CI] Auto commit changes from spotless

* add missing

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-01-27 17:12:42 +02:00
Yang Wang
e720fa3ffa
[Test] Ensure sufficient secrets length for FIPS tests (#120581)
Resolves: #120576 Resolves: #120577 Resolves: #120578 Resolves: #120579
2025-01-22 23:16:55 +11:00
Moritz Mack
f1447fe821
[Entitlements] Instrument write access to System properties (#120357)
Instrument write access to System properties by means of the `WriteSystemPropertiesEntitlement`.
`System.setProperties(Properties)` is always denied.

Part of #ES-10359
2025-01-21 18:07:40 +01:00
David Turner
49f27e39ea
Migrate discovery-ec2 QA tests to javaRestTest (#119384)
No need for all this Gradle magic any more, we can just test the
discovery behaviour directly using Java REST tests.
2025-01-21 21:20:19 +11:00
Lorenzo Dematté
cd86b3b497
[Entitlements] Refactor Network Entitlement (#120391) 2025-01-20 18:29:32 +01:00
Lorenzo Dematté
a397fe9291
[Entitlements] Network access checks for NIO classes (#120138) 2025-01-17 11:54:27 +01:00
Lorenzo Dematté
1848d6bb93
[Entitlements] Network access checks on Sockets (#120093) 2025-01-15 22:01:56 +01:00
Simon Cooper
a2d84b1b90
Remove assumed features in server for 9.0 (#119946)
All features added before 8.18 can now be assumed and removed in 9.0
2025-01-15 08:37:04 +00:00
Niels Bauman
4605ecf44d
Remove trappy timeouts from GetMappingsRequest (#120035)
Relates #107984
2025-01-14 12:39:41 +10:00
Simon Cooper
75d1050781
Mark all features added before 8.18 as assumed (#119055)
Features added before 8.18 can be removed, starting with 9.0. But first they need to be marked as assumed, so existing code knows they could be removed in later builds.
2025-01-09 16:59:25 +00:00
Lorenzo Dematté
169cb44b3f
Add getSubject -> current method replacement patcher (#119779) 2025-01-09 09:03:20 +01:00
Svilen Mihaylov
93c349cc76
Add ability to set "max_analyzed_offset" implicitly to "index.highlight (#118895)
Add ability to set "max_analyzed_offet" implicitly to "index.highlight
.max_analyzed_offset", by setting it excplicitly to "-1".

Closes #112822
2025-01-07 11:19:07 -05:00
Lorenzo Dematté
5df57fda72
[Entitlements] Add set_https_connection_properties entitlement and checks (#118577) 2025-01-02 16:06:37 +01:00
Rene Groeschke
ba61f8c7f7
Update Gradle wrapper to 8.12 (#118683)
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
2024-12-30 15:34:24 +01:00
Rene Groeschke
dee3c6e44f
Fix hadoop client api patch configuration cache compatibility (#119324) 2024-12-30 19:52:20 +11:00
David Turner
fe64ae0e08
Fix DiscoveryEc2AvailabilityZoneAttributeNoImdsIT (#118821)
This test asserts that no AZ attribute is set, assuming that the current
AZ is unavailable, but in fact that's not true when running these tests
in EC2. With this commit we override the IMDS endpoint address to one
that definitely does not exist.

Relates #118675 Closes #118564
2024-12-27 20:26:38 +11:00
Armin Braun
e94f145350
Fix a bunch of non-final static fields (#119185)
Fixing almost all missing `final` spots, who knows maybe we get a small speedup from
some constant folding here and there.
2024-12-26 19:14:36 +01:00
Ryan Ernst
3dc85bec50
Patch Shell class in hdfs to not execute (#119189)
Shell utility in hdfs tries to execute a local script statically to
determine whether setsid is available. With the security manager this
doesn't work, but hdfs catches the SecurityException and assumes false.
With entitlements this doesn't work since hdfs does not know about our
NotEntitledException.

This commit reworks the patching of hdfs-client-api to use asm. It then
adds patching of hdfs' Shell class to replace the method that tries to
execute.
2024-12-23 20:59:31 +00:00
Mary Gouseti
b6345a3b81
[9.0] Remove unsupported value for the query param wait_for_active_shards in close API. (#118555)
Since 8.0, the default behavior for closing indices has been to wait for the active shards based on the index setting. The special value index-setting allows users to use this in 7.x as well. We'd like to make true our promise in the deprecation warning that this parameter should no longer be used, since it will become unsupported in 9.0.0.
2024-12-19 23:00:36 +02:00
Luca Cavanna
f760b40815
Broaden index versions tested to cover v7 versions for some analysis tests (#119024)
This replaces usages of MINIMUM_COMPATIBLE with MINIMUM_READONLY_COMPATIBLE as a
lower bound when randomizing the index version in some tests. This provides more
coverage as it relies on readonly versions as opposed to only those that can be
written to.
2024-12-19 09:54:41 +01:00
Mariusz Józala
950db57221
[test] Avoid running the NoImds test on AWS (#118675)
Disabled the NoImds test on AWS EC2 instance where it fails because the
AWS metadata are available, which is not expected by this test.
2024-12-13 11:27:24 -05:00
David Turner
59690f5e67
Add integ test for EC2 special network addresses (#118560)
Replaces the `Ec2NetworkTests` unit test suite with an integ test suite
to cover the resolution process end-to-end.
2024-12-13 07:30:57 +11:00
David Turner
a975927320
Add discovery-ec2 integration test for AZ attr (#118452)
Verifies that the plugin sets the `aws_availability_zone` automatically
by reading the AZ name from the IMDS at startup.
2024-12-12 10:57:57 +00:00
David Turner
5e467bfa04
Drop unused @ThirdParty tests (#118432)
We don't run any such tests in CI, and probably haven't even run them
manually for years. The only such test with this annotation is a trivial
smoke test for `discovery-ec2` that is equally well covered by the Java
REST test suite.
2024-12-12 00:44:36 +11:00
David Turner
b7d109c6a3
Migrate discovery-ec2 YAML tests to Java REST tests (#118427)
Really just to create a starting point for a more comprehensive Java
REST test suite, the test itself is not very interesting.
2024-12-11 11:47:31 +00:00
Benjamin Trent
d614804731
Remove analyzer version deprecation check (#118167)
Version has been deprecated since v7:
https://github.com/elastic/elasticsearch/pull/74073

Removing checking for the version setting. It has been ignored and does
nothing for the entirety of 8 and for the last minors of v7.
2024-12-10 07:30:14 +11:00
David Turner
0586cbfb34
Remove unused BlobStore#deleteBlobsIgnoringIfNotExists (#118245)
This method is never called against a general `BlobStore`, we only use
it in certain implementations for which a bulk delete at the `BlobStore`
level makes sense. This commit removes the unused interface method.
2024-12-09 15:46:22 +00:00
David Turner
64e0902f58
Pull AWS SDK versions to top level (#118247)
Today each relevant module defines the version of the AWS SDK that it
uses, which means there's a risk that we use different versions in
different modules. This commit pulls the version declarations to the top
level to make sure we keep everything in sync.
2024-12-09 23:11:55 +11:00
Rene Groeschke
3e7159d9e9
[Build] Fix cacheability of discovery-azure-classic (#117806)
Also update cache validation scripts
2024-12-02 07:33:27 +11:00
Rene Groeschke
d2b3dc51d1
[Build] Reapply updating to Gradle 8.11.1 (#117394)
This reverts commit b5c6d927c1.
* Simplify and fix dynamic project dependency handling
2024-11-24 15:13:15 +01:00
Oleksandr Kolomiiets
2b8e4e727c
Migrate mapper-related modules to internal-*-rest-test (#117298) 2024-11-23 00:35:24 +00:00
Jake Landis
f13c1ee867
bump hadoop hdfs to 3.4.1 (#117263)
This commit bump hadoop hdfs to 3.4.1 (for repository-hdfs) .
2024-11-22 15:57:36 -06:00
Rene Groeschke
b5c6d927c1 Revert "[Build] Update Gradle wrapper to 8.11.1 (#115886)"
This reverts commit 8f943a6a7c.

breaks serverless build. needs further investigation
2024-11-22 21:30:54 +01:00
Rene Groeschke
8f943a6a7c
[Build] Update Gradle wrapper to 8.11.1 (#115886)
replace deprecated gradle api

fix permission api usage in debian and rpm package creation
remove deprecated usage of #ProjectDependency..getDependencyProject()
improves gradle configuration cache reading in our weekly benchmark by almost 30%
2024-11-22 21:11:28 +01:00
Rene Groeschke
f6ac6e1c3b
[Build] Remove deprecated BuildParams (#116984) 2024-11-22 16:30:57 +01:00
Slobodan Adamović
6ea3e01958
Upgrade Bouncy Castle FIPS dependencies (#112989)
This PR updates `bc-fips` and `bctls-fips` dependencies to the latest
minor versions.
2024-11-22 21:39:25 +11:00
Rene Groeschke
8c20ac5884
[Build] Make test cluster plugin configuration cache compatible (#116890)
This adds infrastructure to make the legacy test cluster plugin and
the legacy test cluster based test plugins generally configuration cache compatible.
2024-11-21 08:00:05 +01:00
Rene Groeschke
def490ef85
[Gradle] Update shadow plugin (#116826)
- The shadow plugin has changed ownership and plugin id.
- Make some formatting of poms more reproducible
2024-11-15 19:07:46 +01: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
Armin Braun
adf73285d4
Add some utilties to run search queries in parallel in ITs (#115590)
We have loads of tests that assert the same thing about a number of
different queries. This introduces some tooling to run some of these
spots in parallel.
I only changed a couple of examples in the tests for now, but in general
this could be used to save thousands of lines of test code and more
importantly, get some coverage on parallel query execution which is
covered very little today.
2024-11-13 19:03:34 +01:00
Kostas Krikellas
4573ab8ec1
[TEST] Replace _source.mode with index.mapping.source.mode in integration tests - take 2 (#116072)
* Reapply "[TEST] Replace _source.mode with index.mapping.source.mode in integra…" (#116069)

This reverts commit e8bf344a28.

* [TEST] Replace _source.mode with index.mapping.source.mode in integration tests

* add reason

* add reason

* spotless

* revert unneeded
2024-11-04 09:39:34 +02:00
Kostas Krikellas
e8bf344a28
Revert "[TEST] Replace _source.mode with index.mapping.source.mode in integra…" (#116069)
This reverts commit a360757968.
2024-11-01 10:53:08 +02:00
Kostas Krikellas
a360757968
[TEST] Replace _source.mode with index.mapping.source.mode in integration tests (#115926)
* Replace _source.mode with index.mapping.source.mode in integration tests

* fix tests

* revert 40_source_mode_setting.yml
2024-11-01 09:46:06 +02:00
Mark Vieira
099a3dbb25
Fix example plugins tests (#115890) 2024-10-30 07:32:17 -07: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
Mark Vieira
cc0da6d309
Upgrade develocity plugin (#115139) 2024-10-18 14:10:11 -07:00
Oleksandr Kolomiiets
16bde51891
Remove IndexMode#isSyntheticSourceEnabled (#114963) 2024-10-18 13:48:12 -07:00