Commit graph

499 commits

Author SHA1 Message Date
Mark Vieira
0486bbfb96
Update verifyVersion task after #106143
(cherry picked from commit 392a7599c1)
2024-03-27 15:37:40 -07:00
Mark Vieira
666e8f1c6f
Reduce BWC testing to include only latest patch releases (#106143)
This commit alters our backward compatibility testing logic to restrict
testing to the latest patch release for any given minor version. Since
our policy is not to do any kind of breaking changes in patches, most of
this testing is superfluous. This change reduces the number of versions
we need to test by over 70%.

(cherry picked from commit b1e4407c0a)
2024-03-27 15:37:36 -07:00
Mark Vieira
af40285c68
Fix 'functionalTests' task 2024-03-25 08:57:54 -07:00
Brian Seeders
6f2d188208
[ci] Refactor BWC templating in Buildkite pipelines to handle more scenarios (#106084) (#106098)
(cherry picked from commit 6f8280c12a)
2024-03-14 16:46:11 -04:00
Rene Groeschke
a080bb2bbe
[7.17] Update gradle wrapper to 8.3 (#97838) (#100715)
* Update gradle wrapper to 8.3 (#97838)

Gradle now fully supports compiling, testing and running on Java 20.
Among other general performance improvements this release introduces --test-dry-run command line option that allows checking if tests are filtered or not by gradle.
Required updating nebula ospackage plugin as setuid was broken in gradle 8.3.

(cherry picked from commit b23e000c30)

# Conflicts:
#	build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/LegacyYamlRestCompatTestPluginFuncTest.groovy
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaModulePathPlugin.java
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/compat/compat/AbstractYamlRestCompatTestPlugin.java
#	build-tools-internal/src/main/resources/minimumGradleVersion
#	gradle/verification-metadata.xml
#	gradle/wrapper/gradle-wrapper.jar
#	gradlew
#	x-pack/plugin/watcher/qa/with-monitoring/src/javaRestTest/java/org/elasticsearch/smoketest/MonitoringWithWatcherRestIT.java

* [7.17] Use patched nebula os package gradle plugin

* Update testingconvention precommit integ test
2023-10-16 06:18:08 -04:00
Mark Vieira
9f8f12d395
Disable BWC tests in encryption at rest CI job (#100784) (#100787) 2023-10-12 20:02:06 -04:00
Mark Vieira
69e8625dcf
Exclude BWC tests in platform support testing matrix (#100643) (#100702)
# Conflicts:
#	.buildkite/pipelines/periodic-platform-support.yml
2023-10-11 12:56:47 -04:00
Rene Groeschke
2a99b1d27c
Remove debug gradle output (#99959) 2023-09-27 18:34:52 +02:00
Rene Groeschke
5afd06ae57
[7.17] Update Gradle Wrapper to 8.2 (#96686) (#97484)
* 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-09-27 08:46:44 +02:00
Brian Seeders
efbbf693be
[7.17] [buildkite] Migrate intake pipeline (#99133) (#99273) 2023-09-06 17:26:38 -04:00
Brian Seeders
764793bd3a
[7.17] [buildkite] Add most of the remaining periodic pipelines (#98043) (#99262) 2023-09-06 15:28:14 -04:00
Mark Vieira
8d40b1ad93
Avoid building test fixtures when building release artifacts (#94200) (#94203)
We don't want to build test fixture projects when building our release
artifacts.
2023-02-28 13:44:07 -05:00
Rene Groeschke
1744a57312
Revert "[7.17] Update to Gradle 7.6 (#89796) (#92235)"
This reverts commit fc43f0105c.
2022-12-20 12:30:21 +01:00
Rene Groeschke
fc43f0105c
[7.17] Update to Gradle 7.6 (#89796) (#92235)
* Fix TestResultProcessor api changes
* Fix inputs for generateProviderManifest
* Ignore tests for now until gradle has fixed reporting issue
* Fix dependency substitution in example plugins build
* Use right java bin path on windows
* Add hint to task onlyif when no docker is available
2022-12-08 16:48:35 +01:00
Rene Groeschke
98d18185ae
[7.17] Setup elasticsearch dependency monitoring with Snyk for production code (#88036) (#88223)
Backports the following commits to 7.17:
 - Setup elasticsearch dependency monitoring with Snyk for production code (#88036)
2022-07-04 08:36:35 +02:00
Ryan Ernst
ab77b5184a
Use all lucene index compatible versions for bwc version generation (#87133) (#87470)
* Use all lucene index compatible versions for bwc version generation (#87133)

The updateCIBwcVersions task regenerates the list of versions that are
tested in CI. This task internally calls a filter method which filters
out incompatible versions for the local system. That means it can change
depending on the type of system the task is run on. This commit adds a
new variant of the internal method to return all actual index compatible
versions, and renames the existing method to make it clear it is for
running actual tests on the local system.

* spotless
2022-06-07 14:37:52 -04:00
Rene Groeschke
506c08aab6
[7.17] Port javadoc configuration logic into a binary plugin (#86471) (#86593)
* 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
# Conflicts:
#	build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/fixtures/AbstractRestResourcesFuncTest.groovy
#	build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/InternalYamlRestTestPluginFuncTest.groovy
#	build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/YamlRestCompatTestPluginFuncTest.groovy
#	build-tools/src/integTest/groovy/org/elasticsearch/gradle/TestClustersPluginFuncTest.groovy
#	build-tools/src/testFixtures/groovy/org/elasticsearch/gradle/fixtures/AbstractGradleFuncTest.groovy

* Fix merge conflicts for backporting
2022-05-10 06:14:55 -04:00
Mark Vieira
690e1dbf7a
Remove usages of elasticsearch.build plugin in non-production projects (#84961) (#84964)
(cherry picked from commit dc3d3b5e12)
2022-03-15 09:55:44 -07:00
Mark Vieira
eba3ecb4b9
Add CI matrix configuration for snapshot BWC versions (#83990) (#83999)
# Conflicts:
#	build.gradle
2022-02-15 18:17:44 -05:00
Rene Groeschke
4de3fb5eaf
Remove usage of deprecated Provider#forUseAtConfigurationTime (#83932) (#83947)
Remove gradle api usage that has been deprecated with Gradle 7.4
2022-02-15 16:45:24 +01:00
Rene Groeschke
a545e86588
Update gradle wrapper for plugin examples (#81435) (#81446) 2021-12-07 11:02:46 -05:00
Mark Vieira
db23d45348
Don't apply the spotless plugin to non-applicable projects (#80679) (#80681)
This is an attempt at resolving, or at least reducing the prevalence of
#77837. A more robust solution is probably required, but this should
help reduce this problem since we now apply spotless to about 90 fewer
subprojects.
2021-11-11 19:08:21 -05:00
Mark Vieira
2d5eea6011
Skip building of BWC distributions when building release artifacts (#79180) (#79287) 2021-10-15 15:29:57 -04:00
Rory Hunter
562440a950 Format build-tools and build-tools-internal (#78910)
Our spotless configuration wasn't being applied to `build-tools`
and `build-tools-internal`. Move the Spotless configuration to a
Java plugin in `build-conventions`, and apply it everywhere.

This resulted in a lot more Java files being subject to formatting,
so I added more exclusions to the list.

Also remove the `paddedCell` stuff, we've never needed it.
2021-10-14 10:08:46 +01:00
Rene Groeschke
09dc4a4c60
Wrap VersionPropertiesLoader in a BuildService to decouple build logic projects (#78704) (#78842)
Backporting #78704 to 7.x
2021-10-11 09:42:27 +02:00
Rene Groeschke
736a1255c9
Simplify build plugin license handling (#77009) (#78820)
- Use file property and conventions to avoid afterEvaluate hook
- Simplify root build script
- One little step closer to configuration cache compliance
2021-10-07 14:39:18 +02:00
Rene Groeschke
d7c7eaef8b
[7.x] Fix system property resolution at configuration time (#78682)
* Resolve system properties in build scripts via provider factory (#76199)

This allows tracking system properties used in the build configuration and brings us
one step closer to be gradle configuration cache compliant.

* Fix system property resolution at configuration time (#78669)

This fixes system property resolution when running the build with --configuration-cache

One step closer to make use of configuration cache
2021-10-05 07:33:13 -04:00
Mark Vieira
76733d92ee
Remove example-plugins included build (#78408) (#78420) 2021-09-28 15:31:09 -07:00
Mark Vieira
9f0d94e6a1
[7.x] Isolate example plugins projects from main Elasticsearch build (#78140) (#78222) 2021-09-22 17:04:00 -07:00
Rene Groeschke
194fafc582
Auto backport java util Map / Set / List of methods (#76038)
This introduces the infrastructure for auto backporting source to java 8 compatibility code by using the rewrite library (https://github.com/openrewrite/). We introduce a custom rewrite plugin as the original rewrite plugin uses tons of deprecated api and non efficient gradle api. Also we introduce a rewrite task per project rewrite task makes error analysis easier IMO.

We have the configuration of the backporting in a rewrite.yml file that contains three types of backports

java.util.Map.of(...) to org.elasticsearch.core.Map(...)
java.util.List.of(...) to org.elasticsearch.core.List(...)
java.util.Set.of(...) to org.elasticsearch.core.Set(...)
The configuration uses custom rules I wrote (https://github.com/breskeby/java-recipes) as the build-in rewrite rules shipped or provided with rewrite do not provide proper handling of dealing with classes of the same name but different package. These rules are resolved from maven central.

An example of how all this backporting works in action can be seen in the functional test provided as part of this PR.
2021-09-21 17:15:45 +02:00
Rene Groeschke
6148ee816e
Update spotless plugin to contain race condition fix (#78062) (#78066)
5.15.1 contains a fix for our reported race conditition bug raised at
https://github.com/diffplug/spotless/issues/941

Fixes #77837
2021-09-21 05:45:42 -04:00
Rene Groeschke
8eb448dc2c
Update spotless gradle plugin to 5.15.0 (#78001) (#78002)
This update spotless to the latest release
2021-09-20 08:52:36 -04:00
Mark Vieira
8bbdb2ccd7
Include build-tools in release artifacts 2021-09-09 11:36:36 -07:00
Mark Vieira
0115f06550 Add explicit lifecycle task for release builds (#77458)
Our release pipeline is getting increasingly complex. This is leading
to lots of issues with tasks "leaking" into those builds causing
issues. We rely currently on `assemble` as the task to "build
everything", which it is, but we don't necessarily want to build
_everything_ in our release pipeline in a single go.

This change introduces an explicit task to be used by our
release builds which filters out ML and Docker build as those are
doing in separate release stages. As necessary going forward we
should tweak the dependencies here, instead of making our release
configuration more and more fragile.
2021-09-09 09:42:39 +01:00
Ryan Ernst
09030c4fd6
Re-enable bwc tests 2021-08-19 13:03:14 -07:00
Ryan Ernst
973b39bd41
Add license family attribute to feature usage tracking (#76622) (#76721)
The feature usage tracking data currently contains an opaque "name"
attribute which identifies the feature that was used. This name needs to
be unique enough that certain features can be identified independently
of others. For example, distinguishing machine learning jobs from
trained models. Yet both those examples are all "machine learning".

This commit adds a "family" attribute so that similar tracked features
can be grouped together. The output format of the feature usage api is
essentially the same; it is still a flat list of features and their last
used times. The family attribute can be used on the receiving end to
group many features.
2021-08-19 13:02:29 -07:00
Mark Vieira
e4ef3d416a
Remove unused build script extra property (#76324) (#76327)
# Conflicts:
#	build.gradle
2021-08-10 19:10:07 -04:00
Rory Hunter
a0a39ba989 New release notes generator tasks (#71125)
Part of #67335.

Add tasks for generating release notes, using information stored in files
in the repository:

   * `generateReleaseNotes` - generates new release notes, release
     highlights and breaking changes
   * `validateChangelogs` - validates that all the changelog YAML files are
     well-formed (confirm to schema, have required fields depending on the
     `type` value)

I also changed `Version` to allow a `v` prefix in relaxed mode
2021-07-28 12:11:15 +01:00
elasticsearchmachine
d96bd54636
Fix gradle func tests running in idea (#74811) (#74818)
* Fix gradle func tests running in idea

* Tweak wrapper task

Co-authored-by: Rene Groeschke <rene@elastic.co>
2021-07-01 07:16:22 -04:00
Rene Groeschke
92eeda84d8
Cleanup root build script (#74183) (#74616)
- No manual show task dependencies logic needed. we can use build scans instead for that.
- Move common plugin configuration into according plugins
- Reduce overall callbacks in root script, remove unneeded logic in afterEvaluate hooks
2021-06-28 17:19:25 +02:00
Rene Groeschke
ea25762038
Update wrapper to 7.1 (#73941) (#74225)
- Fix new introduced deprecated usages
- Update to newer ospackage snapshot to include provided PR for fixing deprecated usage

This gradle release comes with improvements on incremental compilation which we should benefit from
2021-06-17 17:01:21 +02:00
Rene Groeschke
f5ec26d891
Revert "Revert "Fix eclipse for build tools (#73699) (7.x backport) (#73904)""
This reverts commit edd9597968.
2021-06-09 21:30:22 +02:00
Mark Vieira
edd9597968 Revert "Fix eclipse for build tools (#73699) (7.x backport) (#73904)"
This reverts commit 3799abc9
2021-06-08 18:41:40 -07:00
Rene Groeschke
3799abc912
Fix eclipse for build tools (#73699) (7.x backport) (#73904)
apply common eclipse config to all projects across the elasticsearch workspace
including build tools projects
2021-06-08 16:35:04 +02:00
Rene Groeschke
ea641cd359
Move public build api into included build #72861 (7.x backport) (#73715)
backport of #72861 to 7.x branch

This moves the public build api and plugins into a separete included build called 'build-tools' and we remove the duplication of included buildSrc twice (as build-tools).

The elasticsearch internal build logic is kept in build-tools-internal as included build which allows us better handling of this project that its just being an buildSrc project (e.g. we can reference tasks directly from the root build etc.)

Convention logic applied to both projects will live in a new build-conventions project.
2021-06-07 15:56:21 +02:00
Rene Groeschke
7c3630989d
Remove internal build logic from public build tool plugins (#72470) (7.x backport) (#72832)
back porting #72470 to 7.x
Extract usage of internal API from TestClustersPlugin and PluginBuildPlugin and
related plugins and build logic

This includes a refactoring of ElasticsearchDistribution to handle types
better in a way we can differentiate between supported Elasticsearch
Distribution types supported in TestCkustersPlugin and types only supported
in internal plugins.

It also introduces a set of internal versions of public plugins.

As part of this we also generate the plugin descriptors now.

As a follow up on this we can actually move these public used classes into
an extra project (declared as included build)

We keep LoggedExec and VersionProperties effectively public And workaround for RestTestBase
2021-06-03 12:43:40 +02:00
Mark Vieira
8ee7d9b39d
Fix Spotless failing with InvocationTargetException on JDK 16 (#73246) (#73390)
Co-authored-by: Rene Groeschke <rene@elastic.co>
2021-05-25 13:32:43 -07:00
Rene Groeschke
d93f8b524c
Disable Test rerun plugin (#72831)
* Disable Test rerun plugin

We disable this plugin for now as there are issues we need to shake out
See #72169 and #72818

* Tweak rerun build scan configuration
2021-05-06 23:11:51 +02:00
Rene Groeschke
973df563fa
Port gradle script plugins to precompiled script plugins (7.x backport) (#72447)
backports #72361 to 7.x branch

Script plugins cannot apply plugins and therefore wont work with porting
buildSrc to an included build as we plan. Therefore we take advantage
of moving our script plugins into precompiled script plugins.

As a limitation of this we ran into problems applying binary plugins
from script plugins and for now moved this out of those scripts.
2021-04-29 15:10:14 +02:00
Rene Groeschke
59126ea871
Restructure buildsrc restructure buildsrc (7.x backport) (#72315)
backports #72030 to 7.x

Related to #71593 we move all build logic that is for elasticsearch build only into
the org.elasticsearch.gradle.internal* packages

This makes it clearer if build logic is considered to be used by external projects
Ultimately we want to only expose TestCluster and PluginBuildPlugin logic
to third party plugin authors.

This is a very first step towards that direction.
2021-04-28 08:52:56 +02:00