Commit graph

1232 commits

Author SHA1 Message Date
Mark Vieira
f5c8762ce1
Update BWC version logic to support multiple bugfix versions (#117943) (#118116) (#118118)
(cherry picked from commit 7070e95fa7)

# Conflicts:
#	.buildkite/pipelines/intake.yml
#	.buildkite/pipelines/periodic.yml
#	.ci/snapshotBwcVersions
#	build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/InternalDistributionBwcSetupPluginFuncTest.groovy
#	build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/LegacyYamlRestCompatTestPluginFuncTest.groovy
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BwcVersions.java
#	build-tools-internal/src/test/groovy/org/elasticsearch/gradle/internal/BwcVersionsSpec.groovy
(cherry picked from commit c5d3799af1)

# Conflicts:
#	.buildkite/pipelines/intake.yml
#	.buildkite/pipelines/periodic.yml
2024-12-06 12:12:36 +11:00
Brian Seeders
303d93aaa2
[CI] Pull in the latest mutes from base branch for PRs at runtime (#117587) (#117660)
(cherry picked from commit a46547c8dc)
2024-11-27 16:56:38 -05:00
Rene Groeschke
0a093b133a
[Build] Fix fips testing after buildparams rework (#116934) (#117554)
(cherry picked from commit 81e3afaafa)
2024-11-26 19:40:07 +01:00
Nhat Nguyen
952df62bc2
Deprecate source mode in mappings (#117177) (#117527)
Backport of #116689 to 8.17

This change deprecates _source.mode in mappings, replacing it with
the index.mapping.source.mode index setting.
2024-11-25 20:26:52 -08:00
Rene Groeschke
20a78a18e9
[8.17] [Gradle] Remove static use of BuildParams (#115122) (#117433)
* [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

* Some cleanup

* Update build.gradle

fix buildparams access
2024-11-25 18:29:26 +01:00
Rene Groeschke
b38283728a
[Build] Reapply updating to Gradle 8.11.1 (#117394) (#117428)
This reverts commit b5c6d927c1.
* Simplify and fix dynamic project dependency handling

(cherry picked from commit d2b3dc51d1)
2024-11-25 03:54:00 +11:00
Rene Groeschke
765ecc57c3
[Build] Do not create empty buildkite build artifacts (#117400) (#117424)
when building nesting bwc distros we tend to generate empty buildkite artifacts.
Lets not create empty archives
2024-11-24 21:14:11 +11:00
Slobodan Adamović
210d6ad5fd
Upgrade Bouncy Castle FIPS dependencies (#112989) (#117320)
This PR updates `bc-fips` and `bctls-fips` dependencies to the latest
minor versions.
2024-11-23 00:03:07 +11:00
Martijn van Groningen
1bc60acdef
Revert "Deprecate _source.mode in mappings (#117106)" (#117151)
This reverts #117106. Bwc tests fail, because older nodes are killed with the following error:

```
[2024-11-20T10:54:58,600][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [v8.17.0-0] fatal error in thread [elasticsearch[v8.17.0-0
][clusterApplierService#updateTask][T#1]], exiting java.lang.AssertionError: provided source [{"_doc":{"_data_stream_timestamp":{"enabled":true},"_source":{},"properties":{"@timestamp":{"type":"date"},"k8s":{"properties":{"pod":{"properties":{"ip":{"type":"ip"},"name":{"type":"keyword"},"network":{"properties":{"rx":{"type":"long"},"tx":{"type":"long"}}},"uid":{"type":"keyword","time_series_dimension":true}}}}},"metricset":{"type":"keyword","time_series_dimension":true}}}}] differs from mapping [{"_doc":{"_data_stream_timestamp":{"enabled":true},"_source":{"mode":"synthetic"},"properties":{"@timestamp":{"type":"date"},"k8s":{"properties":{"pod":{"properties":{"ip":{"type":"ip"},"name":{"type":"keyword"},"network":{"properties":{"rx":{"type":"long"},"tx":{"type":"long"}}},"uid":{"type":"keyword","time_series_dimension":true}}}}},"metricset":{"type":"keyword","time_series_dimension":true}}}}]
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.DocumentMapper.<init>(DocumentMapper.java:66)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.MapperService.newDocumentMapper(MapperService.java:588)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.MapperService.updateMapping(MapperService.java:346)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.IndexService.updateMapping(IndexService.java:840)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndicesAndUpdateShards(IndicesClusterStateService.java:583)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.doApplyClusterState(IndicesClusterStateService.java:306)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:260)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:544)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:530)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:503)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:432)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:157)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:956)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:218)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:184)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1575)
```

The `mode` parameter no longer gets serialized for new indices. However on the older nodes still serialize the `mode` parameter, which caused the menioned assertion to fail. Reverting for now and see how best to address this bwc serialization issue.

We can only stop serializing mode, when all nodes are on the same version.  Unfortunately we can't invoke `c.clusterTransportVersion().get()` from parser or builder, because that calling thread isn't allowed to call `clusterService.state()`.
2024-11-20 13:39:07 +01:00
Nhat Nguyen
e63367eaec
Deprecate _source.mode in mappings (#116689) (#117106)
This change deprecates _source.mode in mappings, replacing it with the
index.mapping.source.mode index setting.
2024-11-20 17:51:22 +11:00
Rene Groeschke
28b2f5248f
[Gradle] Update shadow plugin (#116826) (#116876)
- The shadow plugin has changed ownership and plugin id.
- Make some formatting of poms more reproducible

(cherry picked from commit def490ef85)
2024-11-16 15:06:40 +01:00
Jake Landis
181d1e4b7f
Bump Netty to 4.1.115.Final (#116696) (#116757)
This commit bumps Netty from 4.1.109.Final to 4.1.115.Final

(cherry picked from commit b42dbab0a4)
2024-11-14 10:36:28 +11:00
Patrick Doyle
37edf70bda
Backport entitlement work up to #116473 to 8.x (#116613)
* Add initial entitlement policy parsing (#114448)

This change adds entitlement policy parsing with the following design:
* YAML file for readability and re-use of our x-content parsers
* hierarchical structure to group entitlements under a single scope
* no general entitlements without a scope or for the entire project

* Avoid double instrumentation via class annotation (#115398)

* 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.

* Entitlement tools: SecurityManager scanner (#116020)

* Dynamic entitlement agent (#116125)

* Refactor: treat "maybe" JVM options uniformly

* WIP

* Get entitlement running with bridge all the way through, with qualified
exports

* Cosmetic changes to SystemJvmOptions

* Disable entitlements by default

* Bridge module comments

* Fixup forbidden APIs

* spotless

* Rename EntitlementChecker

* Fixup InstrumenterTests

* exclude recursive dep

* Fix some compliance stuff

* Rename asm-provider

* Stop using bridge in InstrumenterTests

* Generalize readme for asm-provider

* InstrumenterTests doesn't need EntitlementCheckerHandle

* Better javadoc

* Call parseBoolean

* Add entitlement to internal module list

* Docs as requested by Lorenzo

* Changes from Jack

* Rename ElasticsearchEntitlementChecker

* Remove logging javadoc

* exportInitializationToAgent should reference EntitlementInitialization, not EntitlementBootstrap.

They're currently in the same module, but if that ever changes, this code would have become wrong.

* Some suggestions from Mark

---------

Co-authored-by: Ryan Ernst <ryan@iernst.net>

* Remove unused EntitlementInternals (#116473)

* Revert "Entitlement tools: SecurityManager scanner (#116020)"

This reverts commit 023fb663de.

---------

Co-authored-by: Jack Conradson <osjdconrad@gmail.com>
Co-authored-by: Lorenzo Dematté <lorenzo.dematte@elastic.co>
Co-authored-by: Ryan Ernst <ryan@iernst.net>
2024-11-13 05:36:55 +11:00
Mariusz Józala
11fa0520b1
[8.x] [TEST] Migrated REST tests extending JsonLogsIntegTestCase (#115188) (#116025)
* [TEST] Migrated REST tests extending JsonLogsIntegTestCase (#115188)

REST tests extending JsonLogsIntegTestCase migrated to the new REST
testing framework, using 'elasticsearch.internal-java-rest-test' Gradle
plugin
Explicit handling of test single-cluster config by checking if cluster
is explicitly configured as single-node to avoid an incorrect configuration
which may cause split brain.

Replaced `ElasticsearchJavaPlugin` with `ElasticsearchJavaBasePlugin` in
 `RestTestBasePlugin` for better granularity.
Additionally, updated the `DistributionDownloadPlugin` to set configurations as
non-consumable and the `InternalDistributionArchiveSetupPlugin` to mark
certain configurations as consumable. This ensures that configurations
are correctly utilized during build setup and execution phases.

(cherry picked from commit 130cc74d8a)

* Fixed DefaultSettingsProvider to use Java 17 (#116029)

It is needed to be able to backport the change to the 8.x.
Having same code for both versions can help us to avoid some merge
conflicts in the future.
2024-11-04 20:59:59 +11:00
Martijn van Groningen
43aa301688
[8.x] Add more tsdb and logsdb rolling upgrade indexing tests. (#115760)
Backport #115639 to 8.x branch.

The main difference between other rolling upgrade tests is that these tests index more data while performing the rolling upgrade and no rollover is performed during rolling upgrade. For example this makes it more likely for merging to happen, which could uncover bwc bugs.

Note that currently both test suites start trial license so that synthetic source gets used.
2024-10-31 09:08:36 +01:00
Ryan Ernst
dedf9fd6d7
Use directory name as project name for libs (#115720) (#115984)
* 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-`.

* fixes
2024-10-31 07:52:10 +11:00
elastic-renovate-prod[bot]
dd6d334eb3
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 277ebb4 (8.x) (#114325)
* Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 277ebb4
* Fix spotless after auto update of wolfi image

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Rene Groeschke <rene@elastic.co>
2024-10-30 17:46:19 +01:00
Mark Vieira
92c862f530
Avoid resolving project dependencies in 'resolveAllDependencies' task (#115888) (#115946) 2024-10-31 02:39:52 +11:00
Rene Groeschke
8a8bf66cf6
[Gradle] Fix packaging tests after removing cloud docker image (#115654) (#115672) 2024-10-26 03:23:24 +11:00
Rene Groeschke
2f3f6daea5
Remove unused elasticsearch cloud docker image (#115357) (#115572) 2024-10-25 04:01:25 +11:00
Mark Vieira
27c240af98
Temporarily disable buildkite upload on Windows agents (#115449) (#115454) 2024-10-24 07:15:04 +11:00
Ryan Ernst
477f630967
Update bundled jdk to 23 (#114852)
After completing additional validation with the JIT workaround in #113817, this commit upgrades the bundled JDK to 23.

This is a backport of #114823
2024-10-22 08:10:25 -07:00
Brian Seeders
b84e990232
Bump to version 8.17.0 2024-10-16 12:32:03 -04:00
Rene Groeschke
6192818528
Replace cloud-ess docker image with wolfi-ess (#114413) (#114684)
* 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

(cherry picked from commit f1f5ee06a3)

# Conflicts:
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java
2024-10-14 16:07:11 +02:00
Rene Groeschke
45f57f11a2
[8.x] Update wolfi image and fix breaking change (#114390) (#114489)
* Update wolfi image and fix breaking change (#114390)

(cherry picked from commit 190513dce7)

# Conflicts:
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java

* Fix spotlight
2024-10-11 21:08:33 +11:00
Rene Groeschke
cec4609543
[CI] Fix PublishPluginFuncTest (#114511) (#114517)
(cherry picked from commit 388d24f2f5)
2024-10-11 04:01:09 +11:00
Mark Vieira
9e56960b56
Bump default timeout for test suites on Windows to 60 minutes (#114428) (#114446)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-10 09:02:17 -07:00
Rene Groeschke
94ea8efb90
[Build] Add AGPL license to open source poms (#114403) (#114487)
Aftermath of coming back to open source licensing
2024-10-10 11:36:55 -04:00
Nik Everett
67ce8bd244
ESQL: Entirely remove META FUNCTIONS (#113967) (#114342)
This removes the undocumented `META FUNCTIONS` command that emits
descriptions for all functions. This shouldn't be used because we never
told anyone about it. I'd have preferred if we'd have explicitly
documented it as no public or if we'd have left it snapshot-only. But
sometimes you make a mistake. I'm hopeful no one is relying on it. It
was never reliable and not public.....
2024-10-10 07:51:18 +11:00
Rene Groeschke
69e88f33d4
Timeout on buildkite artifact upload but do not fail the build (#114430) (#114434)
this workarounds an issue we currently see on windows ci boxes where we
run into timeouts in this step in our builds
2024-10-10 06:38:59 +11:00
Slobodan Adamović
8c6b036aa4
Upgrade protobufer to 3.25.5 (#113869) (#114117)
Updating `com.google.protobuf:protobuf-java-util` and
`com.google.protobuf:protobuf-java` dependencies to
the latest 3.x version.

(cherry picked from commit ddf019a1a5)
2024-10-04 22:00:16 +10:00
Rene Groeschke
54ecb2c666
Add wolfi ess docker image (#113810) (#114111)
(cherry picked from commit 54c83d7fa7)
2024-10-04 13:44:42 +02:00
Chris Hegarty
45a08b94b3
Upgrade to Lucene 9.12.0 (#113333) (#113835)
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: 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 13:55:02 +01:00
Simon Cooper
5ba445e4b2
Add jvm option to enable test features (#113108) (#113700)
The option is only enabled for test clusters, and turns on features that are only present in tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-30 19:29:26 +10:00
Rene Groeschke
339d4e462b
Update Gradle wrapper to 8.10.2 (#113603) (#113719)
Update Gradle wrapper to 8.10.2
2024-09-28 06:03:48 +10:00
Brian Seeders
c0be2e2c1b
Fix packaging tests after addition of new wolfi-based image (#112831) (#113715) 2024-09-27 16:01:14 -04:00
Ryan Ernst
8b795d4048
Remove plugin classloader indirection (#113154) (#113273)
Extensible plugins use a custom classloader for other plugin jars. When
extensible plugins were first added, the transport client still existed,
and elasticsearch plugins did not exist in the transport client (at
least not the ones that create classloaders). Yet the transport client
still created a PluginsService. An indirection was used to avoid
creating separate classloaders when the transport client had created the
PluginsService.

The transport client was removed in 8.0, but the indirection still
exists. This commit removes that indirection layer.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-27 03:55:44 +10:00
Simon Cooper
31d5967d35
Remove use of SPI locale for JDK 23+ (#113182)
On JDK 23 we're just going with what CLDR specifies for week-date calculations - the built-in locales are available for ISO weekdate uses.
2024-09-20 16:48:17 +01:00
Rene Groeschke
28f8803444
Update Gradle wrapper to 8.10.1 (#112948) (#113205) 2024-09-20 04:27:56 +10:00
Mark Vieira
0279c0a909
Add AGPLv3 as a supported license 2024-09-13 14:30:33 -07:00
Martijn van Groningen
47be9bb975
[8.x] Remove zstd feature flag for index codec best compression. (#112665) (#112857)
* Remove zstd feature flag for index codec best compression. (#112665)

ZStandard was added via #103374 a few months ago to snapshot builds of Elasticsearch only and benchmark results have shown that using zstd is a better trade off compared to deflate for when index.codec is set to best_compression.

This change removes the feature flag for ZStandard stored field compression for indices with index.codec set to best_compression.

* Update docs/changelog/112857.yaml

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-14 02:48:37 +10:00
Brian Seeders
c47162afca
Add missing hyphen for wolfi immage suffix 2024-09-10 22:42:00 -04:00
Mark Vieira
7e16c9bf08
Remove debug logging 2024-09-06 14:08:37 -07:00
Rene Groeschke
4dee614707
Add chainguard docker image (#112103) 2024-09-06 10:32:42 -07:00
Mark Vieira
24f33e95e8
Ensure rest compatibility tests are run when appropriate (#112526) 2024-09-05 08:22:48 -07:00
Simon Cooper
a36d90cf34
Use CLDR locale provider on JDK 23+ (#110222)
JDK 23 removes the COMPAT locale provider, leaving CLDR as the only option. This commit configures Elasticsearch
to use the CLDR provider when on JDK 23, but still use the existing COMPAT provider when on JDK 22 and below.

This causes some differences in locale behaviour; this also adapts various tests to still work whether run on COMPAT or CLDR.
2024-09-04 13:42:40 +01:00
Stanislav Malyshev
b2d885c142
Add "CCS" label to validation schema (#112407) 2024-08-30 18:52:43 -06:00
Ryan Ernst
e58644cd6f
Handle spaces in java library path (#106789)
This commit quotes the entire library path in case there are spaces in
any of the paths.
2024-08-31 04:12:39 +10:00
Rene Groeschke
7ddbaa24ec
[Gradle] Simplify Build Scan setup (#112347)
- remove jenkins specific logic
- more simplification on build scan build logic
2024-08-30 14:44:38 +02:00
Ryan Ernst
0aa4758f02
Stop setting java.library.path (#112119)
Native libraries in Java are loaded by calling System.loadLibrary. This
method inspects paths in the java.library.path to find the requested
library. Elasticsearch previously used this to find libsystemd, but now
the only remaining use is to set the additional platform directory in
which Elasticsearch keeps its own native libraries.

One issue with setting java.library.path is that its not set for the cli
process, which makes loading the native library infrastructure from clis
difficult. This commit reworks how Elasticsearch native libraries are
found in order to avoid needing to set java.library.path. There are two
cases. The simplest is production, where the working directory is the
Elasticsearch installation directory, so the platform specific directory
can be constructed. The second case is for tests where we don't have an
installtion. We already pass in java.library.path there, so this change
renames the system property to be a test specific property that the new
loading infrastructure looks for.
2024-08-23 11:16:18 -07:00