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
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
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.
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
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.
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
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
- 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
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
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 #74664fixes#74664
- 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
We only need the javaRestTest sourceSet and can avoid main and test sourceSet by
just using the new introduced ElasticsearchJavaBase instead of ElasticsearchJava plugin
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.
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
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.
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.
- 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
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.
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>
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
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
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
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
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.
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