Commit Graph

321 Commits

Author SHA1 Message Date
Richard Dennehy 63da93d4c3
Delegated authorization using Microsoft Graph (SDK) (#128396)
* Delegated authorization using Microsoft Graph (SDK)
---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Johannes Freden Jansson <johannes.freden@elastic.co>
Co-authored-by: Johannes Fredén <109296772+jfreden@users.noreply.github.com>
2025-06-12 11:03:32 +02:00
Benjamin Trent 155c0da00a
Vector test tools (#128934)
This adds some testing tools for verifying vector recall and latency
directly without having to spin up an entire ES node and running a rally
track.

Its pretty barebones and takes inspiration from lucene-util, but I
wanted access to our own formats and tooling to make our lives easier.

Here is an example config file. This will build the initial index, run
queries at num_candidates: 50, then again at num_candidates 100 (without
reindexing, and re-using the cached nearest neighbors).

```
[{
  "doc_vectors" : "path",
  "query_vectors" : "path",
  "num_docs" : 10000,
  "num_queries" : 10,
  "index_type" : "hnsw",
  "num_candidates" : 50,
  "k" : 10,
  "hnsw_m" : 16,
  "hnsw_ef_construction" : 200,
  "index_threads" : 4,
  "reindex" : true,
  "force_merge" : false,
  "vector_space" : "maximum_inner_product",
  "dimensions" : 768
},
{
"doc_vectors" : "path",
"query_vectors" : "path",
"num_docs" : 10000,
"num_queries" : 10,
"index_type" : "hnsw",
"num_candidates" : 100,
"k" : 10,
"hnsw_m" : 16,
"hnsw_ef_construction" : 200,
"vector_space" : "maximum_inner_product",
"dimensions" : 768
}
]
```

To execute:

```
./gradlew :qa:vector:checkVec --args="/Path/to/knn_tester_config.json"
```

Calling `./gradlew :qa:vector:checkVecHelp` gives some guidance on how
to use it, additionally providing a way to run it via java directly
(useful to bypass gradlew guff).
2025-06-07 02:07:32 +10:00
Rene Groeschke 9b1815c84a
[Build] Update Develocity Plugin to 4.0.1 (#128053)
After updating Develocity to 2015.1.3 we can also update the according plugin
2025-05-13 21:37:44 -07:00
Rene Groeschke aa309515f8
Rename docker fips image to cloud-ess-fips (#127561) 2025-04-30 15:56:24 +02:00
Brian Seeders 3d78c9428c
[bwc] Add bugfix3 project (#126880) 2025-04-16 16:27:03 -04:00
Rene Groeschke 611f5cba4f
[BUILD] Support AARCH64 for docker fips images (#125927)
This updates the docker fips base image which support arm and x84
architectures
2025-03-31 22:41:04 +11:00
Rene Groeschke 653c179b08
[Build] Add FIPS docker image for GovCloud (#117152)
- Adds docker image based on chainguard base fips image
- x86 only for now as the base image is x86 only
- the image does not provide any elasticsearch.yml configuration. for testing purposes you can follow the elasticsearch fips guide available at https://github.com/elastic/FIPSGuide/tree/main/elasticsearch

The image is shipped with:
- org.bouncycastle:bc-fips:1.0.2.5 and org.bouncycastle:bctls-fips:1.0.19 in Elasticsearch libs folder
- config/jvm.options.d/fips.options for fips specific JVM options
- fips_java.security file
- fips_java.policy

Out of scope:
- Add packaging test coverage (part of later PR as we want to provide that image for testing early and packaging tests require more general restructuring for support fips scenarios)
2025-03-26 16:15:15 +01:00
Rene Groeschke 6f7a206a8a
Update Gradle Enterprise Plugin (Develocity) to 3.19.2 (#125137)
with develocity updated to 2024.3.4 we are unblocked on updating the gradle enterprise plugin
2025-03-19 19:19:54 +01:00
Mark Vieira 6c405093d7
Update BWC versions to support multiple staged releases 2025-01-30 08:22:54 -08:00
Mark Vieira 61dc93107f
Add lucene version compatibility tests (#121104)
This commit adds compatibility tests that target ES revisions that align with specific Lucene versions. In this case, we are intending to upgrade from Lucene 10.0 to 10.1. Since no on-prem Elasticsearch release exists with 10.0, we need another method to ensure compatibility with Lucene 10.0 indicies.

The work here is a bit hacky since all our compatibility testing infrastructure is centered around versions and we're now effectively doing compatibility tests between two different revisions of Elasticsearch that both report the same version. Ideally this specific testing would be replaced by unit tests, rather that reusing our full cluster restart tests for this purpose.

We'll also want to bump the commit referenced in the CI pipelines here to align with the last commit using Lucene 10.0.
2025-01-29 13:20:25 -08: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
Rene Groeschke 80f147c9b9
[Gradle] Enable stable configuration cache preview (#119382)
The STABLE_CONFIGURATION_CACHE feature flag enables the following:

- tasks using a shared build service without declaring the requirement via the Task.usesService method will emit a deprecation warning.
- when the configuration cache is not enabled but the feature flag is present, deprecations for the following configuration cache requirements are also enabled:
    - Registering build listeners
    - Using task extensions and conventions at execution time
2024-12-31 16:30:57 +01:00
David Turner a4d4762802
Introduce `aws-fixture-utils` (#119319)
Extracts some common utils for creating AWS service test fixtures out of
the `s3-fixture` module and into a separate library independent of S3.
2024-12-27 18:58:07 +00:00
Mark Vieira 7070e95fa7
Update BWC version logic to support multiple bugfix versions (#117943) 2024-12-05 09:43:18 -08:00
David Turner b13e0d25c0
Support dynamic credentials in `S3HttpFixture` (#117458)
Rephrase the authorization check in `S3HttpFixture` in terms of a
predicate provided by the caller so that there's no need for a separate
subclass that handles session tokens, and so that it can support
auto-generated credentials more naturally.

Also adapts `Ec2ImdsHttpFixture` to dynamically generate credentials
this way.

Also extracts the STS fixture in `S3HttpFixtureWithSTS` into a separate
service, similarly to #117324, and adapts this new fixture to
dynamically generate credentials too.

Relates ES-9984
2024-11-26 09:06:02 +00:00
David Turner b0c49766f6
Extract IMDS test fixture from S3 fixture (#117324)
The S3 and IMDS services are separate things in practice, we shouldn't
be conflating them as we do today. This commit introduces a new
independent test fixture just for the IMDS endpoint and migrates the
relevant tests to use it.

Relates ES-9984
2024-11-25 08:01:21 +00:00
Mariusz Józala bd18787af5
Change default container image to be based on UBI minimal instead of Ubuntu (#116739)
Previously default Docker image was based on Ubuntu. This changes the
base image for default to be UBI minimal.
2024-11-22 14:55:25 +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
Ryan Ernst 30090b6b60
Move entitlement jars to libs (#115883)
The distribution tools are meant to be CLIs. This commit moves the
entitlements jar projects to the libs dir, under a single
libs/entitlement root directory to keep the related jars together.
2024-10-30 21:26:13 +01:00
Ryan Ernst e5d5c17c99
Use directory name as project name for libs (#115720)
The libs projects are configured to all begin with `elasticsearch-`.
While this is desireable for the artifacts to contain this consistent
prefix, it means the project names don't match up with their
directories. Additionally, it creates complexities for subproject naming
that must be manually adjusted.

This commit adjusts the project names for those under libs to be their
directory names. The resulting artifacts for these libs are kept the
same, all beginning with `elasticsearch-`.
2024-10-29 13:02:28 -07:00
Rene Groeschke 482d2aced5
Remove unused elasticsearch cloud docker image (#115357) 2024-10-25 02:58:36 +11:00
Mark Vieira cc0da6d309
Upgrade develocity plugin (#115139) 2024-10-18 14:10:11 -07:00
Rene Groeschke f1f5ee06a3
Replace cloud-ess docker image with wolfi-ess (#114413)
* Replace cloud-ess docker image with wolfi-ess
   We just replaced the existing implementation of cloud-ess with what was wolfi-ess which is a wolfi based ess image. 
   The cloud image itself will be removed in a future commit it was not used anywhere

* Switch to test cloud docker image instead of default docker in packaging pr tests. 
  This adds way more coverage than the default docker image which is also barely touched
2024-10-11 21:58:15 +02:00
Patrick Doyle 3953331ac5
Entitlements for System.exit (#114015)
* Entitlements for System.exit

* Respond to Simon's comments

* Rename trampoline -> bridge

* Require exactly one bridge jar

* Use Type helpers to generate descriptor strings

* Various cleanup from PR comments

* Remove null "receiver" for static methods

* Use List<Type> instead of voidDescriptor

* Clarifying comment

* Whoops, getMethod

* SuppressForbidden System.exit

* Spotless

* Use embedded provider plugin to keep ASM off classpath

* Oops... forgot the punchline

* Move ASM license to impl

* Use ProviderLocator and simplify bridgeJar logic

* Avoid eager resolution of configurations during task configuration

* Remove compile-time dependency agent->bridge

---------

Co-authored-by: Mark Vieira <portugee@gmail.com>
2024-10-09 09:01:27 -04:00
Rene Groeschke 54c83d7fa7
Add wolfi ess docker image (#113810) 2024-10-04 11:01:49 +02:00
Patrick Doyle 67e32e5c82
Initial trivial hello-world entitlements agent (#113112)
* Initial hello-world entitlements agent

* Respond to Ryan's comments

* License header

* Fix forbidden APIs setup

* Rename EntitlementAgent

* Automated refactor missed one

* Automated rename really let me down here

* Very serious test name

* README files for the new modules

* Use "tasks.named('jar')"

Co-authored-by: Rene Groeschke <rene@breskeby.com>

* Use 'tasks.named('test')'

Co-authored-by: Rene Groeschke <rene@breskeby.com>

* More deferral of gradle tasks

Co-authored-by: Rene Groeschke <rene@breskeby.com>

* Even more deferral

Co-authored-by: Rene Groeschke <rene@breskeby.com>

* FIx gradle syntax for javaagent arg

---------

Co-authored-by: Rene Groeschke <rene@breskeby.com>
2024-09-20 13:12:27 -04:00
Rene Groeschke 4dee614707
Add chainguard docker image (#112103) 2024-09-06 10:32:42 -07:00
Rene Groeschke 02439e321d
Update Gradle gradleEnterprise plugin (develocity now) (#109443)
* Update Gradle gradleEnterprise plugin (develocity now)
* Fix imports in build scan script
* Fix build scan api usage
* Dependency cleanup and API fix
* Fix API update for BuildResult in Build scans
* Fix buildkite buildscan annotations based on gradle failures
2024-06-10 14:26:43 +02:00
Ryan Ernst 21ffdac4a7
Patch ImmutableCollections for tests (#109271)
ImmutableCollections uses a seed, set early during JVM startup, which
affects the iteration order of collections. Although we do not want to
rely on the iteration order of Map and Set collections, bugs do
sometimes occur. In order to reproduce those bugs to fix them, it is
important the test seed for Elasticsearch matches the seed used in
ImmutableCollections.

Unfortunately ImmutableCollections is internal to the JDK, and the seed
used is private and final. This commit works around these limitations by
creating a patched version of ImmutableCollections which allows access
to the seed member. ESTestCase is then able to reflectively set the seed
at runtime based on the Elasticsearch seed.

Note that this only affects tests. ImmutableCollections remains is
unchanged for production code.

relates #94946
2024-06-05 11:13:55 -07:00
Rene Groeschke 8ac3e3dd90
Update Gradle wrapper to 8.8 (#108021)
Fix incompatibility with 8.8 and our internal api usages

- Update ospackage to a version that contains a fix we provided
- Tweak build logic to avoid deprecation warnings
- Use newer permission api
- Use custom shadowplugin
- Rework ElasticsearchDistribution dependencies resolution
- Update Gradle wrapper to 8.8
2024-06-04 12:43:02 +02: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
Ryan Ernst 405b88b882
Add zstd to native access (#105715)
This commit makes zstd compression available to Elasticsearch. The
library is pulled in through maven in jar files for each platform, then
bundled in a new platform directory under lib. Access to the zstd
compression/decompression is through NativeAccess.
2024-03-13 09:45:12 -07:00
Rene Groeschke 0a7c88cfd6
Update Gradle Enterprise plugin to 3.16.2 (#105871) 2024-03-01 13:03:11 -05:00
Mark Vieira a42a940b78
Update Gradle Enterprise plugin to 3.16.1 (#104435) 2024-02-13 08:15:59 -08:00
Joe Gallo d54329011f
Remove HLRC from ES codebase (#105406) 2024-02-12 11:50:01 -05:00
Rene Groeschke 7773364284
Replace Nginx fixture usage with UrlFixture (#103494)
- Simplify test setup in URLSearchableSnapshotsIT
- Delete nginx test fixture project
2023-12-20 09:06:23 +01:00
Rene Groeschke 6e36ea841d
Port idp-fixture to testcontainers (#103320)
This ports idp-fixture to test container and updates downstream tests
accordingly.
2023-12-13 05:38:24 -05:00
Rene Groeschke 8e9a88b63d
Update gradle wrapper to 8.5 (#102154)
Update BuildLayout references
2023-11-30 10:01:32 -05:00
Mark Vieira 5d379626df
Expose historical feature metadata to rest tests (#102110)
This introduces a new getHistoricalFeatures() method on ESRestTestCase
which returns a map of historical feature version mappings loaded from
FeatureSpecification implementations from any plugins/modules in use
by the current test suite. The mappings are generated by a new Gradle
task at build time, and then injected into the test runtime as a
System property.
2023-11-14 10:38:33 -08:00
Mark Vieira 60e178eb3a
Update Gradle Enterprise plugin to 3.14.1 (#98551) 2023-09-06 08:13:46 -07:00
Albert Zaharovits 1b468a0a3b
Upgrade to OpenSAML 4.3.0 (shadowed) (#98199)
This commit upgrades to OpenSAML v4.3.0

Versions of OpenSAML ≥ 4.1 have a hard dependency on the non-FIPS release of BouncyCastle.
This would prevent ES from being able to run in a JVM where BC-FIPS is configured as the security provider.

Closes: #71983

Co-authored-by: Tim Vernum tim@adjective.org
2023-08-23 12:59:34 +03:00
Mark Vieira 047a85f30a
Update Gradle Enteprise plugin to 3.13.1 (#95896)
Upgrade Gradle Enterprise plugin to latest available.
2023-05-08 14:01:15 -04:00
Rene Groeschke 4e2f852c08
Resolve runtime java via Gradle tool chain provider (#95319)
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
2023-05-03 15:28:47 +02:00
Rene Groeschke e735455431
Provide hints to Gradle Task.onlyIf declarations (#94953)
* Update gradle enterprise plugin to show skip reasons in build scans
* Unify OS specific handling in build logic
2023-03-31 23:57:55 +02:00
William Brafford c9e8101d82
Validate that stable plugins do not break compatibility (#92776)
We need to verify, for each release, that our stable plugin APIs
are not breaking.

This commit adds some Gradle support for basic backwards compatibility
testing. On the Gradle side, we add a new qa project to test the
current commit against downloads of released versions, and against
fresh builds of snapshot versions.

As for the actual comparison, we break up the output of javap (the
decompiler) by line and create maps of classes to public class,
field, and method declarations within those class files. We then
check that the signature map from the new jar is not missing any
elements present in the old jar. This method has known limitations,
which are documented in the JarApiComparisonTask class.

Co-authored-by: Mark Vieira <portugee@gmail.com>
2023-01-18 06:48:48 -05: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
Mark Vieira 0452ec2e8c
Upgrade Gradle Enterprise plugin to 3.11.4 (#91435) 2022-11-14 13:08:26 -08:00
Mark Vieira cb5bec0cf7 Revert "Upgrade Gradle Enterprise plugin to 3.11.3 (#91323)"
This reverts commit f08570ffd8.
2022-11-07 08:50:30 -08:00
Mark Vieira f08570ffd8
Upgrade Gradle Enterprise plugin to 3.11.3 (#91323)
Update to latest GE plugin which includes several fixes.
2022-11-04 13:52:12 -04:00
Rory Hunter d5bcd0b33e
Disable :qa:apm project (#90291)
This project has a problem with availability of Docker images after
release. Disabling individual tasks is tricky because it uses test
fixtures, so instead just skip the project entirely until we can work
out a way forward.
2022-09-23 11:12:09 +01:00