Commit Graph

57 Commits

Author SHA1 Message Date
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
Przemyslaw Gomulka 6b93aff066
[Rest Api Compatibility] Licence accept_enterprise and response changes (#75479)
in #50067 for _license the accept_enterprise = false was no longer supported. This
commit allows it under rest compatibility and is showing enterprise licenses as platinum
The same change had to be applied to _xpack endpoint #58217

in #50735 max_resource_units was introduced to be more accurate. For v7 requests, which do not know about enterprise license we will return max_node which will be set from max_resource_units (it assumes that one resource unit is 32GB - which corresponds to 1 node)

relates #51816
2021-07-27 12:37:15 +02:00
mark-vieira 7a6b6916e0 Fix license check failures on Windows 2021-07-26 17:12:58 -07:00
Przemko Robakowski bbfc6d2a45
Update licenses and attributions for GeoIP module (#75178)
Update licenses and attributions for GeoIP module
2021-07-26 14:16:14 +02:00
Mark Vieira d7f6a1b659
Fix reported branch in build scans for pull request CI jobs (#75600) 2021-07-21 13:40:34 -07:00
Rory Hunter 123a06f588
Enable compiler warnings in x-pack security (#75473)
Part of #40366.
2021-07-21 19:58:39 +01:00
Albert Zaharovits b9bc7a6f3f
Configure security for the initial node cli (#74868)
This introduces a new cmd line tool that generates the security configuration
for a new node in a new cluster (as opposed to joining an existing cluster).
The security configuration consists of TLS key and certificates, which
are stored in a directory inside the config path, as well as settings appended
to the elasticsearch.yml referencing the aforementioned certs.
2021-07-21 07:45:39 +03:00
Jake Landis 4553bf03d5
Remove MavenFilteringHack (#73637) 2021-07-20 17:05:16 -04:00
Przemyslaw Gomulka 2320a38833
[Rest Api Compatibility] Allow transforming warnings per test (#75187)
Warning related transformations missed the possibility to apply per single test only.
Also a warning changed in #67158 for indices.close so this PR also applies the transformation for 7.x test

relates #51816
2021-07-15 10:50:42 +02:00
Jake Landis a7ce8e37ac
Introduce key/value REST test transform (#75193)
This commit introduces replaceValueTextByKeyValue which allows
replacements based on a given key/value pair. This is useful
for REST test transforms that that may not have a well known structure.

This commit also implements this new transform to fix a Watcher compat test.
This commit also fixes a latent bug that would prevent the traversal when multiple
differing transforms matched.
2021-07-12 12:42:01 -05:00
Przemyslaw Gomulka 9bb473427b
[Rest Api Compatibility] Add conditions to InjectHeaders transformation (#75001)
adding a conditions that has to be satisfied in order to apply headers in InjectHeaders.
this will allow to skip the transformation for cat operations
relates #51816
2021-07-07 17:48:06 +02:00
Rene Groeschke cbcb41a332
Fix fips tests for vanilla Test tasks (#74969)
This fixes a regression introduced with #74670.
Vanilla test tasks (of plain type Test) must also dependOn `fipsResources`
when build is run in FIPS mode. Otherwise we see the plain test task failing with

"SHA MessageDigest not available"

Fixes #74922
2021-07-06 16:32:44 +02:00
Rene Groeschke 1db75f75ca
Polish and cleanup test related plugins (#74673)
- avoid eagerly created test cluster
- remove duplicate superflous configuration
- resolve system properties via provider factory
- move common test configuration / setup into rest test base plugin
2021-07-05 10:34:36 +02:00
Rene Groeschke 854661b8bf
Updating Gradle wrapper to version 7.1.1 (#74886) 2021-07-05 03:42:33 -04:00
Rene Groeschke 1ea7e5000e
Fix gradle func tests running in idea (#74811)
* Fix gradle func tests running in idea

* Tweak wrapper task
2021-07-01 05:43:51 -04:00
Mark Vieira 631c313886
Ensure tests that leverage Mockito can be run from the IDE (#74794) 2021-06-30 13:50:58 -07:00
Mark Vieira 8bbba5f8ff
Fix unit test classpath when testing shadow jar projects (#74783) 2021-06-30 12:30:03 -07:00
Mark Vieira 75d8079c37 Update .backportrc.json 2021-06-30 11:21:15 -07:00
Nhat Nguyen 174f65ef82
Upgrade to Lucene 8.9.0 (#74729) 2021-06-30 08:49:53 -04:00
Rene Groeschke d8e4e48a3b
Avoid creating unused test tasks (#74644)
With the overall theme of trying to configure and add less to the build instead of just disabling it later,
we're replacing standalone-test by standalone-rest tasks avoids creating the
unused test tasks.

Standalone rest test plugin and the other rest test plugins behave a little bit different in the sense how source sets and test tasks are wired.

The standalone rest test plugin assumes that all RestTestTasks are using the same sourceSet (test). The yaml, java Rest test plugins use one dedicated sourceSet per test task.

In the long run we probably will migrate standalone-rest-test usages to one of the other plugins and deprecate standalone-rest-test
2021-06-30 14:11:25 +02:00
Rene Groeschke 36ae5ac229
Make test cluster tasks depend on fipsResources when fips enabled (#74670)
The fips specific cluster specification depends on files that are declared
as output of the fips-resources task. So far there has not been an explicit
dependency of all TestClustersAware tasks (so far only for Test tasks) to this
resources task in our build and.

implicit usage of task outputs without any explicit task dependency has been
deprecated in Gradle as the build tool detects that these file are outputs of
this task and urges users to have this  explicit dependency declared in a build.

RestIntegTestTask had this dependencies explicitly declared by us having defined a dependency
by declaring

`tasks.withType(Test) { dependsOn 'fipsResources'}`.

This has be replaced by with this PR by

`tasks.withType(TestClustersAware) { dependsOn 'fipsResources'}`

which also covers usages of `DefaultTestClustersTask` as used in the
`:x-pack:plugin:eql:qa:multi-cluster-with-security` project which
fails in #74664

fixes #74664
2021-06-29 10:36:26 +02: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
Rene Groeschke 54738fc067
Avoid unused sourcesets and tasks in javaRestTest plugin (#74492)
We only need the javaRestTest sourceSet and can avoid main and test sourceSet by
just using the new introduced ElasticsearchJavaBase instead of ElasticsearchJava plugin
2021-06-28 09:54:59 +02:00
Mark Vieira a02e73245e
Clean up build tools dependencies and fix maven coordinates (#74520) 2021-06-24 08:55:21 -07:00
Mark Vieira 17c7c8f6a2
Improve error message when minimum compiler version is not met (#74512) 2021-06-24 08:46:09 -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 c59ea7971b
Introduce ElasticsearchJavaBasePlugin to simplify YamlRestTestPlugin (#74411)
just configuring common conventions on java based projects without
adding opinionated sourcesets. Reduces the configuration overhead for
yaml rest test only projects.

In the end we create less tasks and configure less for test only projects.
2021-06-23 11:36:58 +02:00
Lee Hinman b566abc8f4
Convert node shutdown system property feature flag to setting (#74267)
This converts the system property feature flag 'es.shutdown_feature_flag_enabled' to a regular
non-dynamic node setting. This setting can only be set to 'true' on a snapshot build of
Elasticsearch (not a release build).

Relates to #70338
2021-06-22 12:08:33 -06:00
Rene Groeschke 59fb90487b
Simplify test only project precommit checks (#74172)
we do not need thirdparty check for test only projects
2021-06-22 16:34:07 +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
Rory Hunter 7ab0735054
Add .editorconfig options for gradle and groovy files (#74286)
Add more IntelliJ config to `.editorconfig` for formatting `.gradle`
and `.groovy` files. This formatting isn't enforced, but is broadly
in line with our Spotless config. This work is helpful is useful
because the Eclipse Groovy formatter that Spotless can use doesn't
give us good results.
2021-06-21 20:50:05 +01: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
Rory Hunter a5d2251064
Order imports when reformatting (#74059)
Change the formatter config to sort / order imports, and reformat the
codebase. We already had a config file for Eclipse users, so Spotless now
uses that.

The "Eclipse Code Formatter" plugin ought to be able to use this file as
well for import ordering, but in my experiments the results were poor.
Instead, use IntelliJ's `.editorconfig` support to configure import
ordering.

I've also added a config file for the formatter plugin.

Other changes:
   * I've quietly enabled the `toggleOnOff` option for Spotless. It was
     already possible to disable formatting for sections using the markers
     for docs snippets, so enabling this option just accepts this reality
     and makes it possible via `formatter:off` and `formatter:on` without
     the restrictions around line length. It should still only be used as
     a very last resort and with good reason.
   * I've removed mention of the `paddedCell` option from the contributing
     guide, since I haven't had to use that option for a very long time. I
     moved the docs to the spotless config.
2021-06-16 09:22:22 +01:00
Mark Vieira 1f1c8b0019
Move custom checkstyle rule implementations to build-conventions project (#74017) 2021-06-10 16:06:44 -07:00
Tanguy Leroux 559c4e6ef4
Apply spotless formatting to more sub-projects (#73989) 2021-06-10 11:24:44 +02:00
Rory Hunter 1afe4b9143
Apply Spotless to snapshot/repo packages in server (#71560)
Adds a Spotless opt-in for certain packages in `:server`, and opts-in
the packages related to snapshots & repositories.

Co-authored-by: David Turner <david.turner@elastic.co>
2021-06-10 08:58:39 +01:00
Ryan Ernst ab1a2e4a84
Add precommit task for detecting split packages (#73784)
Modularization of the JDK has been ongoing for several years. Recently
in Java 16 the JDK began enforcing module boundaries by default. While
Elasticsearch does not yet use the module system directly, there are
some side effects even for those projects not modularized (eg #73517).
Before we can even begin to think about how to modularize, we must
Prepare The Way by enforcing packages only exist in a single jar file,
since the module system does not allow packages to coexist in multiple
modules.

This commit adds a precommit check to the build which detects split
packages. The expectation is that we will add the existing split
packages to the ignore list so that any new classes will not exacerbate
the problem, and the work to cleanup these split packages can be
parallelized.

relates #73525
2021-06-08 15:04:23 -07:00
Mark Vieira 3ee8f7dfc4
Bump minimumCompilerVersion to Java 16 (#73913) 2021-06-08 11:35:17 -07:00
Ryan Ernst 68817d7ca2
Rename o.e.common in libs/core to o.e.core (#73909)
When libs/core was created, several classes were moved from server's
o.e.common package, but they were not moved to a new package. Split
packages need to go away long term, so that Elasticsearch can even think
about modularization. This commit moves all the classes under o.e.common
in core to o.e.core.

relates #73784
2021-06-08 09:53:28 -07:00
Rene Groeschke a420da886a
Revert "Fix java compatibility for build-tools-internal (#73897)"
This reverts commit e65577284b.
2021-06-08 17:27:19 +02:00
Rene Groeschke 9bb8f788a7
Ignore InternalTestRerunPluginFuncTest for now 2021-06-08 16:54:01 +02:00
Rene Groeschke e65577284b
Fix java compatibility for build-tools-internal (#73897)
This was accidentally set to 15.

should be 11 not 15 taken from the minimumRuntimeVersion file and not from minimumCompilerVersion
this also fixes the checkstyle ides setup
2021-06-08 16:00:36 +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
Rene Groeschke c80004aa9b
Remove debugging output 2021-06-08 08:11:25 +02:00
Rene Groeschke da86c9d30b
Ensure minimum compiler version is picked when running bwc builds (#73868)
Fixes the picking of minimum compiler versions for bwc builds after we renamed
buildSrc to build-tools-internal.
2021-06-08 08:06:58 +02:00
Ryan Ernst f98b374cf6
Revert "Upgrade Azure SDK and Jackson (#72833) (#72995)" (#73837)
The recent upgrade of the Azure SDK has caused a few test failures that
have been difficult to debug and do not yet have a fix. In particular, a
change to the netty reactor resolving
(https://github.com/reactor/reactor-netty/issues/1655). We need to wait
for a fix for that issue, so this reverts commit
6c4c4a0ecb.

relates #73493
2021-06-07 10:20:46 -07:00
Mark Vieira 0e5c3fc515 Temporarily mute build-tools integration test 2021-06-07 08:55:44 -07:00
Ryan Ernst bb12fd526b
Apply spotless to java projects (#73808)
In preparation for formatting the enitre Elasticsearch codebase,
spotless was added for all projects using the BuildPlugin, with an
explicit list of existing projects ignored. This ensured new projects
would use spotless from the start. However, after that change, the
ElasticsearchJavaPlugin was added, which subsumed much of the
functionality of the BuildPlugin. Unfortunately this means that many new
java projects (mostly for tests) were added without auto formatting.

This commit adds spotless to all Elasticsearch java projects, adding
those projects that were missed to the ignore list. These can be
migrated separately or as part of the big migration when 8.x is cut.
2021-06-07 08:22:40 -07: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
Rene Groeschke c2135844f0
Fix minimum compiler version reading for bwc tasks on 7.x 2021-06-07 17:08:54 +02:00