Commit Graph

435 Commits

Author SHA1 Message Date
Nick Knize 4c42c142cb
[BWC] Diable BWC tests until branch versions are synced (#1508)
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-11-04 12:03:41 -05:00
Nicholas Walter Knize 93cce825eb
[BWC] Re-enable bwc testing after 1.0.1 version bump
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-08-26 07:11:53 -05:00
Nicholas Walter Knize 26a4db6282
[BWC] Temporarily disable bwc testing while bumping 1.0.1
BWC tests are temporarily disabled to unblock main PRs while bumping 1.0.1

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-08-25 22:33:59 -05:00
Tianli Feng ca3ced981f
Add support to generate code coverage report with JaCoCo (#971)
* add jacoco plugin

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* config aggregated jacoco report

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Skip generating report if no test in subproject

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Add jacoco plugin into root project

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* test aggregate code coverage report

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Can generate aggregated unit test coverage report

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Can generate aggregated test report with source file linked

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Some cleanup, but jacocoReport is not dependson Test

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* cleanup

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* get unit test code coverage report

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* change 'enabled == true' to 'enabled'

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* add a comment for selectedsubprojects

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* add tasks to generate code coverage report for unit test and integration test

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* fix typo in variable

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Correct the task to get codecoverage for unit test and integtest

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Make code coverage report task run after test

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* apply gradle configuration aciidance api

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* apply jacoco plugin in BuildPlugin in all case

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Put file path list of integration test exec data in a variable

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Apply gradle configuration aviodance api to register task instead of create task

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* merge 2 jacocoreport configurations

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Add some comments in gradle script

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Attach code coverage report task to gralde check task

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* add a space

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* get code coverage report after check task on demand and get report in html format on demand

Signed-off-by: Tianli Feng <ftianli@amazon.com>
2021-08-10 07:23:46 -07:00
Daniel Doubrovkine (dB.) 5d020170ff
Lower build requirement from Java 14+ to Java 11+ (#940)
* Lower build requirement from Java 14+ to Java 11+

Avoid use of -Werror -Xlint:all, which may change significantly across
java releases (new warnings could be added). Instead, just list the
warnings individually.

Workaround JDK 11 compiler bug (JDK-8209058) that only impacts test fixture
code in the build itself.

Signed-off-by: Robert Muir <rmuir@apache.org>

* Disable warning around -source 7 -release 7 for java version checker

The java version checker triggers some default warnings because it
targets java7:

```
> Task :distribution:tools:java-version-checker:compileJava FAILED
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
```

Suppress this warning explicitly for this module.

Signed-off-by: Robert Muir <rmuir@apache.org>

* more java14 -> java11 cleanup

Signed-off-by: Robert Muir <rmuir@apache.org>

Co-authored-by: Robert Muir <rmuir@apache.org>
2021-07-06 11:55:23 -05:00
Marc Handalian dff274414d
Add Snapshot maven repository (#829)
Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-06-10 14:07:48 -07:00
Rabi Panda 33708d29ab
Enable BWC checks (#796)
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-06-03 09:23:30 -07:00
Himanshu Setia 6f893ed1cd
Merging javadoc feature branch changes to main (#715)
* Adds a gradle plugin to validate missing javadocs

Use `./gradlew missingJavadoc` to validate missing javadocs.
Currently this task fails because several modules are missing
appropriate javadocs. Once added, this should pass.
Also, precommit PomValidation check currently fails with missing Javadoc
plugin, that needs to be fixed -
https://github.com/opensearch-project/OpenSearch/issues/449
Thus keeping this in a separate feature branch.

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Fix Javadoc errors in module `client/rest` (#685)

* Fix Javadoc errors in client/rest module

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>

* Add package info file in client/rest module

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>

* Fix typos

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>

* Add exception documentation to Javadoc

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>

* Fixes precommit task configuration failures due to newly added missin… (#707)

* Fixes precommit task configuration failures due to newly added missingJavadoc task

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Fixes javadoc task errors due to PR#685

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Updated CONTRIBUTING.md for info on javadocs

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Correcting licenses and naming

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Correcting version info

Signed-off-by: Himanshu Setia <setiah@amazon.com>

Co-authored-by: Gregor Zurowski <gregor@zurowski.org>
2021-05-18 13:21:41 -07:00
Rabi Panda 163a51fc5a
Remove the oss string from OpenSearch distributions (#575)
This commit removes the 'oss' string which was a remnant of the predecessor distribution flavors. As OpenSearch has no flavors for distributions, we are removing this tag from all the distribution names.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-04-20 09:27:40 -07:00
Nick Knize 9168f1fb43
[License] Add SPDX and OpenSearch Modification license header (#509)
This commit adds the SPDX Apache-2.0 license header along with an additional
copyright header for all modifications.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-09 14:28:18 -05:00
Rabi Panda 2dca3462f2
Fix stragglers from renaming to OpenSearch work. (#483)
This commit fixes more instances where we missed renaming to OpenSearch.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-04-05 11:51:20 -07:00
Rabi Panda 4f6507510b
Update year and developer info in generated POMs. (#444)
Signed-off-by: Rabi Panda <pandarab@amazon.com>
2021-03-22 23:17:27 -07:00
Rabi Panda 8bba6603da [Rename] Replace more instances of Elasticsearch with OpenSearch. (#432)
This commit replaces more replaceable instances of Elasticsearch with OpenSearch.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda df11cc9de4 [Rename] Fix gradle build as part of the renaming process. (#397)
This commit fixes the currently broken gradle build resulted from the renaming work. It reverts a few dependencies and comments out the `opensearch_distibutions` task which is currently failing for some builds. We will address these separately in the future once we have a working build.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Kyle J. Davis b0f137e954
fixed reference to old repo (#333)
This commit fixes the url reference to bwc disabled message.

Signed-off-by: Kyle Davis <kyledvs@amazon.com>
2021-03-16 16:10:40 -05:00
Rabi Panda a76aaeec93 Disable BWC checks. (#130)
As part of this PR, we are disabling the BWC checks. Once we have finalized the versions for the fork, we can re-enable it with right configurations.

Relates #105

Signed-off-by: Rabi Panda <pandarab@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:15 -06:00
Peter Nied a54348b678 Update CI workflow to work on new infra (#123)
* Update CI workflow to work on new infra

- Backward compatability tests are disabled during CI by default #113
- Added property to allow for disabling bwc tests
- Added agent label to use specific hardware https://www.jenkins.io/doc/book/pipeline/syntax/#agent

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:15 -06:00
Nick Knize 125958eb2c Remove the Elastic license file, all checks for this license and the license REST APIs. (#12)
Co-authored-by: Rabi Panda <rabipanda@icloud.com>
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:07 -06:00
Nick Knize 3a52e9ddc1 [PURIFY] update build.gradle files to ensure build completes; gradle check fails (#7)
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:06 -06:00
Nick Knize 55b8ab4338 Cleanup build-scan, remove publish scan to elastic server (#1) (#4)
Co-authored-by: Huan Jiang <huanji@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:06 -06:00
Rory Hunter 752590041e Upgrade spotless dependency (#62857)
No changes to formatted Java files.
2020-09-24 12:52:45 +01:00
Rene Groeschke 0b6d187932
Fix resolveAllDependencies broken by ArtfactTransforms (#61972) (#61979)
- ignore es extracted configuration for resolveAllDeps
- fixes #61945
2020-09-04 20:21:46 +02:00
Rene Groeschke 60d46f1d13
Remove superflous enforce deprecation failure plugin (#59770) (#59898)
- With enforcing the build to fail on all gradle deprecated api usage we do not need
this tailored plugin anymore
2020-07-21 12:54:17 +02:00
Rene Groeschke 11b6bba984
Fix all deprecations in resolveAllDependencies (#59751)
This fixes #59743
2020-07-17 10:16:45 +02:00
Martijn van Groningen 35ae3d19db
Remove data stream feature flag (#59572)
so that it can used in the next minor release (7.9.0).

Backport of #59504 to 7.x branch.
Closes #53100
2020-07-14 23:50:41 +02:00
Rene Groeschke 7c8d644bbc
Fix external javadoc reference to server project (#59000) (#59117)
* Fix external javadoc reference to server project

This fixes https://github.com/elastic/infra/issues/20103
The problem here is that we rename all artifacts in the :server project to
elasticsearch. The ideal fix would be to rename the gradle project there
to elasticsearch. I'm open to that but it seems quite invasive. Would love to hear
other opinions on that.
The applied alternative minimal invasive fix provided with this PR just takes
potential renamed projects / artifacts (Currently I only see `:server`) into account
when declaring external links.

* Simplify javadoc link base name
2020-07-07 11:38:40 +02:00
Rene Groeschke d952b101e6
Replace compile configuration usage with api (7.x backport) (#58721)
* Replace compile configuration usage with api (#58451)

- Use java-library instead of plugin to allow api configuration usage
- Remove explicit references to runtime configurations in dependency declarations
- Make test runtime classpath input for testing convention
  - required as java library will by default not have build jar file
  - jar file is now explicit input of the task and gradle will ensure its properly build

* Fix compile usages in 7.x branch
2020-06-30 15:57:41 +02:00
Rene Groeschke fc60cf6179
Introduce EnforceDeprecationFailuresPlugin (#58263) (#58309)
- extract fail on deprecated usage into its own plugin
- apply on all projects
- ensures we don't miss any project (missed xpack/plugin/eql/qa/security before)
2020-06-23 09:14:12 +02:00
Rene Groeschke a7a1b78882
Fix resolveAllDependencies to ignore testCompile (#58080) (#58084) 2020-06-15 00:01:46 +02:00
Rene Groeschke 8584da40af
Move classes from build scripts to buildSrc (#57197) (#57512)
* Move classes from build scripts to buildSrc

- move Run task
- move duplicate SanEvaluator

* Remove :run workaround

* Some little cleanup on build scripts on the way
2020-06-02 15:33:53 +02:00
Ryan Ernst 6ccdceec79
Move test fips configuration to script plugin (#57251)
This commit moves the configuration of all test jvms for fips to a
script plugin. Fips testing is something very specific to the
Elasticsearch build and does not need to be passed on to plugin authors.
2020-06-01 10:43:54 -07:00
Ryan Ernst a2864191d6
Move common repository configuration to java plugin (#57057)
This commit moves the common maven repository configuration to the ES
java plugin. All java projects need this common set of repos. Note that
the Elastic download and maven repos are removed, as they are not
necessary anymore since distribution download was split into the
DistributionDownloadPlugin.
2020-05-26 14:12:29 -07:00
Rene Groeschke 28920a45f1
Improvement usage of gradle task avoidance api (#56627) (#56981)
Use gradle task avoidance api wherever it is possible as a drop in replacement in the es build
2020-05-25 09:37:33 +02:00
Mark Vieira e3be18a443
Add version 6.8.10 2020-05-13 11:27:40 -07:00
Rene Groeschke 376f46f953
Add gradle task to build platform specific distro (#56003) (#56572)
backports #56003 to
2020-05-12 12:49:58 +02:00
Lee Hinman 7d002bc263
Re-enable BWC tests on 7.x (#56548)
This can only be merged once #56541, #56545 and #56546 have been merged
2020-05-11 15:45:15 -06:00
Lee Hinman 91c5ace569 [7.x] Disable BWC tests for prefer_v2_template removal (#56543)
This disables BWC tests for 7.x so the prefer_v2_template flag can be removed in 7.8, 7.x, and master.
2020-05-11 14:06:03 -06:00
Lee Hinman 11179b90de Re-enable BWC tests on 7.x
This can only be merged once #56541, #56545 and #56546 have been merged
2020-05-11 14:05:47 -06:00
Lee Hinman 7c5e6c29f5
[7.x] Disable BWC tests for prefer_v2_template removal (#56543)
This disables BWC tests for 7.x so the prefer_v2_template flag can be removed in 7.8, 7.x, and master.
2020-05-11 13:49:43 -06:00
Rene Groeschke c29bc87040
Move bwcVersions extension property to BuildParams (back port) (#56381)
* Move bwcVersions extension property to BuildParams (#56206)
* Fix :qa Task Using Broken BwC Versions Resolution (#56332)

Co-authored-by: Armin Braun <me@obrown.io>
2020-05-11 09:39:13 +02:00
Lee Hinman 3cefe192a2
[7.x] Remove Index Templates V2 feature flag (#56123) (#56141)
Backports the following commits to 7.x:
 - Remove Index Templates V2 feature flag (#56123)
2020-05-04 13:15:51 -06:00
Ignacio Vera 8afc8e6f89
enable BWC tests after lucene upgrade (#55247) (#55254) 2020-04-16 07:10:15 +02:00
Ryan Ernst 29b70733ae
Use task avoidance with forbidden apis (#55034)
Currently forbidden apis accounts for 800+ tasks in the build. These
tasks are aggressively created by the plugin. In forbidden apis 3.0, we
will get task avoidance
(https://github.com/policeman-tools/forbidden-apis/pull/162), but we
need to ourselves use the same task avoidance mechanisms to not trigger
these task creations. This commit does that for our foribdden apis
usages, in preparation for upgrading to 3.0 when it is released.
2020-04-15 13:27:53 -07:00
Ignacio Vera eaf75fc7b6
disable BWC for lucene upgrade (#55242) (#55245) 2020-04-15 18:17:53 +02:00
Mark Vieira ce85063653
[7.x] Re-add origin url information to publish POM files (#55173) 2020-04-14 13:24:15 -07:00
Ioannis Kakavas 7a8a66d9ae
[7.x] Fix ReloadSecureSettings API to consume password (#54771) (#55059)
The secure_settings_password was never taken into consideration in
the ReloadSecureSettings API. This commit fixes that and adds
necessary REST layer testing. Doing so, it also:

- Allows TestClusters to have a password protected keystore
so that it can be set for tests.
- Adds a parameter to the run task so that elastisearch can
be run with a password protected keystore from source.
2020-04-13 09:50:55 +03:00
Mark Vieira dd73a14d11
Improve total build configuration time (#54611) (#54994)
This commit includes a number of changes to reduce overall build
configuration time. These optimizations include:

- Removing the usage of the 'nebula.info-scm' plugin. This plugin
   leverages jgit to load read various pieces of VCS information. This
   is mostly overkill and we have our own minimal implementation for
   determining the current commit id.
- Removing unnecessary build dependencies such as perforce and jgit
   now that we don't need them. This reduces our classpath considerably.
- Expanding the usage lazy task creation, particularly in our
   distribution projects. The archives and packages projects create
   lots of tasks with very complex configuration. Avoiding the creation
   of these tasks at configuration time gives us a nice boost.
2020-04-08 16:47:02 -07:00
Ryan Ernst 37795d259a
Remove guava from transitive compile classpath (#54309) (#54695)
Guava was removed from Elasticsearch many years ago, but remnants of it
remain due to transitive dependencies. When a dependency pulls guava
into the compile classpath, devs can inadvertently begin using methods
from guava without realizing it. This commit moves guava to a runtime
dependency in the modules that it is needed.

Note that one special case is the html sanitizer in watcher. The third
party dep uses guava in the PolicyFactory class signature. However, only
calling a method on the PolicyFactory actually causes the class to be
loaded, a reference alone does not trigger compilation to look at the
class implementation. There we utilize a MethodHandle for invoking the
relevant method at runtime, where guava will continue to exist.
2020-04-07 23:20:17 -07:00
Martijn van Groningen ec0bbda52f
Changed itv2 and data streams feature flag naming (#54431) (#54500)
from `*_flag_registered` to `#_feature_enabled`.

This previous name indicated that a flag was registered,
whilst the feature flag actually controls whether a
feature is enabled.
2020-04-03 10:12:00 +02:00
Rory Hunter 24ef800b24 Rename formatter config and switch to an opt-out list
Backport of #54276.

Move and rename formatter config file, so that it is easier for
Eclipse users to import.

Also switch to an opt-out list for formatting. Instead of explcitly
listing projects that should be formatted, instead list projects
that should not be formatted. This means that any new projects will
automatically be formatted and checked.
2020-03-27 12:09:37 +00:00