Commit graph

703 commits

Author SHA1 Message Date
Mark Vieira
a4014054f1
Upgrade mockito (#121849) (#121931) 2025-02-06 12:22:10 -08:00
Chris Hegarty
4baffe4de1
Upgrade to Lucene 10.1.0 (#119308)
This commit upgrades to Lucene 10.1.0.
2025-01-30 13:41:02 +00:00
Rene Groeschke
2b16515166
Update Gradle wrapper to 8.12.1 (#120960) 2025-01-28 15:41:44 +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
Luca Cavanna
9472489441
Upgrade randomized runner to 2.8.2 (#118242)
A recent bug we found has been fixed, so the upgrade pulls in the fix and this
commit also removes the workaround we put in place.
2024-12-09 22:36:16 +01:00
Lorenzo Dematté
7bd5c69c8c
Update ASM 9.7 -> 9.7.1 to support JDK 24 (#118094) 2024-12-06 08:16:46 +01: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
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
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
Ryan Ernst
bcd690f853
Update forbidden apis to 3.8 (#117047) 2024-11-19 20:19:36 +01:00
Ryan Ernst
9bece7e290
Upgrade the build's ASM to 9.7.1 (#116963)
Primarily this allows forbidden apis to read java 23 class files.
2024-11-18 10:34:51 -08: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
Jake Landis
b42dbab0a4
Bump Netty to 4.1.115.Final (#116696)
This commit bumps Netty from 4.1.109.Final to 4.1.115.Final
2024-11-13 09:48:30 -06:00
Ryan Ernst
efcdd60776
Update bundled jdk to 23 (#114823)
After completing additional validation with the JIT workaround in
https://github.com/elastic/elasticsearch/pull/113817, this commit
upgrades the bundled JDK to 23.
2024-10-30 14:43:43 -07:00
Slobodan Adamović
6b32bced36
Remove optional transitive tink and protobuf-java dependencies (#115916)
This commit removes `com.google.crypto.tink` which is transitive and optional dependency of `oauth2-oidc-sdk` and `nimbus-jose-jwt`. We don't seem to be using any functionality that requires `tink` and thus `protobuf-java`. Removing them feels safer than having to maintain misaligned versions.
2024-10-30 16:28:34 +01:00
Nick Tindall
7599d4cf43
Use Azure blob batch API to delete blobs in batches (#114566)
Closes ES-9777
2024-10-24 19:51:52 +11:00
Lorenzo Dematté
4f08b7e578
Update APM Java Agent to support JDK 23 (#115194) 2024-10-21 16:04:54 +02: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
Patrick Doyle
049c482570
Initial InstrumenterTests (#114422)
* Initial InstrumenterTests

* Assert on instrumentation method arguments
2024-10-11 16:01:48 -04:00
Pat Whelan
9bdc5907f1
[ML] Upgrade to AWS SDK v2 (#114309)
- Replaced AWS 1.12.740 with 2.28.13
- Removed `aws-java-sdk*` and its transitive dependencies.
- Added `awssdk:bedrockruntime` as an `implementations`, all transitive
  dependencies are added as `api` matching their marked `Compile` in
  maven.
- Added `awssdk:netty-nio-client` as our client implementation, since
  our v1 integration is using the respective Async client.
- Added netty packages as `runtimeOnly` since they are only used during
  runtime.
- Replaced AWS's use of SLF4J-1.7 with our declaration of SLF4J-2.x,
  since SLF4J includes backwards-compatible bindings.
- Migrated all references from the v1 package (`com.amazonaws`) to the
  v2 package (`software.amazon.awssdk`).

Notable changes in the SDK:
- *Result objects are renamed to *Response objects.
- Objects are now immutable and require Builders to set fields.
- Getters no longer have the `get*` prefix, e.g. `getModelId()` is now
  `modelId()`.
- `Future` has been replaced with `CompletableFuture`.
- There is no longer a need to invoke the `IdleConnectionReaper`, this
  is now done when the client is closed.
- Builders have a consumer mutation pattern for modifying many fields at
  once.

Security changes:
- The underlying Builder objects always check to see if the
  `.aws/credentials` and `.aws/config` files exist, even if they are not
  used, so our `plugin-security.policy` now allows reading these files.
- The Builder always checks for the `http.proxyHost` property before
  defaulting to the hardcoded Bedrock URL.

Resolve #110590
2024-10-11 04:41:53 +02:00
Slobodan Adamović
ddf019a1a5
Upgrade protobufer to 3.25.5 (#113869)
Updating `com.google.protobuf:protobuf-java-util` and 
`com.google.protobuf:protobuf-java` dependencies to 
the latest 3.x version.
2024-10-04 12:47:39 +02:00
Chris Hegarty
32dde26e49
Upgrade to Lucene 9.12.0 (#113333)
This commit upgrades to Lucene 9.12.0.

Co-authored-by: Adrien Grand <jpountz@gmail.com>
Co-authored-by: Armin Braun <me@obrown.io>
Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
Co-authored-by: Chris Hegarty <chegar999@gmail.com>
Co-authored-by: John Wagster <john.wagster@elastic.co>
Co-authored-by: Luca Cavanna <javanna@apache.org>
Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
2024-10-01 08:39:27 +01:00
Rene Groeschke
259b0cdd30
Update Gradle wrapper to 8.10.2 (#113603)
Update Gradle wrapper to 8.10.2
2024-09-28 04:52:13 +10:00
Rene Groeschke
3aa84159fc
Update Gradle wrapper to 8.10.1 (#112948) 2024-09-19 19:23:42 +02:00
Chris Hegarty
0489a37b4a
Upgrade Byte Buddy to 1.14.12 (#112390)
This commit bumps the Byte Buddy version to 1.14.12. This is needed to support class file versions generated by Java 21.

We already use this version of Byte Buddy elsewhere, so there is not need to update the gradle verification metadata.

This change is in preparation for an eventual bump of Elasticsearch to a minimum of JDK 21, in ES 9.0.
2024-08-30 14:54:45 +01:00
Joe Gallo
55a185b933
Bump spotless version to 6.25.0 (#112366) 2024-08-29 16:07:31 -04:00
Nhat Nguyen
98fe686da4
Upgrade xcontent to Jackson 2.17.2 (#112320)
Avoid FasterXML/jackson-core#1256
2024-08-28 15:59:12 -07:00
David Turner
7c5c471904
Upgrade repository-azure dependencies (#112277)
`azure-core-1.51.0` includes fixes for a handful of bugs we reported.
This commit upgrades the `azure-storage-blob` and `azure-identity`
dependencies to pick up this new fixed version of `azure-core`.
2024-08-28 14:31:25 +01:00
Chris Hegarty
762a830c38
Bump asm version to 9.7 in logger usage (#112251)
This commit bumps the asm version to 9.7 in test logger usage, which contains support for newer Java class file versions.

This change is in preparation for an eventual bump of Elasticsearch to a minimum of JDK 21, in ES 9.0
2024-08-28 08:00:01 +01:00
Rene Groeschke
fb6c5a55dd
Update Gradle wrapper to 8.10 (#111736) 2024-08-22 12:15:22 +02:00
Ryan Ernst
5a10545d37
Upgrade xcontent to Jackson 2.17.0 (#111948) 2024-08-20 06:07:08 -07:00
Athena Brown
0ca60c6c76
Update OAuth2 OIDC SDK (#108799)
This commit updates the Nimbus OAuth2 OIDC SDK and the associated Nimbus JOSE+JWT, however a few odd choices had to be made in the process.

First, we update to versions which are old at time of merge. This is because versions of Nimbus JOSE+JWT 9.38 and after through time of writing [contain a bug](https://bitbucket.org/connect2id/nimbus-jose-jwt/issues/550/java-module-doesnt-work-properly-with) in which the shaded gson class files included in the library are not properly loaded by our module loading code (and possibly in general? the root cause of the bug is unclear at time of writing but it does not appear to be present in all uses of this library). This requires us to use an older version of Nimbus OAuth2 OIDC SDK as well.

Second, the aforementioned shaded gson uses reflection internally, and is used in unpredictable places in these libraries (e.g. constructors). This is extremely unfriendly to our usage of the security manager. In order to make the scope of permission grants as narrow as possible, we shadow nimbus-jose-jwt in order to insert `AccessController.doPrivileged` calls at the appropriate points, given the usage of gson is relatively contained.

This approach was chosen over other approaches given 1) the relative simplicity given the implementation of the library, and 2) the complexity involved in safely using the library any other way - as one example, gson is used frequently in `toString()` methods, which are frequently called implicitly, especially in combination with logging which may mask security manager exceptions from being surfaced in tests. All of the code we intercept should be re-evaluated when this library is next upgraded.

Co-authored-by: Jake Landis <jake.landis@elastic.co>
2024-08-15 11:53:34 -06:00
David Turner
3b61cbfbe5
Add support for Azure Managed Identity (#111344)
With this commit, if no key or SAS token is supplied for an Azure
repository then Elasticsearch will use the `DefaultAzureCredential`
chain defined in the Azure SDK, which will obtain credentials from the
instance metadata service when running on an Azure VM.
2024-07-30 08:33:25 +01:00
David Turner
0c814b1c39
Upgrade Azure SDK (#111225)
Also simplify how versions are declared in `build.gradle` and align
Jackson/Netty versions with the rest of ES.
2024-07-24 11:02:35 +01:00
Rene Groeschke
cb0ecb86df
Update Gradle wrapper to 8.9 (#110109) 2024-07-19 13:42:33 +02:00
Chris Hegarty
af779d68a2
Upgrade to JMH 1.37 (#110580)
This commit upgrades to JMH 1.37. There are some fixes for Mac that allow easier running of profilers, etc.
2024-07-09 08:59:28 +01:00
Mark J. Hoy
52e591d6a6
[Inference API] Add Amazon Bedrock support to Inference API (#110248)
* Initial commit; setup Gradle; start service

* initial commit

* minor cleanups, builds green; needs tests

* bug fixes; tested working embeddings & completion

* use custom json builder for embeddings request

* Ensure auto-close; fix forbidden API

* start of adding unit tests; abstraction layers

* adding additional tests; cleanups

* add requests unit tests

* all tests created

* fix cohere embeddings response

* fix cohere embeddings response

* fix lint

* better test coverage for secrets; inference client

* update thread-safe syncs; make dims/tokens + int

* add tests for dims and max tokens positive integer

* use requireNonNull;override settings type;cleanups

* use r/w lock for client cache

* remove client reference counting

* update locking in cache; client errors; noop doc

* remove extra block in internalGetOrCreateClient

* remove duplicate dependencies; cleanup

* add fxn to get default embeddings similarity

* use async calls to Amazon Bedrock; cleanups

* use Clock in cache; simplify locking; cleanups

* cleanups around executor; remove some instanceof

* cleanups; use EmbeddingRequestChunker

* move max chunk size to constants

* oof - swapped transport vers w/ master node req

* use XContent instead of Jackson JsonFactory

* remove gradle versions; do not allow dimensions
2024-07-05 13:01:29 -04:00
Sylvain Wallez
e78bdc953a
ESQL: add Arrow dataframes output format (#109873)
Initial support for Apache Arrow's streaming format as a response for ES|QL. It triggers based on the Accept header or the format request parameter.

Arrow has implementations in every mainstream language and is a backend of the Python Pandas library, which is extremely popular among data scientists and data analysts. Arrow's streaming format has also become the de facto standard for dataframe interchange. It is an efficient binary format that allows zero-cost deserialization by adding data access wrappers on top of memory buffers received from the network.

This PR builds on the experiment made by @nik9000 in PR #104877

Features/limitations:
- all ES|QL data types are supported
- multi-valued fields are not supported
- fields of type _source are output as JSON text in a varchar array. In a future iteration we may want to offer the choice of the more efficient CBOR and SMILE formats.

Technical details:

Arrow comes with its own memory management to handle vectors with direct memory, reference counting, etc. We don't want to use this as it conflicts with Elasticsearch's own memory management.

We therefore use the Arrow library only for the metadata objects describing the dataframe schema and the structure of the streaming format. The Arrow vector data is produced directly from ES|QL blocks.

---------

Co-authored-by: Nik Everett <nik9000@gmail.com>
2024-07-03 10:29:57 +02:00
Rene Groeschke
f3cad241ae
[Gradle] Cleanup build libs vesion catalogue and its usage (#110298)
* [Gradle] Cleanup build libs vesion catalogue and its usage

* Snake yaml version in version.properties still used
2024-07-01 13:57:05 +02:00
Ignacio Vera
a099c9f7e6
Upgrade to Lucene-9.11.1 (#110234) 2024-06-28 08:42:24 +02:00
Jake Landis
7ad9534707
Bump jackson version in modules:repository-azure (#109717) 2024-06-17 11:35:16 -07:00
Benjamin Trent
29288d6590 Merge remote-tracking branch 'upstream/main' into lucene_snapshot_9_11 2024-06-11 06:54:23 -04: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
Benjamin Trent
54e290318e Use RC1 for release 2024-06-05 12:38:16 -04:00
Benjamin Trent
cf84416fc5 Merge remote-tracking branch 'upstream/main' into lucene_snapshot_9_11 2024-06-04 12:50:52 -04: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