Commit graph

71 commits

Author SHA1 Message Date
Rene Groeschke
916cd052bd Revert "[Gradle] Spotless plugin update (#115750)"
This reverts commit 6370d600b0.
2025-06-11 22:27:53 +02:00
Rene Groeschke
6370d600b0
[Gradle] Spotless plugin update (#115750)
- provides better configuration cache support
- requires some rework due to changed defaults
2025-06-12 04:22:13 +10:00
Joe Gallo
f8ef78446a
Upgrade httpclient to 5.3.3 for build-tools-internal (#124018) 2025-03-07 11:43:15 -05: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
elastic-renovate-prod[bot]
0a0a4cb9ad
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 90888b1 (#114284)
This PR contains the following updates:

| Package | Update | Change | |---|---|---| |
docker.elastic.co/wolfi/chainguard-base | digest | `c16d3ad` ->
`90888b1` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once
you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-10-09 01:39:19 +11:00
Mark Vieira
a59c182f9f
Add AGPLv3 as a supported license 2024-09-13 15:29:46 -07: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
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
76d19749a4
Add gradle plugin for publishing docker based test fixtures (#106229)
To make those docker images available for our testcontainer based
fixtures we need to publish them on a regular basis to ensure the source
and the images are in sync. This adds some convenience plugin to take
care of publishing our docker test fixtures
2024-03-21 12:29:38 -04: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
Ryan Ernst
b250f06b09
Add a gradle plugin for embedded providers (#105094)
x-content embeds its jackson implementation inside its jar. This commit
formalizes the setup for this embedding with a gradle plugin so that it
can be reused by other libs.
2024-02-05 15:21:52 -05:00
Ryan Ernst
d5e727e362
Add plugin for creating MRJARs (#104883)
This commit adds an elasticsearch gradle plugin which sets up a project
to build an MRJAR. By applying the plugin, the src dir is checked for
any directories matching mainXX where XX is the java version number.
A source set is automatically setup, an appropriate compiler tied to
that source set, and it's output placed in the correct part of the final
jar. Additionally, the sourceset allows use of preview features in that
verison of Java, and the preview bits are stripped from the resulting
class files.
2024-01-29 21:06:19 -08:00
Ryan Ernst
2f5247117e
Upgrade ASM to 9.6 for Java 22 support (#104085)
This commit upgrades the version of asm used by the build and plugins in
order to support Java 22 version format.

closes #104065 relates #103963
2024-01-08 15:03:40 -05:00
Simon Cooper
2cd816ebfd
Add new update version gradle task (#103335)
Add an updateVersions gradle task that updates the version numbers in the ES repo as part of release automation. This will be used by the release automation tools, replacing old functionality to manually modify the java files.
2023-12-20 17:09:29 +00:00
Mark Vieira
a9546a07f2
Disable incremental compilation in CI environments (#103346) 2023-12-12 13:10:27 -08:00
Rene Groeschke
26905047fb
Rework minio test fixture and its usages (#102707)
* Update minio fixture and usages to rely on new test cluster framework and testcontainer
* Cache test fixture resources during packer caching

Add logic that ensures we resolve docker images resolved from docker registry as part of our packer
cache setup.
2023-12-05 09:30:50 +01:00
Rene Groeschke
c11315d0d7
repository-s3 yamlRestTests to new cluster test framework (#102353)
- Replace docker-compose based s3-fixture usages to use plain java
- Support lazy evaluated system properties for local cluster definitions
- Make it work with configuration cache enabled
- Port Minio fixture usage to leverage test container testing library.
2023-11-22 10:08:58 +01:00
Rene Groeschke
19f5bc444c
Fix creation of large build job archives (#102023)
* Fix large file and large path handling in build tar creating
2023-11-21 20:29:27 +01:00
Rene Groeschke
e70da0491a
Revert "Keep old plugin name for build complete plugin (#101995)" (#102026)
This reverts commit 46f545cf45 as we need
to sort out the cause of #102022 first
2023-11-10 12:07:20 -05:00
Rene Groeschke
46f545cf45
Keep old plugin name for build complete plugin (#101995)
Fixes incompatibility with serverless builds
2023-11-10 03:11:58 -05:00
Rene Groeschke
841f711a0a
Make gradle build finished logic CC compatible (#96475)
* Make gradle build finished logic CC compatible
* Make ElasticsearchBuildFinishedPlugin configuration cache aware
* Add gradle enterprise plugin to buildlibs version catalogue
2023-11-10 08:05:13 +01:00
Chris Hegarty
c508f6172e
Add StringTemplate Gradle plugin (#97388)
This commit adds a StringTemplate Gradle plugin based on Antlr's StringTemplate.

With this plugin we can template Java source code and generate different variants of it, e.g. implementations that vary only by primitive type.
2023-07-07 15:58:45 +01:00
Rene Groeschke
b8627079b4
Update Gradle Wrapper to 8.2 (#96686)
- Convention usage has been deprecated and was fixed in our build files
- Fix test dependencies and deprecation
2023-07-04 15:35:15 +02:00
Chris Hegarty
f59035eb7b
Update plugin cli/scanner to ASM 9.5 (#97296)
This commit updates the plugin cli and scanner components to use ASM 9.5.

The update is required to successfully test with JDK 21. Tests in this component programatically run the java source compiler, which generates class files with major version 65, then tries to parse those generated class files. Without this change the tests fail with java.lang.IllegalArgumentException: Unsupported class file major version 65.
2023-07-01 20:29:10 +01: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
44cc172219
Update Gradle wrapper to 8.1 (#94663)
- Udpate docker compose plugin to use 8.1 compliant version
- Fix deprecations of test task configurations
2023-04-13 16:11:51 +02:00
Nikola Grcevski
a849480aef
Upgrade asm to 9.4 to support Java20 (#93530) 2023-02-06 14:18:30 -05:00
Mark Vieira
5dd23249f5
Improve efficiency of nested Gradle builds (#92801) 2023-01-11 12:51:48 -08: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
Rene Groeschke
f880d41669
Add DRA snapshot build (#91018)
* Add support for building against defined build-ids of dependent artifacts
* Introduce DraResolvePlugin and functional tests
* Declare initial dra snapshot ci job for elasticsearch

We run the DRA builds against ubuntu as other release related ci jobs have in the past. Also we only have libs2xmlutills available on our ubuntu based ci workers
2022-11-09 16:16:21 +01:00
Jake Landis
58c0625f37
update snakeyaml dependency (#90414)
This commit updates snakeyaml to 1.33 and consolidates which version is used.
2022-09-28 13:13:03 -05:00
Mark Vieira
5e82c228b3
Update references to master branch in build benchmark configuration (#88787) 2022-07-26 09:51:42 -07:00
Rene Groeschke
98b789c940
Update to to Gradle wrapper 7.5 (#85141)
This updates the gradle wrapper to a 7.5

Fixes #85123
2022-07-19 08:12:19 +02:00
Rene Groeschke
8ccae4da71
Setup elasticsearch dependency monitoring with Snyk for production code (#88036)
This adds the generation and upload logic of Gradle dependency graphs to snyk

We directly implemented a rest api based snyk plugin as:

the existing snyk gradle plugin delegates to the snyk command line tool the command line tool 
uses custom gradle logic by injecting a init file that is 

a) using deprecated build logic which we definitely want to avoid
b) uses gradle api we avoid like eager task creation.

Shipping this as a internal gradle plugin gives us the most flexibility as we only want to monitor 
production code for now we apply this plugin as part of the elasticsearch.build plugin, 
that usage has been for now the de-facto indicator if a project is considered a "production" project 
that ends up in our distribution or public maven repositories. This isnt yet ideal and we will revisit 
the distinction between production and non production code / projects in a separate effort.

As part of this effort we added the elasticsearch.build plugin to more projects that actually end up 
in the distribution. To unblock us on this we for now disabled a few check tasks that started failing by applying elasticsearch.build. 

Addresses  #87620
2022-06-29 13:29:14 +02:00
Rene Groeschke
cdf5bd7ed0
Rework testing conventions gradle plugin (#87213)
This PR reworks the testing conventions precommit plugin. This plugin now:
- is compatible with yaml, java rest tests and internalClusterTest (aka different sourceSets per test type)
- enforces test base class and simple naming conventions (as it did before)
- adds one check task per test sourceSet
- uses the worker api to improve task execution parallelism and encapsulation
- is gradle configuration cache compatible  

This also ports the TestingConventions integration testing to Spock and removes the build-tools-internal/test kit folder that is not required anymore. We also add some common logic for testing java related gradle plugins. 
We will apply further cleanup on other tests within our test suite in a dedicated follow up cleanup
2022-06-20 16:26:38 +02:00
Rene Groeschke
bf4304d18a
Remove elasticsearch.rest-test gradle plugin (#85491)
Removes and remaining usages of `elasticsearch.rest-test` and the plugin itself from the codebase

Relates to https://github.com/elastic/elasticsearch/issues/63696
2022-05-17 11:23:04 +02:00
Chris Hegarty
79a59f470b
Add a Gradle Plugin for compiling modular source projects. (#86602)
This PR upstreams a custom Gradle Plugin for compiling modular source
projects, that we've been using for a while now over on the modules
branch. The Plugin infers which dependencies should be on the module
path and which dependencies should be on the class path, when compilng
the main java sourceset. This supports the "bottom up" modularization of
Elasticsearch, where parent projects are modularized before child
projects. Allowing to modularize the core of the server independently of
the extension components, that can themselves be modularized later.

With this plugin various subprojects can be modularized (by adding a
module-info.java in the source root) with minimal fuss - no custom
gradle logic is required by the subproject, beyond a couple of
subproject specific compiler lint suppressions.

The inference in the plugin is driven by walking the project
dependencies, searching for the presence of a module-info.java,
afterwhich all subprojects will be put on the module path. Again, this
supports "bottom up" modularization.

Co-authored-by: ChrisHegarty <christopher.hegarty@elastic.co>
Co-authored-by: Mark Vieira <portugee@gmail.com>
Co-authored-by: Ryan Ernst <ryan@iernst.net>
Co-authored-by: Rene Groeschke <rene@breskeby.com>
2022-05-13 08:03:57 +01:00
Rene Groeschke
da5750c460
Port build dependencies to gradle version catalogue (#86548)
We introduce the use of a Gradle version catalogue for handling build related dependencies.

This provides type safe accessors for dependencies and allow centralised version definitions.
Later we want to move all our dependency handling to version catalogues.
Since this is a Gradle feature we remove long term maintenance cost for custom version handling in
our build and make centralised version handling more straight forward and support better tooling
based on version catalogues

Fixes asm version alignment on the way using 9.3 everywhere in our build logic.
2022-05-10 12:15:36 +02:00
Rene Groeschke
8bbc7c2e0b
Port javadoc configuration logic into a binary plugin (#86471)
Also adding test coverage and fixing certain issues we stumbled into

when resolving project dependencies of compileClasspath we need to use allDependencies instead of dependencies as usually no dependencies are added directly to compileClasspath but via implementation, compileonly and api and friends
Fixed javadoc setup for projects using shadowed dependencies via shadow plugin
Fixed dealing with skipped javadoc tasks in referenced dependent projects.
In general this PR only fixes expected javadoc generation as it was intended before this PR.

This also contains some tweaks to our gradle integration test fixtures for setting up and debugging test projects
2022-05-10 09:58:43 +02:00
Rene Groeschke
0f43267a84
Update asm version in build tools for java19 support (#86288)
This also fixes issues with using asm in functional tests where
spock dependencies brought in an older version of asm not compatible
with java 18
2022-05-02 10:47:11 +02:00
Mark Vieira
0b999c399e
Upgrade bytebuddy to latest version with Java 19 support (#85881) 2022-04-14 13:19:19 -07:00
Lee Hinman
3a3ee6e342
Bump commons-compress to 1.21 (#85581)
This updates the dependency version for the Apache commons compress
project to 1.21
2022-04-04 01:04:35 -04:00
Rene Groeschke
579695d032
Update nebula plugins improving configuration cache support (#85316) 2022-03-24 13:55:54 +01:00
Rene Groeschke
b3ca9cf0a4
Do not rely on git for resolving benchmark build gradle version (#85263)
On sparse checkouts this can cause trouble, so we just resolve directly from github via URL#text
2022-03-23 12:19:09 +01:00
Rene Groeschke
7675877629
Set explicitly Gradle version in benchmark scenarios (#85229)
Gradle versions in scenarios are not automatically resolved from the gradle wrapper version
2022-03-23 09:29:16 +01:00
Rene Groeschke
00f2dc09ff
Avoid overhead of zip / unzip modules when packaging distribution (#84660)
This removes the overhead of zipping up modules that are immediately unzipped again when packaging
the elasticsearch distribution.
We also move some logic for packaging the elasticsearch distribution into a plugin and remove some outdated
overhead dealing with 'meta plugins' when copying modules into a distribution.

Another follow up and related optimization out of scope of this PR is, to also not zip unzip modules declared
for usage in our test cluster setups.

This partially addresses #76726.
2022-03-15 11:37:47 +01:00
Mark Vieira
0c6f131fbf
Remove usages of elasticsearch.build plugin in non-production projects (#84890) 2022-03-14 11:27:24 -07:00
Rene Groeschke
fd9887e58b
Cleanup jackson build tool dependencies (#83164)
- use jackson platform
- use compatible schema validator version
2022-01-27 09:57:47 +01:00
Rene Groeschke
1b77e309f3
Remove nebula extra configuration plugin (#82934)
This was used to mark dependencies as optional. Within
Gradle those deps are handled as usual and optional is only
added to the according pom file. When packaging our distro those
modules are added anyhow including the optional dependencies

The initial motiviation to remove the plugin was it is incompatible
with the gradle configuration cache
2022-01-24 15:28:51 +01:00