Commit Graph

359 Commits

Author SHA1 Message Date
Yoann Rodière 841ac8e43a
Upgrade Apache Commons Logging to 1.2 (#85745)
* Upgrade to Apache Commons Logging 1.2 (#40305)
* Clarify that Apache HTTP/commons-* dependencies are not just for tests
2022-08-10 13:19:15 -04:00
Mark Vieira 398b0147a7
Upgrade Gradle wrapper to 7.5.1 (#88918) 2022-08-08 12:34:58 -07:00
Mark Vieira 2c79925cf2
Add missing dependency verification checksums (#89139) 2022-08-05 08:38:35 -07:00
Rene Groeschke 3909b5eaf9
Add verification metadata for dependencies (#88814)
Removing the custom dependency checksum functionality in favor of Gradle build-in dependency verification support. 

- Use sha256 in favor of sha1 as sha1 is not considered safe these days.

Closes https://github.com/elastic/elasticsearch/issues/69736
2022-08-04 09:51:16 +02:00
Mark Vieira 9e9f19bc9c Further attempt at capturing reaper error logs 2022-08-02 14:47:53 -07:00
Ignacio Vera ed564f6e1d
Update lo lucene-9.3.0 (#88927) 2022-08-01 07:21:13 +02:00
Mark Vieira f32c8224b2 Improve capturing of reaper failure logs 2022-07-29 09:20:24 -07:00
Rory Hunter be4d809b39
Add generateStubReleaseNotes task (#88933)
When we feature freeze Elasticsearch, we need to create stub
documentation for the next version. This turns out to be as simple as
running the usual `generateReleaseNotes` task without any inputs.
2022-07-29 11:27:11 +01:00
Mark Vieira d2c52ef495
Split x-pack testing into multiple CI jobs (#88697) 2022-07-27 12:58:31 -07:00
Mark Vieira da23ff057c Bump to version 8.5.0 2022-07-27 07:58:54 -07:00
Rory Hunter 0df14382b9
Add Checkstyle rule for broken switch cases (#88739)
We use `between(x, y)` calls with `switch` statements in tests to
randomize test behaviour. However, some usages define `case` statements
that can never execute, because the `case` value is outside the range
defined by the `between` call.

Write a rule that inspects the switches and the cases, and fails on the
broken cases. This rule checks `between`, `randomIntBetween` and
`randomInt`.
2022-07-27 09:22:06 +01:00
Mark Vieira 5e82c228b3
Update references to master branch in build benchmark configuration (#88787) 2022-07-26 09:51:42 -07:00
Ignacio Vera 3b7f393a82
Upgrade to lucene snapshot lucene-9.3.0-snapshot-b8d1fcfd0ec (#88706) 2022-07-22 11:22:39 +02:00
Mark Vieira 0b8335038e Add "Vector Search" area to changelog schema 2022-07-21 10:52:08 -07:00
Rory Hunter d18eff813f
Upgrade to OpenJDK 18.0.2+9 (#88675)
Closes #88673.
2022-07-21 12:42:36 +01:00
Rene Groeschke 160b14fbb1
Remove random runner from build tools (internal) tests (#88577)
This removes unrequited overhead for writing build tool and build tool internal tests and mechanically ports all junit3 tests to junit4.
2022-07-20 08:04:26 +02: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 48d3063791
Remove duplicate definition of checkstyle version in use (#88339)
We only rely on the checkstyle version in the buildLibs.toml gradle version catalogue with this change.
Also added some hints for gradle best practices.

This is an aftermath of #88283
2022-07-15 19:31:50 +02:00
Rene Groeschke 1630608ad0
Setup periodic snyk monitoring per branch (#88522)
Adds a new ci Jenkins job configuration for running snyk dependency monitoring on a daily basis. We setup a service account in snyk and resolve the api token for publishing in vault.

Related to #87620
2022-07-15 16:22:55 +02:00
Chris Hegarty 810736519f
Always close directory streams (#88560) 2022-07-15 08:49:16 +01:00
Rene Groeschke dbf39741a0
Make LoggedExec gradle task configuration cache compatible (#87621)
This changes the LoggedExec task to be configuration cache compatible. We changed the implementation
to use `ExecOperations` instead of extending `Exec` task. As double checked with the Gradle team this task
is not planned to be made configuration cache compatible out of the box anytime soon.

This is part of the effort on https://github.com/elastic/elasticsearch/issues/57918
2022-07-11 08:46:54 +02:00
Mark Vieira 75b7fbda39
Remove unused InternalPlugin interface (#88330) 2022-07-07 09:14:16 -07:00
Nhat Nguyen bd69f90fff
Upgrade to Lucene-9.3.0-snapshot-2d05f5c623e (#88284)
To include LUCENE-10620 - which passes Weight to Collector
2022-07-06 16:16:03 -04:00
Rene Groeschke 4c7ed5fc9f
Reenable TestingConventionsPrecommitPluginFuncTest on windows (#88240)
Addressing #87913 by fixing LocalRepositoryFixture on windows
2022-07-04 13:58:53 +02:00
Chris Hegarty 453f12c72d
Upgrade to Log4J 2.18.0 (#88237) 2022-07-04 11:30:38 +01:00
Rene Groeschke 90fe732024
Allow easing testing of java ea versions using gradle java tool chain support (#88188)
This introduces the ability to simply configure a java tool chain for elasticsearch java projects to be used.
If an environment variable `JAVA_TOOLCHAIN_HOME `is declared, this JDK will be used as toolChain in elasticsearch.java projects. If JAVA_RUNTIME_HOME is configured, it takes precedence over JAVA_TOOLCHAIN_HOME
for configuring test cluster runtimes.

This should make testing our build with java `ea` versions easier and allows detangling the used compiler jdk from the gradle java runtime.
2022-07-04 08:43:18 +02:00
Rene Groeschke d5a60f2665
Allow configuring snyk target reference and lifecycle properties (#88220)
We will use target reference to distinguish between different versions or branches of our elasticsearch project
to be able to trace vulnerable dependencies down to the version.

snyk lifecycle property allows filtering the project overview by `production` or `development`. When version
is ending with SNAPSHOT we configure the lifecycle as development. Otherwise its production.

Related to #87620
2022-06-30 22:30:08 +02:00
Chris Hegarty c2f457164d
Emit more detailed JDK runtime build information (#88180) 2022-06-30 11:18:43 +01:00
Rene Groeschke ca4f3a3eeb
Run gradle integration tests with configuration cache enabled by default (#88148)
This changes AbstractGradleFuncTest to run with configuration cache enabled by default. That gives us better test coverage on how our build logic works with configuration cache enabled and makes it explicit which parts are not yet working.
We fixed some minor configuration cache related issues in our code.
2022-06-30 11:08:51 +02:00
Craig Taverner 9080cc8ddb
8.4 release notes ported from 8.3.0 release (#88136)
* Generate release notes for v8.3.0 (#87294)

* Generate release notes for v8.3.0

* [DOCS] Add 8.3 migration file to index

* Fixed version number

* Fix formatting of deprecation in 85326

* Use asciidoc format for deprecations

* Extract static content from migration/index

* This was just an enhancement

* Nope, it was an upgrade

* Added migration/index.asciidoc generation support (#87318)

Including extracting static content from migration/index, so the template would be as light as possible.

The reason for this work is because the gradle task `generateReleaseNotes` was not correctly adding new links and imports to the migrations/index and that caused documentation to fail building for 8.3.0.

* [DOCS] Add ml-cpp PRs to release notes

* Added back incorrectly deleted changlog

* Added missing highlight

* Fixed spelling of StackOverflowError

Co-authored-by: lcawl <lcawley@elastic.co>

* Brought back missing changelog for 87235 (#87370)

* Brought back missing changelog for 87235

* Regenerate release notes

* Regenerate release notes for BC3 (#87449)

* Regenerate release notes for BC3

* Re-applied manual fixes that Lisa Cawley used

* Fixed breaking changes generation

To match the manual edits done by Lisa Cawley

* Fixed failing test

Since the manual edits by Lisa removed the `-SNAPSHOT` from the docs
we remove it from the tests too.

* Remove changelogs for intermediate lucene upgrades

* Update release notes for BC4 (#87635)

* Update release notes for BC4

* Adding missing changelog for geo_grid

* Added missing highlight notes for 84250

* Update docs/reference/release-notes/highlights.asciidoc

Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>

* Update docs/reference/release-notes/highlights.asciidoc

Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>

* Backported fixes to original yaml

* Control sort order of release highlights

So that small changes to an individual highlight don't completely shuffle the entire document.

We also added links to the PRs from the highlight titles, for convenience.
Otherwise readers need to search the release notes for the changelog entry and click there,
which is a lot more work.

* Fixed failing test after new ordered highlights

Also made test verify re-ordering of highlights

Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>

* Update release notes for BC5 (#87808)

* Update release notes for BC6 (#87912)

* Update release notes for BC9 (#88011)

* Regenerate release notes after version bump 8.4.0

And after forward porting 8.3.0 release notes changes.

* Regenerate after some changelog entries removed

* Re-prune the changelogs

* Removed three changelog entries

Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
2022-06-30 09:15:22 +02:00
Nik Everett aa6f31fe61
Checkstyle: don't require javadoc on test methods (#88179)
Test methods tend to have descriptive names for the cases that they are
testing. Sometimes they require javadoc, for sure, but not often enough
to add a little "WEAK WARNING" marker on every single test method in my
IDE.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2022-06-29 20:36:27 -04:00
Ryan Ernst e2337bc8f3
Upgrade randomized runner to 2.8.0 (#88194)
This commit bumps the version of randomized runner that tests use to
2.8.0.
2022-06-29 16:25:22 -07: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 d5ebe3d073
Port all remaining build-tool tests to spock (#88089)
- Make our build tool tests more readable
- One step closer to remove outdated test fixtures like GradleUnitTestCase and friends

Didn't port some basic setter getter tests like PluginExtensionTests as it does not add much value and we have integration test coverage for this stuff too
2022-06-29 09:27:33 +02:00
Tim Vernum 6078fc3cbf
Update http client version (#87491)
Moves a few Apache HTTP client dependencies to their latest version

- httpclient -> 4.5.13
- httpasyncclient -> 4.1.5
- httpcore -> 4.4.13
2022-06-28 06:10:17 -04:00
Ryan Ernst eed8da3919
Move the ingest attachment processor to the default distribution (#87989)
The ingest attachment processor is currently available as a plugin. This
commit moves the processor to the default distribution so it is always
available.
2022-06-28 02:10:36 -04:00
Rene Groeschke 12525adf83
Add easier configuration cache test support in build logic tests (#88047)
This is intended to help us getting closer to #57918 by implicitly
testing our build logic configuration-cache support. Plugin and Task
tests can be marked as configuration cache compatible now and we will
always run then with configuration cache enabled.

By default, gradle will fail the build if configuration cache problems
have been detected during build execution. That should be in general
better then adding explicit tests for testing configuration cache
compatibility per Test class
2022-06-27 08:11:17 -04:00
Lee Hinman c619a20613
Update build tools changelog schema for label rename (#88033)
The `:Data Management/Ingest` label was recently renamed to `:Data
Management/Ingest Node`. This commit changes the build tools changelog
schema to know about the rename.
2022-06-24 16:48:36 -04:00
Ryan Ernst c4ff1b70c5
Cache notice generation tasks (#87991)
This commit makes the NoticeTask cacheable. Although it is not that
expensive (a few seconds), it's worth it overall.
2022-06-23 16:39:39 -07:00
Nhat Nguyen c2dc6e6ef4
Upgrade to new Lucene snapshot (#87932)
This PR uses Lucene-9.3 snapshot in Elasticsearch 8.4. Noticeable changes in this Lucene snapshot:

- Merge-on-refresh (disabled)
- No more pathological merging
- SortedSetDocValues#count for value_count aggs
2022-06-23 12:18:27 -04:00
Rene Groeschke 14a040c8b5
Mute TestingConventionsPrecommitPluginFuncTest on windows (#87961)
see https://github.com/elastic/elasticsearch/issues/87913
2022-06-23 06:59:01 -04:00
Amey Kulkarni ebe58b4a7d
Use Azul Zulu JDK8 distribution instead of Adoptium/OpenJDK on MacOS with Apple Silicon (#87733) 2022-06-22 14:04:55 -07:00
Rory Hunter b6e3b47f39
Upgrade Checkstyle to 10.3 (#87792)
Closes #83311.
2022-06-21 10:25:17 +01: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
Armin Braun 6fca901316
Upgrade to Netty 4.1.77 (#86630)
Staying up to date and suppressing a CVE that does not affect ES but will show up in scans asap.
2022-06-17 14:53:26 +02:00
Mary Gouseti b60ccc4c9a
Persistent health task (#86131)
This PR introduces a persistent task which will be used to select the health node.
2022-06-16 11:40:16 +02:00
David Roberts 75431f6a9b
[ML] Skip ML BWC tests against versions before 7.17.5 and 8.2.2 on RHEL 9 (#87678)
RHEL 9 suffers the same problems as Ubuntu 22.04 that were fixed by
https://github.com/elastic/ml-cpp/pull/2272.

The glibc version on RHEL 9 is 2.34 (versus 2.35 on Ubuntu 22.04),
so we need to adjust the skip logic.
2022-06-15 10:43:58 +01:00
Przemyslaw Gomulka db59a88a94
Add ParameterizedMessage to forbidden api (#87631)
ParameterizedMessage will not be part of the new ES logging API and therefore should not be used.
java.util.Supplier and String.format should be used instead.

this commit adds ParameterizedMessage to forbidden api

relates #86549
2022-06-14 17:06:21 +02:00
Rene Groeschke 95d56cc262
Fix configuration cache compatibility issues in gradle plugins (#87567)
This fixes references to project that makes the plugin incompatible with Gradle
configuration cache. We also remove custom xpackProject utility:

using xpackProject in certain situations can break configure configuration cache compatibility as it uses a mutual project object under the hood that is discouraged to use in some use cases (e.g. at execution time)

It always breaks compatibility with --configure-on-demand

using xpackProject uses the project of the :x-pack project. referencing other project objects from other subproject should avoided where possible to decouple (sub project configurations). There's a good explanation of why we want to decouple our project configurations as much as possible here: https://docs.gradle.org/current/userguide/multi_project_configuration_and_execution.html#sec:decoupled_projects

it adds little value over default out of the box gradle api (just use project(':x-pack:someProject') instead of xpackProject('someProject') Also in some occasions its even shorter. e.g. when this is used as xpackProject('someProject').path instead of just passing :x-pack:someProject

I'll try to put a bit more context in the PR description in the future to make the motivation behind these kind of changes more clear upfront

Related to #57918
2022-06-13 13:20:18 +02:00
Przemyslaw Gomulka 0ef15b49e9
Stable logging API - the basic use case (#86612)
Introducing a stable logging API under libs/logging.
This change covers the most common use cases for logging: fetching a logger with LogManager, emitting a log messages with Logger and Level.
It is influenced by log4j2-api, but do not include Marker and LogBuilder methods.
Also methods using org.apache.logging.log4j.util.Supplier are replaced with java.util.Supplier

The basic implementation is present in server and injected statically in LogConfigurator

relates #84478
2022-06-13 10:25:54 +02:00