Commit graph

190 commits

Author SHA1 Message Date
Mark Vieira
4ff1962ecb
Support additional version schemes in relaxed mode (#81010) 2021-11-24 13:02:00 -08:00
Mark Vieira
c6cdbf8686
Fix references to moved classes in plugin examples (#80736) 2021-11-15 13:03:23 -08:00
David Turner
e8d8b129ae
Upgrade JNA to 5.10.0 (#80617)
This commit upgrades JNA to 5.10.0. The primary reason for this upgrade
is to adopt a newer version of `libffi` which supports the
`LIBFFI_TMPDIR` environment variable so that we can change the location
of temporary executables and resolve #77014.

This commit also switches to the upstream JNA releases rather than using
the specially-repackaged ones we've used in the past.
2021-11-11 07:20:09 +00:00
David Turner
8cf4c7b6fb
Remove last few mentions of Zen discovery (#80410)
We have a few leftover mentions of `zen` discovery, mostly for
historical/BwC reasons, which this commit removes.

Prior to this commit the default value for `discovery.type` was `zen`
but this was not written down anywhere or officially supported: the two
options were to set it to `single-node` or to omit it entirely. This
commit changes the default to `multi-node` and documents this.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-11-09 09:52:06 +01:00
Rene Groeschke
92e8ba2e74
Check for multiple javadocs in java headers (#79603)
We also now enforce to have the license statement on the very top of the java file before 
the package declaration

Fixes #79235
2021-10-29 08:32:11 +02:00
Mark Vieira
8f1204c507
Update BWC version logic to adapt to removal of M.x branch (#79521)
Going forward we will no longer maintain an `M.x` branch which is
intended to be the next minor version where `master` is always `M+1`.
This simplifies a lot of our logic to no longer care much about major
vs minor version.
2021-10-20 09:23:33 -07:00
Przemyslaw Gomulka
4eaae7bad7
Set Auto expand replica on deprecation log data stream (#79226)
In order to prevent cluster to be in yellow state when starting up only
one node - often when testing or trying things - autoexpand should be
set on that data stream

Also to making sure the deprecation log indexing is disabled on all
nodes in mixed-cluster and rolling upgrade

relates #78991
2021-10-15 15:38:37 +02:00
Mark Vieira
7aaf01c5f2
Ensure modules extending x-pack modules properly configure test clusters (#79176) 2021-10-14 13:14:03 -07:00
Mark Vieira
cff383f22b
Allow for debugging of rest test clusters during test execution (#79085) 2021-10-14 12:48:45 -07:00
Mark Vieira
8916213d8b
Separate minimum compiler and runtime Java version properties (#79108) 2021-10-14 11:09:25 -07:00
Rory Hunter
62d2df4f6a
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 09:38:06 +01:00
Przemyslaw Gomulka
e287cd6051
Deprecation logs indexing is enabled by default (#78991)
Changing the default for deprecation log indexing to be true.
This commit also overrides this default to tests where a deprecation
data stream would interfere - because it uses index template, it would
not be possible to delete with _index_template/*.
The overrides should be removed when #78850 is done.

closes #76292
2021-10-13 09:49:12 +02:00
Rene Groeschke
2e69f6d820
Simplify TestCluster extraJar configuration (#78837)
Allow passing FileCollection instead of single Jar files. This makes using the API way easier
as gradle configurations for resolving jars do not need to be resolved eagerly
2021-10-11 10:16:03 +02:00
Rene Groeschke
f16a6990bb
Wrap VersionPropertiesLoader in a BuildService to decouple build logic projects (#78704)
By using a BuildService we can decouple the configuration of projects but keep making
expensive operations (e.g. parsing properties file or reading minimumJavaCompiler from file) only once
per build.

This bring us closer to decouple projects and get ultimatively configuration cache compliant. In
general we will bring in more BuildServices for the main build to follow along that Pattern and
ultimatevely remove usages of allprojects and subprojects in our build.
2021-10-07 18:00:21 +02:00
Rene Groeschke
dd4e4c3ab9
Simplify build plugin license handling (#77009)
- Use file property and conventions to avoid afterEvaluate hook
- Simplify root build script
- One little step closer to configuration cache compliance
2021-10-07 13:01:24 +02:00
Mark Vieira
897485667a
Remove special handling for Azul JDKs in the build (#78281) 2021-09-27 12:29:10 -07:00
Rene Groeschke
6ef13abe81
Do not create unused testCluster (#77581)
* Do not create unused testCluster

This avoids creating test clusters that are not required during the build.
We use lazy configuration here on testClusters and only instantiate them as theyre

* Do not fail on run task (debug)

* Create more test cluster lazy

* Make more test cluster lazy

* Avoid creating unused testcluster

* Fix PluginBuildPlugin

* Fix disabling geo db download

* Fix cluster setup in repository-multi-version

* Polishing

* Fix issue with irretic groovy ogic

* Fix bwc tests

* Fix more bwcTests

* Fix more bwc tests

* Fix more bwc tests

* Fix more bwc tests

* Fix typo

* Minor polishing

* Fix rolling upgrade tests

* Fix cluster config in sql qa mixedcluster project

* Fix more bwc tests

* Clean up before review

* Document test cluster usage

* Api polising after Review

provide useCluster(Provider) method to TestClusterAware

Ideally we take this a step further and realize those test clusters only on use.
But out of scope of this PR.

* Allow gradle provider as value for nonSystemProperties

* Some simplification on test configuration

* Fix typo in rest test config

* Fix more typos

* Fix another typo

* Fix more typos
2021-09-23 03:45:59 -04:00
Mark Vieira
979f297f12
Isolate example plugins projects from main Elasticsearch build (#78140) 2021-09-22 12:01:26 -07:00
Ioannis Kakavas
ad5c782f9c
Add xpack core and security to INTEG TEST (#77632)
This change makes it so x-pack-core and x-pack-security are bundled
in the INTEG TEST distribution that we use for testClusters in our
tests. There are two reasons for this:

- In https://github.com/elastic/elasticsearch/pull/77231 where we
are looking into enabling and auto-configuring security by default
for all nodes, we need to call out to ConfigInitialNode to
determine whether we should do the auto-configuration or not.
- Since we are enabling security by default, we should be looking
into enabling security for all for our tests moving forward, or
at least make a conscious decision about which ones run without
security. This change is a step towards that direction.
2021-09-21 08:18:41 +03:00
Mark Vieira
2393eaf6df
Introduce external build-tools JavaRestTestPlugin (#77603)
* Add external build tools JavaRestTestPlugin

* Fix integration test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-09-13 14:10:22 -04:00
Rene Groeschke
93f36077f1
Simplify test build output normalization (#77172)
* Simplify test build output normalization
2021-09-03 12:22:28 +02:00
Rene Groeschke
5ffada50f6
Fix YamlRestTestPluginFuncTest on Windows (#77063)
* Fix YamlRestTestPluginFuncTest on Windows

- need to normalize output before comparison
- should fix #77060

* Minor cleanup after review
2021-09-01 04:16:28 -04:00
Rene Groeschke
35ec6f348c
Introduce simple public yaml-rest-test plugin (#76554)
This introduces a basic public yaml rest test plugin that is supposed to be used by external 
elasticsearch plugin authors. This is driven by #76215

- Rename yaml-rest-test to intern-yaml-rest-test
- Use public yaml plugin in example plugins

Co-authored-by: Mark Vieira <portugee@gmail.com>
2021-08-31 08:45:52 +02:00
Rory Hunter
a6f2a4df8b
Introduce Cloud docker variant (#74980)
Closes #74795.

Introduce two Docker image variants for Cloud. The first bundles
(actually installs) the S3, Azure and GCS repository plugins. The
second bundles all official plugins, but only installs the repository
plugins.

Both images also bundle Filebeat and Metricbeat.

The testing utils have been refactored to introduce a `docker`
sub-package. This allows the static `Docker.containerId` to be
shared without needing all the code in one big class. The code for
checking file ownership / permissions has also been refactored to
a more Hamcrest style, using a custom Docker file matcher.
2021-08-20 20:11:05 +01:00
Ryan Ernst
96627dfa14
Remove quota-aware-fs plugin (#76352)
The quota aware filesystem was added as a means of allowing
Elasticsearch to track the used space of the underlying filesystem in
virtualized environments. However, the need for it was due to a bug in a
much earlier version of Elasticsearch that always found the underlying
mount and checked it directely for usage. That bug has already been
fixed, so the there is no longer a need for this plugin. This commit
removes the plugin. We should consider separately whether there is still
a need for bootstrap plugins.

closes #70309
2021-08-11 15:12:50 -07:00
Rene Groeschke
9ab4ef45a4
Remove reaper debug output (#76285)
Remove superflous println statement
2021-08-10 08:49:29 -04:00
Rene Groeschke
b323726ebd
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.
2021-08-09 09:39:30 +02:00
Rene Groeschke
09260570b9
Introduce Gradle plugin for setup gradle test security policies (#76167)
Test execution hangs when building Elasticsearch plugins and extending ESTestCase

fixes #76136
2021-08-05 20:56:52 +02:00
Rory Hunter
f34d9adc49
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:09:58 +01:00
Rene Groeschke
27d6d51d3c
Remove usage of deprecated JavaPluginConvention (#75106)
this has been deprecated and will be removed in Gradle 8.0. We use
JavaPluginExtension instead from now on.
2021-07-27 11:18:50 -04:00
Rene Groeschke
c328cb7555
Fix task dependency wiring for multi node test clusters (#74692)
* Fix task dependency wiring for multi node test clusters

for multi node test cluster configurations we accidentally miss calculating the proper
task dependencies in TestClusterAware. This moves the task dependency declaration
in TestClusterAware to use the live collection method nodes#all instead of nodes.forEach
which will also take nodes into account that are added later to the cluster _after_
this configuration block is triggered.

* Fix duplicate lines
2021-06-30 04:30:48 -04:00
Rene Groeschke
4ab100b7be
Cleanup root build script (#74183)
- 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 11:15:24 +02:00
Mark Vieira
a02e73245e
Clean up build tools dependencies and fix maven coordinates (#74520) 2021-06-24 08:55:21 -07:00
Rene Groeschke
7df3771a2c
Simplify applying build tools conventions (#73877)
Share common conventions for build tools in one plugin.
e.g. we always apply the license headers check for build tools too
2021-06-23 11:44:49 +02:00
Rene Groeschke
e08d117f46
Remove BuildParams.isInternal (#74329)
After breaking up build logic between internal and external we can remove BuildParams.isInternal().
We also resolve bwc versions lazy and not eagerly. This makes configuration of non bwc builds easier and
also makes integration tests easier to setup.
2021-06-22 09:24:59 +02:00
Rene Groeschke
c2e86258d8
Update wrapper to 7.1 (#73941)
- 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 10:59:22 +02:00
Rene Groeschke
6ff0b1b56a
Fix eclipse for build tools (#73699)
apply common eclipse config to all projects across the elasticsearch workspace 
including build tools projects
2021-06-08 15:26:21 +02:00
Ryan Ernst
64054de1ac
Rename bootstrap package in core jar (#73788)
The org.elasticsearch.bootstrap package exists in server with classes
for starting up Elasticsearch. The elasticsearch-core jar has a handful
of classes that were split out from there, namely java version parsing
and jarhell. This commit moves those classes to a new
org.elasticsearch.jdk package so as to not split the server owned
bootstrap package.

relates #73784
2021-06-07 08:14:44 -07:00
Mark Vieira
7bbd3113fa
Use production-similar GC settings for internal cluster tests (#73701) 2021-06-02 16:12:29 -07:00
Rene Groeschke
b2a183baf0
Move public build api into included build (#72861)
This moves the public build api and plugins into a separete included build called 'build-tools' 
and we removed the duplication of included buildSrc twice (2nd import 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-01 11:19:30 +02:00