Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Squash-merged branch "main"
Browse files Browse the repository at this point in the history
This includes the following:

commit 9cfa395
Author: Kartik <gkart@amazon.com>
Date:   Thu Mar 10 10:12:17 2022 -0800

    Remove the IndexCommitRef class (opensearch-project#2421)

    This inner class is no longer required because its functionality has been moved to the generic GatedCloseable class.

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>

commit c8d8009
Author: Andriy Redko <andriy.redko@aiven.io>
Date:   Thu Mar 10 11:46:08 2022 -0500

    Fixing bwcVersions and bwc builds (opensearch-project#2430) - adding 1.4.0 into main bwcVersions

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

commit fb9e150
Author: Kartik <85275476+kartg@users.noreply.github.com>
Date:   Wed Mar 9 12:21:09 2022 -0800

    Refactoring gated and ref-counted interfaces and their implementations (opensearch-project#2396)

    * Reducing duplication in plugins around ref-counted releasable classes

    Both AmazonEc2Reference and AmazonS3Reference duplicate the same logic - a subclass of AbstractRefCounted that also implements Releasable. This change centralizes this paradigm into a AbstractRefCountedReleasable class and supports both clients via generics. It also updates all fetching implementations to use the get() method instead of client()

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>

    * Introduce Reference classes for the Closeable and AutoCloseable interfaces

    These classes allow you to wrap a reference instance with an onClose runnable that is executed when close() is invoked. Two separate classes are needed because the close() signatures for the two interfaces are different. This change takes the first step to have implementing classes extend from these generic superclasses, before attempting to remove the subclasses entirely. The get() method is also replaced throughout the code base.

    Note that there is also a separate Releasable interface that has a similar access pattern, but is implemented separately. This is used in AbstractRefCountedReleasable introduced in a prior commit

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>

    * More improvements and refactoring

    * Functionality around one-way gating is now moved to a dedicated class - OneWayGate. This replaces duplicate functionality throughout the code.
    * The two *Reference classes have been renamed to Gated* since that better represents their functionality
    * The AbstractRefCountedReleasable has been improved to no longer be abstract by accepting the shutdown hook. This removes the need for the inner class in ReleasableBytesReference, and further simplifies the plugin subclasses (these could probably be removed entirely).
    * Finally, unit tests have been added for some classes

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>

    * Added tests for GatedCloseable

    Also updated the license information in GatedAutoCloseableTests

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>

    * Fixing license information in new files

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>

    * Added unit tests for RefCountedReleasable

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>

commit 5a9a114
Author: Nick Knize <nknize@apache.org>
Date:   Wed Mar 9 12:50:05 2022 -0600

    [Remove] TrimUnsafeCommit logic for legacy 6.x indexes (opensearch-project#2225)

    * [Remove] TrimUnsafeCommit logic for legacy 6.x indexes

    Multiple txlog commits was introduced in legacy 7.x. Legacy 6.x indexes could
    therefore not have a safe commit. Since OpenSearch 2.0 is no longer compatible
    with legacy 6.x indexes, the logic to trim these unsafe commits is safely
    removed.

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

    * fix assertion typo

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

    * rebase and incorporate pr feedback

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

commit 9c679cb
Author: Andriy Redko <andriy.redko@aiven.io>
Date:   Tue Mar 8 18:42:32 2022 -0500

    MapperService has to be passed in as null for EnginePlugins CodecService constructor (opensearch-project#2177)

    * MapperService has to be passed in as null for EnginePlugins CodecService constructor

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

    * Addressing code review comments

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

    * Delayed CodecService instantiation up to the shard initialization

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

    * Added logger (associated with shard) to CodecServiceConfig

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

    * Refactored the EngineConfigFactory / IndexShard instantiation of the CodecService

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

commit a6a47e7
Author: Suraj Singh <79435743+dreamer-89@users.noreply.github.com>
Date:   Tue Mar 8 14:43:04 2022 -0800

    Remove inclue_type_name parameter from rest api spec (opensearch-project#2410)

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

commit 044f536
Author: Daniel Doubrovkine (dB.) <dblock@dblock.org>
Date:   Tue Mar 8 14:48:51 2022 -0500

    Set target and source compatibility to 11, required by Lucene 9. (opensearch-project#2407)

    * Set target and source compatibility to 11, required by Lucene 9.

    Signed-off-by: dblock <dblock@dblock.org>

    * Uncomment commented code in opensearch-project#2321 for killing child processes that uses JDK9+ ProcessInfo.

    Signed-off-by: dblock <dblock@dblock.org>

    * Set distribution checker target JDK compatibility to 11.

    Signed-off-by: dblock <dblock@dblock.org>

    * Supress processing warnings.

    Signed-off-by: dblock <dblock@dblock.org>

commit c3712a5
Author: Nick Knize <nknize@apache.org>
Date:   Tue Mar 8 11:30:27 2022 -0600

    [Remove] include_type_name from HLRC (opensearch-project#2397)

    Removes include_type_name from the high level reset client along with relevant
    deprecated methods in IndicesClient. All tests are updated to remove the
    parameter from the rest requests along with various toXContent methods that are
    no longer required.

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

commit 63c75d1
Author: Tianli Feng <ftianli@amazon.com>
Date:   Tue Mar 8 08:35:36 2022 -0800

    Deprecate setting 'reindex.remote.whitelist' and introduce the alternative setting 'reindex.remote.allowlist' (opensearch-project#2221)

    * Add setting reindex.remote.allowlist, and deprecate setting reindex.remote.whitelist

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

    * Add unit test for renaming the setting reindex.remote.allowlist

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

    * Remove system.out.println()

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

    * Adjust format by spotlessApply task

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

    * Replace REMOTE_CLUSTER_WHITELIST with REMOTE_CLUSTER_ALLOWLIST

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

    * Add a unit test to test final setting value when both settings have got a value

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

    * Rename the unit test class name

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

    * Remove the Access modifiers public from the constant REMOTE_CLUSTER_WHITELIST

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

    * Initialize ReindexPlugin without using the @before method

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

    * Rename 'unwhitelisted' to 'unallowlisted' in a yml file used for REST api testing.

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

commit 65debde
Author: Andriy Redko <andriy.redko@aiven.io>
Date:   Tue Mar 8 11:30:48 2022 -0500

    Update the BWC versions (post 1.x backport) (opensearch-project#2390)

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

commit 919d180
Author: Suraj Singh <79435743+dreamer-89@users.noreply.github.com>
Date:   Mon Mar 7 12:43:05 2022 -0800

    Remove type end-points from count action (opensearch-project#2379)

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

commit 1f0361a
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Mar 7 10:28:17 2022 -0800

    Bump asm-commons from 5.0.4 to 9.2 in /modules/lang-expression (opensearch-project#2385)

    * Bump asm-commons from 5.0.4 to 9.2 in /modules/lang-expression

    Bumps asm-commons from 5.0.4 to 9.2.

    ---
    updated-dependencies:
    - dependency-name: org.ow2.asm:asm-commons
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    * Updating SHAs

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

commit 09e16e3
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Mar 7 13:08:07 2022 -0500

    Bump guava from 30.1.1-jre to 31.1-jre in /plugins/repository-azure (opensearch-project#2382)

    * Bump guava from 30.1.1-jre to 31.1-jre in /plugins/repository-azure

    Bumps [guava](https://github.com/google/guava) from 30.1.1-jre to 31.1-jre.
    - [Release notes](https://github.com/google/guava/releases)
    - [Commits](https://github.com/google/guava/commits)

    ---
    updated-dependencies:
    - dependency-name: com.google.guava:guava
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    * Updating SHAs

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

commit e1fd4b7
Author: Subhobrata Dey <sbcd90@gmail.com>
Date:   Mon Mar 7 08:51:49 2022 -0800

    Add valuesField in PercentilesAggregationBuilder streamInput constructor (opensearch-project#2308)

    Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>

commit 4395ed5
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Mar 7 11:48:38 2022 -0500

    Bump guava in /distribution/tools/upgrade-cli (opensearch-project#2383)

    Bumps [guava](https://github.com/google/guava) from 31.0.1-jre to 31.1-jre.
    - [Release notes](https://github.com/google/guava/releases)
    - [Commits](https://github.com/google/guava/commits)

    ---
    updated-dependencies:
    - dependency-name: com.google.guava:guava
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 72c5d81
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Mar 7 11:48:18 2022 -0500

    Bump guava in /distribution/tools/keystore-cli (opensearch-project#2384)

    Bumps [guava](https://github.com/google/guava) from 31.0.1-jre to 31.1-jre.
    - [Release notes](https://github.com/google/guava/releases)
    - [Commits](https://github.com/google/guava/commits)

    ---
    updated-dependencies:
    - dependency-name: com.google.guava:guava
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 75e837d
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Mar 7 11:48:00 2022 -0500

    Bump guava from 31.0.1-jre to 31.1-jre in /distribution/tools/plugin-cli (opensearch-project#2387)

    Bumps [guava](https://github.com/google/guava) from 31.0.1-jre to 31.1-jre.
    - [Release notes](https://github.com/google/guava/releases)
    - [Commits](https://github.com/google/guava/commits)

    ---
    updated-dependencies:
    - dependency-name: com.google.guava:guava
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3e9031f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Mar 7 11:47:37 2022 -0500

    Bump gradle-extra-configurations-plugin from 3.0.3 to 7.0.0 in /buildSrc (opensearch-project#2386)

    Bumps [gradle-extra-configurations-plugin](https://github.com/nebula-plugins/gradle-extra-configurations-plugin) from 3.0.3 to 7.0.0.
    - [Release notes](https://github.com/nebula-plugins/gradle-extra-configurations-plugin/releases)
    - [Changelog](https://github.com/nebula-plugins/gradle-extra-configurations-plugin/blob/main/CHANGELOG.md)
    - [Commits](nebula-plugins/gradle-extra-configurations-plugin@v3.0.3...v7.0.0)

    ---
    updated-dependencies:
    - dependency-name: com.netflix.nebula:gradle-extra-configurations-plugin
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 9224537
Author: Owais Kazi <owaiskazi19@gmail.com>
Date:   Fri Mar 4 16:58:13 2022 -0800

    Updated the url for docker distribution (opensearch-project#2325)

    Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>

commit d5e58a2
Author: Suraj Singh <79435743+dreamer-89@users.noreply.github.com>
Date:   Fri Mar 4 16:40:47 2022 -0800

    [Remove] Type mappings from GeoShapeQueryBuilder (opensearch-project#2322)

    * Remove type end-points from GeoShapeBuilder

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

    * Fix integration test failures

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

commit be64af2
Author: aponb <aponb@gmx.at>
Date:   Sat Mar 5 01:34:09 2022 +0100

    Replace exclusionary words whitelist and blacklist in the places that won't impact backwards compatibility (opensearch-project#2178)

    * Replace the exclusionary word whitelist with allowlist, and blacklist with denylist, in code commet and internal variable/method/class/package name.

    Signed-off-by: Andreas <apre@gmx.at>

commit ae52008
Author: Andriy Redko <andriy.redko@aiven.io>
Date:   Fri Mar 4 17:44:52 2022 -0500

    Fixing the --release flag usage for javac (opensearch-project#2343) (opensearch-project#2352)

    * Fixing the --release flag usage for javac (opensearch-project#2343)

    * Fixing the --release flag usage for javac

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

    * Fixing the --html5 flag usage for javadoc

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

    * Fix java-version-checker source/target compatibility settings (opensearch-project#2354)

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

commit 0cc2c9b
Author: Nick Knize <nknize@apache.org>
Date:   Fri Mar 4 13:30:43 2022 -0600

    [Remove] types from PutMappingRequest (opensearch-project#2335)

    Remove type support from putMappingRequest, dependencies, and all tests.

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

commit 729bc43
Author: Nick Knize <nknize@apache.org>
Date:   Fri Mar 4 10:52:24 2022 -0600

    [Test-Failure] Mute TranslogPolicyIT (opensearch-project#2342)

    This test is slated for removal as it only applies to ancient indexes (Legacy
    6.x). Muting test so bwc tests are consistent and no longer angry.

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

commit 5f90227
Author: Andriy Redko <andriy.redko@aiven.io>
Date:   Fri Mar 4 11:12:27 2022 -0500

    Add '_name' field support to score functions and provide it back in explanation response (opensearch-project#2244)

    * Add '_name' field support to score functions and provide it back in explanation response

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

    * Address code review comments

    Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

commit ae14259
Author: Daniel Doubrovkine (dB.) <dblock@dblock.org>
Date:   Thu Mar 3 15:34:53 2022 -0500

    Restore Java 8 compatibility for build tools. (opensearch-project#2300) (opensearch-project#2321)

    * Restore Java 8 compatibility for build tools.

    Signed-off-by: dblock <dblock@dblock.org>

    * Make source code compatible with Java 8.

    Signed-off-by: dblock <dblock@dblock.org>

commit cb57b92
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Mar 3 14:23:47 2022 -0500

    Bump log4j-core in /buildSrc/src/testKit/thirdPartyAudit/sample_jars (opensearch-project#2281)

    Bumps log4j-core from 2.17.1 to 2.17.2.

    ---
    updated-dependencies:
    - dependency-name: org.apache.logging.log4j:log4j-core
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit cdb42ad
Author: Vacha Shah <vachshah@amazon.com>
Date:   Thu Mar 3 10:39:27 2022 -0800

    Remove Github DCO action since DCO runs via Github App now (opensearch-project#2317)

    Signed-off-by: Vacha Shah <vachshah@amazon.com>

commit f13b951
Author: Andrey Pleskach <ples@aiven.io>
Date:   Wed Mar 2 23:36:09 2022 +0100

    Add support of SOCKS proxies for S3 repository (opensearch-project#2160)

    Signed-off-by: Andrey Pleskach <ples@aiven.io>

commit 3d5aff4
Author: Suraj Singh <79435743+dreamer-89@users.noreply.github.com>
Date:   Wed Mar 2 13:21:00 2022 -0800

    Remove type end-points from search and related APIs (opensearch-project#2263)

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

commit 897f4e7
Author: Nick Knize <nknize@apache.org>
Date:   Wed Mar 2 13:44:04 2022 -0600

    [Remove] deprecated getMapping API from IndicesClient (opensearch-project#2262)

    Removes the deprecated types based get, getMapping, getAsync, and
    getMappingAsync methods from IndicesClient. It also removes extra nesting of
    mappings belong the deprecated type named object and removes the types based
    methods from the affected request classes.

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

commit 4b89410
Author: Breno Faria <30877433+br3no@users.noreply.github.com>
Date:   Wed Mar 2 19:52:38 2022 +0100

    Reintroduce negative epoch_millis opensearch-project#1991 (opensearch-project#2232)

    * Reintroduce negative epoch_millis opensearch-project#1991

    Fixes a regression introduced with Elasticsearch 7 regarding the date
    field type that removed support for negative timestamps with sub-second
    granularity.

    Thanks to Ryan Kophs (https://github.com/rkophs) for allowing me to use
    his previous work.

    Signed-off-by: Breno Faria <breno.faria@intrafind.de>

    * applying spotless fix

    Signed-off-by: Breno Faria <breno.faria@intrafind.de>

    * more conservative implementation of isSupportedBy

    Signed-off-by: Breno Faria <breno.faria@intrafind.de>

    * adding braces to control flow statement

    Signed-off-by: Breno Faria <breno.faria@intrafind.de>

    * spotless fix...

    Signed-off-by: Breno Faria <breno.faria@intrafind.de>

    Co-authored-by: Breno Faria <breno.faria@intrafind.de>

commit 9e225dc
Author: Peng Huo <penghuo@gmail.com>
Date:   Wed Mar 2 10:34:02 2022 -0800

    Fix flaky test case - string profiler via global ordinals (opensearch-project#2226)

    forcemerge to one segment before executing aggregation query.

    Signed-off-by: Peng Huo <penghuo@gmail.com>

commit c8a7606
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 28 12:18:28 2022 -0800

    Bump commons-math3 from 3.2 to 3.6.1 in /benchmarks (opensearch-project#2282)

    Bumps commons-math3 from 3.2 to 3.6.1.

    ---
    updated-dependencies:
    - dependency-name: org.apache.commons:commons-math3
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 1b8181c
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 28 12:17:16 2022 -0800

    Bump gson from 2.8.9 to 2.9.0 in /plugins/repository-hdfs (opensearch-project#2279)

    * Bump gson from 2.8.9 to 2.9.0 in /plugins/repository-hdfs

    Bumps [gson](https://github.com/google/gson) from 2.8.9 to 2.9.0.
    - [Release notes](https://github.com/google/gson/releases)
    - [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
    - [Commits](google/gson@gson-parent-2.8.9...gson-parent-2.9.0)

    ---
    updated-dependencies:
    - dependency-name: com.google.code.gson:gson
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    * Updating SHAs

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

commit 0df9845
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 28 12:16:56 2022 -0800

    Bump morfologik-fsa from 2.1.1 to 2.1.8 in /plugins/analysis-ukrainian (opensearch-project#2278)

    * Bump morfologik-fsa from 2.1.1 to 2.1.8 in /plugins/analysis-ukrainian

    Bumps [morfologik-fsa](https://github.com/morfologik/morfologik-stemming) from 2.1.1 to 2.1.8.
    - [Release notes](https://github.com/morfologik/morfologik-stemming/releases)
    - [Changelog](https://github.com/morfologik/morfologik-stemming/blob/master/CHANGES.txt)
    - [Commits](morfologik/morfologik-stemming@2.1.1...2.1.8)

    ---
    updated-dependencies:
    - dependency-name: org.carrot2:morfologik-fsa
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    * Updating SHAs

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

commit 9780fc6
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 28 12:16:34 2022 -0800

    Bump bc-fips from 1.0.2.1 to 1.0.2.3 in /distribution/tools/plugin-cli (opensearch-project#2276)

    * Bump bc-fips from 1.0.2.1 to 1.0.2.3 in /distribution/tools/plugin-cli

    Bumps bc-fips from 1.0.2.1 to 1.0.2.3.

    ---
    updated-dependencies:
    - dependency-name: org.bouncycastle:bc-fips
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    * Updating SHAs

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

commit 4ef30f4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 28 10:41:46 2022 -0800

    Bump azure-storage-common from 12.14.0 to 12.14.3 in /plugins/repository-azure (opensearch-project#2274)

    * Bump azure-storage-common in /plugins/repository-azure

    Bumps [azure-storage-common](https://github.com/Azure/azure-sdk-for-java) from 12.14.0 to 12.14.3.
    - [Release notes](https://github.com/Azure/azure-sdk-for-java/releases)
    - [Commits](Azure/azure-sdk-for-java@azure-storage-blob_12.14.0...azure-storage-blob_12.14.3)

    ---
    updated-dependencies:
    - dependency-name: com.azure:azure-storage-common
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    * Updating SHAs

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

commit 5d0b015
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 28 10:41:33 2022 -0800

    Bump jimfs from 1.1 to 1.2 in /distribution/tools/keystore-cli (opensearch-project#2272)

    Bumps [jimfs](https://github.com/google/jimfs) from 1.1 to 1.2.
    - [Release notes](https://github.com/google/jimfs/releases)
    - [Commits](google/jimfs@v1.1...v1.2)

    ---
    updated-dependencies:
    - dependency-name: com.google.jimfs:jimfs
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit f6264a9
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 28 10:41:18 2022 -0800

    Bump spock-core from 2.0-groovy-3.0 to 2.1-groovy-3.0 in /buildSrc (opensearch-project#2270)

    Bumps spock-core from 2.0-groovy-3.0 to 2.1-groovy-3.0.

    ---
    updated-dependencies:
    - dependency-name: org.spockframework:spock-core
      dependency-type: direct:production
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 21f11ec
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Feb 28 10:40:51 2022 -0800

    Bump asm-tree from 5.0.4 to 9.2 in /modules/lang-expression (opensearch-project#2269)

    * Bump asm-tree from 5.0.4 to 9.2 in /modules/lang-expression

    Bumps asm-tree from 5.0.4 to 9.2.

    ---
    updated-dependencies:
    - dependency-name: org.ow2.asm:asm-tree
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    * Updating SHAs

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

commit 223d0b2
Author: Suraj Singh <79435743+dreamer-89@users.noreply.github.com>
Date:   Fri Feb 25 13:00:25 2022 -0800

    Remove type end-points from no-op bulk and search action (opensearch-project#2261)

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

commit 0bd7850
Author: Nick Knize <nknize@apache.org>
Date:   Fri Feb 25 13:35:48 2022 -0600

    [Remove] remaining type usage in Client and AbstractClient (opensearch-project#2258)

    Removes type parameter from remaining prepareIndex in Client and AbstractClient.

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

commit 3a4c2f6
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Fri Feb 25 10:40:11 2022 -0800

    Bump jimfs from 1.1 to 1.2 in /qa/evil-tests (opensearch-project#2130)

    * Bump jimfs from 1.1 to 1.2 in /qa/evil-tests

    Bumps [jimfs](https://github.com/google/jimfs) from 1.1 to 1.2.
    - [Release notes](https://github.com/google/jimfs/releases)
    - [Commits](google/jimfs@v1.1...v1.2)

    ---
    updated-dependencies:
    - dependency-name: com.google.jimfs:jimfs
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    * Fixing failing precommit and check

    Signed-off-by: Vacha Shah <vachshah@amazon.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Vacha Shah <vachshah@amazon.com>

commit 5b0da85
Author: Suraj Singh <79435743+dreamer-89@users.noreply.github.com>
Date:   Fri Feb 25 10:18:41 2022 -0800

    Remove type from validate query API (opensearch-project#2255)

    * Remove type mapping from RestValidateAction

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

    * Spotless check apply

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

    * Include suggested review comment

    Signed-off-by: Suraj Singh <surajrider@gmail.com>

commit 494c7bc
Author: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Date:   Fri Feb 25 03:39:43 2022 +0000

    Revert "Override Default Distribution Download Url with Custom Distribution Url When User Passes a Url" (opensearch-project#2256)

    * Override default Distribution Download URL with custom Distribution URL

    Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

    * Accidently made commit to main branch, this revives it.Override default Distribution Download URL with custom Distribution URL

    Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

    * Revert Override Default Distribution Download Url with Custom Distribution Url When User Passes a Url

    Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

commit 8b48207
Author: Nick Knize <nknize@apache.org>
Date:   Thu Feb 24 21:20:03 2022 -0600

    [Remove] Type from Client.prepare(Index,Delete,Update) (opensearch-project#2253)

    Removes the type parameter from Client.prepare(Index,Delete,Update) and
    everywhere it's used throughout the codebase except for prepareIndex(index,
    type, id) which is removed in a follow up.

    Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Merge branch 'main' into feature/segment-replication

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
  • Loading branch information
kartg committed Mar 10, 2022
2 parents f85d113 + 9cfa395 commit 7360562
Show file tree
Hide file tree
Showing 656 changed files with 6,804 additions and 8,053 deletions.
1 change: 1 addition & 0 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ BWC_VERSION:
- "1.2.4"
- "1.2.5"
- "1.3.0"
- "1.4.0"
18 changes: 0 additions & 18 deletions .github/workflows/dco.yml

This file was deleted.

38 changes: 24 additions & 14 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
- [runtimeOnly](#runtimeonly)
- [compileOnly](#compileonly)
- [testImplementation](#testimplementation)
- [Gradle Plugins](#gradle-plugins)
- [Distribution Download Plugin](#distribution-download-plugin)
- [Misc](#misc)
- [git-secrets](#git-secrets)
- [Installation](#installation)
Expand Down Expand Up @@ -63,17 +61,38 @@ Fork [opensearch-project/OpenSearch](https://github.com/opensearch-project/OpenS

#### JDK 11

OpenSearch builds using Java 11 at a minimum. This means you must have a JDK 11 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 11 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-11`.
OpenSearch builds using Java 11 at a minimum, using the Adoptium distribution. This means you must have a JDK 11 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 11 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-11`. This is configured in [buildSrc/build.gradle](buildSrc/build.gradle) and [distribution/tools/java-version-checker/build.gradle](distribution/tools/java-version-checker/build.gradle).

```
allprojects {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
}
```

```
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
```

Download Java 11 from [here](https://adoptium.net/releases.html?variant=openjdk11).

#### JDK 14

To run the full suite of tests, download and install [JDK 14](https://jdk.java.net/archive/) and set `JAVA11_HOME`, and `JAVA14_HOME`. They are required by the [backwards compatibility test](./TESTING.md#testing-backwards-compatibility).

#### Runtime JDK
#### JDK 17

By default, the test tasks use bundled JDK runtime, configured in `buildSrc/version.properties` and set to JDK 17 (LTS). Other kind of test tasks (integration, cluster, ... ) use the same runtime as `JAVA_HOME`. However, the build supports compiling with JDK 11 and testing on a different version of JDK runtime. To do this, set `RUNTIME_JAVA_HOME` pointing to the Java home of another JDK installation, e.g. `RUNTIME_JAVA_HOME=/usr/lib/jvm/jdk-14`. Alternatively, the runtime JDK version could be provided as the command line argument, using combination of `runtime.java=<major JDK version>` property and `JAVA<major JDK version>_HOME` environment variable, for example `./gradlew -Druntime.java=17 ...` (in this case, the tooling expects `JAVA17_HOME` environment variable to be set).
By default, the test tasks use bundled JDK runtime, configured in [buildSrc/version.properties](buildSrc/version.properties), and set to JDK 17 (LTS).

```
bundled_jdk_vendor = adoptium
bundled_jdk = 17.0.2+8
```

#### Custom Runtime JDK

Other kind of test tasks (integration, cluster, etc.) use the same runtime as `JAVA_HOME`. However, the build also supports compiling with one version of JDK, and testing on a different version. To do this, set `RUNTIME_JAVA_HOME` pointing to the Java home of another JDK installation, e.g. `RUNTIME_JAVA_HOME=/usr/lib/jvm/jdk-14`. Alternatively, the runtime JDK version could be provided as the command line argument, using combination of `runtime.java=<major JDK version>` property and `JAVA<major JDK version>_HOME` environment variable, for example `./gradlew -Druntime.java=17 ...` (in this case, the tooling expects `JAVA17_HOME` environment variable to be set).

#### Windows

Expand Down Expand Up @@ -342,15 +361,6 @@ somehow. OpenSearch plugins use this configuration to include dependencies that
Code that is on the classpath for compiling tests that are part of this project but not production code. The canonical example
of this is `junit`.

### Gradle Plugins

#### Distribution Download Plugin

The Distribution Download plugin downloads the latest version of OpenSearch by default, and supports overriding this behavior by setting `customDistributionUrl`.
```
./gradlew integTest -DcustomDistributionUrl="https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/1127/linux/x64/dist/opensearch-1.2.0-linux-x64.tar.gz"
```

## Misc

### git-secrets
Expand Down
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ The YAML REST tests support all the options provided by the randomized runner, p

- `tests.rest.suite`: comma separated paths of the test suites to be run (by default loaded from /rest-api-spec/test). It is possible to run only a subset of the tests providing a sub-folder or even a single yaml file (the default /rest-api-spec/test prefix is optional when files are loaded from classpath) e.g. `-Dtests.rest.suite=index,get,create/10_with_id`

- `tests.rest.blacklist`: comma separated globs that identify tests that are blacklisted and need to be skipped e.g. `-Dtests.rest.blacklist=index/**/Index document,get/10_basic/**`
- `tests.rest.blacklist`: comma separated globs that identify tests that are denylisted and need to be skipped e.g. `-Dtests.rest.blacklist=index/**/Index document,get/10_basic/**`

Java REST tests can be run with the "javaRestTest" task.

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh"
// Dependencies of JMH
runtimeOnly 'net.sf.jopt-simple:jopt-simple:5.0.4'
runtimeOnly 'org.apache.commons:commons-math3:3.2'
runtimeOnly 'org.apache.commons:commons-math3:3.6.1'
}

// enable the JMH's BenchmarkProcessor to generate the final benchmark classes
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ allprojects {
compile.options.compilerArgs << '-Xlint:opens'
compile.options.compilerArgs << '-Xlint:overloads'
compile.options.compilerArgs << '-Xlint:overrides'
compile.options.compilerArgs << '-Xlint:processing'
compile.options.compilerArgs << '-Xlint:-processing'
compile.options.compilerArgs << '-Xlint:rawtypes'
compile.options.compilerArgs << '-Xlint:removal'
compile.options.compilerArgs << '-Xlint:requires-automatic'
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ dependencies {
api 'commons-codec:commons-codec:1.15'
api 'org.apache.commons:commons-compress:1.21'
api 'org.apache.ant:ant:1.10.12'
api 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
api 'com.netflix.nebula:gradle-extra-configurations-plugin:7.0.0'
api 'com.netflix.nebula:nebula-publishing-plugin:4.4.4'
api 'com.netflix.nebula:gradle-info-plugin:7.1.3'
api 'org.apache.rat:apache-rat:0.13'
Expand All @@ -124,7 +124,7 @@ dependencies {
testFixturesApi gradleTestKit()
testImplementation 'com.github.tomakehurst:wiremock-jre8-standalone:2.23.2'
testImplementation "org.mockito:mockito-core:${props.getProperty('mockito')}"
integTestImplementation('org.spockframework:spock-core:2.0-groovy-3.0') {
integTestImplementation('org.spockframework:spock-core:2.1-groovy-3.0') {
exclude module: "groovy"
}
}
Expand Down Expand Up @@ -158,8 +158,8 @@ if (project != rootProject) {
apply plugin: 'opensearch.publish'

allprojects {
targetCompatibility = 11
sourceCompatibility = 11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
}

// groovydoc succeeds, but has some weird internal exception...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static boolean canBeResolved(Configuration configuration) {
return false;
}
if (configuration instanceof org.gradle.internal.deprecation.DeprecatableConfiguration) {
var deprecatableConfiguration = (DeprecatableConfiguration) configuration;
DeprecatableConfiguration deprecatableConfiguration = (DeprecatableConfiguration) configuration;
if (deprecatableConfiguration.canSafelyBeResolved() == false) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public void apply(Project project) {

setupResolutionsContainer(project);
setupDistributionContainer(project, dockerSupport);
setupDownloadServiceRepo(project);
project.afterEvaluate(this::setupDistributions);
}

Expand Down Expand Up @@ -152,7 +153,6 @@ void setupDistributions(Project project) {
dependencies.add(distribution.getExtracted().getName(), distributionDependency.getExtractedNotation());
}
}
setupDownloadServiceRepo(project);
}

private DistributionDependency resolveDependencyNotation(Project p, OpenSearchDistribution distribution) {
Expand Down Expand Up @@ -195,22 +195,15 @@ private static void setupDownloadServiceRepo(Project project) {
if (project.getRepositories().findByName(DOWNLOAD_REPO_NAME) != null) {
return;
}
Object customDistributionUrl = project.findProperty("customDistributionUrl");
// checks if custom Distribution Url has been passed by user from plugins
if (customDistributionUrl != null) {
addIvyRepo(project, DOWNLOAD_REPO_NAME, customDistributionUrl.toString(), FAKE_IVY_GROUP, "");
addIvyRepo(project, SNAPSHOT_REPO_NAME, customDistributionUrl.toString(), FAKE_SNAPSHOT_IVY_GROUP, "");
} else {
addIvyRepo(
project,
DOWNLOAD_REPO_NAME,
"https://artifacts.opensearch.org",
FAKE_IVY_GROUP,
"/releases" + RELEASE_PATTERN_LAYOUT,
"/release-candidates" + RELEASE_PATTERN_LAYOUT
);
addIvyRepo(project, SNAPSHOT_REPO_NAME, "https://artifacts.opensearch.org", FAKE_SNAPSHOT_IVY_GROUP, SNAPSHOT_PATTERN_LAYOUT);
}
addIvyRepo(
project,
DOWNLOAD_REPO_NAME,
"https://artifacts.opensearch.org",
FAKE_IVY_GROUP,
"/releases" + RELEASE_PATTERN_LAYOUT,
"/release-candidates" + RELEASE_PATTERN_LAYOUT
);
addIvyRepo(project, SNAPSHOT_REPO_NAME, "https://artifacts.opensearch.org", FAKE_SNAPSHOT_IVY_GROUP, SNAPSHOT_PATTERN_LAYOUT);

addIvyRepo2(project, DOWNLOAD_REPO_NAME_ES, "https://artifacts-no-kpi.elastic.co", FAKE_IVY_GROUP_ES);
addIvyRepo2(project, SNAPSHOT_REPO_NAME_ES, "https://snapshots-no-kpi.elastic.co", FAKE_SNAPSHOT_IVY_GROUP_ES);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
/**
* A wrapper around gradle's Exec task to capture output and log on error.
*/
@SuppressWarnings("unchecked")
public class LoggedExec extends Exec implements FileSystemOperationsAware {

private static final Logger LOGGER = Logging.getLogger(LoggedExec.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
import org.gradle.language.base.plugins.LifecycleBasePlugin;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;

import static org.opensearch.gradle.util.Util.toStringable;
Expand Down Expand Up @@ -173,7 +173,10 @@ public static void configureCompile(Project project) {
// workaround for https://github.com/gradle/gradle/issues/14141
compileTask.getConventionMapping().map("sourceCompatibility", () -> java.getSourceCompatibility().toString());
compileTask.getConventionMapping().map("targetCompatibility", () -> java.getTargetCompatibility().toString());
compileOptions.getRelease().set(releaseVersionProviderFromCompileTask(project, compileTask));
// The '--release is available from JDK-9 and above
if (BuildParams.getRuntimeJavaVersion().compareTo(JavaVersion.VERSION_1_8) > 0) {
compileOptions.getRelease().set(releaseVersionProviderFromCompileTask(project, compileTask));
}
});
// also apply release flag to groovy, which is used in build-tools
project.getTasks().withType(GroovyCompile.class).configureEach(compileTask -> {
Expand Down Expand Up @@ -212,10 +215,12 @@ static void configureJars(Project project) {
public void execute(Task task) {
// this doFirst is added before the info plugin, therefore it will run
// after the doFirst added by the info plugin, and we can override attributes
jarTask.getManifest()
.attributes(
Map.of("Build-Date", BuildParams.getBuildDate(), "Build-Java-Version", BuildParams.getGradleJavaVersion())
);
jarTask.getManifest().attributes(new HashMap<String, Object>() {
{
put("Build-Date", BuildParams.getBuildDate());
put("Build-Java-Version", BuildParams.getGradleJavaVersion());
}
});
}
});
});
Expand Down Expand Up @@ -265,7 +270,9 @@ private static void configureJavadoc(Project project) {
* that the default will change to html5 in the future.
*/
CoreJavadocOptions javadocOptions = (CoreJavadocOptions) javadoc.getOptions();
javadocOptions.addBooleanOption("html5", true);
if (BuildParams.getRuntimeJavaVersion().compareTo(JavaVersion.VERSION_1_8) > 0) {
javadocOptions.addBooleanOption("html5", true);
}
});

TaskProvider<Javadoc> javadoc = project.getTasks().withType(Javadoc.class).named("javadoc");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.gradle.api.tasks.testing.Test;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

import static org.opensearch.gradle.util.FileUtils.mkdirs;
Expand Down Expand Up @@ -95,7 +96,7 @@ public void apply(Project project) {

// We specifically use an anonymous inner class here because lambda task actions break Gradle cacheability
// See: https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:how_does_it_work
test.doFirst(new Action<>() {
test.doFirst(new Action<Task>() {
@Override
public void execute(Task t) {
mkdirs(testOutputDir);
Expand Down Expand Up @@ -137,20 +138,16 @@ public void execute(Task t) {
test.jvmArgs("-ea", "-esa");
}

Map<String, String> sysprops = Map.of(
"java.awt.headless",
"true",
"tests.gradle",
"true",
"tests.artifact",
project.getName(),
"tests.task",
test.getPath(),
"tests.security.manager",
"true",
"jna.nosys",
"true"
);
Map<String, String> sysprops = new HashMap<String, String>() {
{
put("java.awt.headless", "true");
put("tests.gradle", "true");
put("tests.artifact", project.getName());
put("tests.task", test.getPath());
put("tests.security.manager", "true");
put("jna.nosys", "true");
}
};
test.systemProperties(sysprops);

// ignore changing test seed when build is passed -Dignore.tests.seed for cacheability experimentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void apply(Project project) {
.resolve(".gradle")
.resolve("reaper")
.resolve("build-" + ProcessHandle.current().pid());

ReaperService service = project.getExtensions()
.create("reaper", ReaperService.class, project, project.getBuildDir().toPath(), inputDir);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -280,7 +281,7 @@ static Map<String, String> parseOsRelease(final List<String> osReleaseLines) {
*/
private Optional<String> getDockerPath() {
// Check if the Docker binary exists
return List.of(DOCKER_BINARIES).stream().filter(path -> new File(path).exists()).findFirst();
return Arrays.asList(DOCKER_BINARIES).stream().filter(path -> new File(path).exists()).findFirst();
}

/**
Expand All @@ -291,7 +292,7 @@ private Optional<String> getDockerPath() {
*/
private Optional<String> getDockerComposePath() {
// Check if the Docker binary exists
return List.of(DOCKER_COMPOSE_BINARIES).stream().filter(path -> new File(path).exists()).findFirst();
return Arrays.asList(DOCKER_COMPOSE_BINARIES).stream().filter(path -> new File(path).exists()).findFirst();
}

private void throwDockerRequiredException(final String message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void apply(Project project) {
});

TaskProvider<LoggedExec> fetchLatestTaskProvider = tasks.register("fetchLatest", LoggedExec.class, fetchLatest -> {
var gitFetchLatest = project.getProviders()
Provider<Object> gitFetchLatest = project.getProviders()
.systemProperty("tests.bwc.git_fetch_latest")
.forUseAtConfigurationTime()
.orElse("true")
Expand All @@ -122,7 +122,7 @@ public void apply(Project project) {
}
throw new GradleException("tests.bwc.git_fetch_latest must be [true] or [false] but was [" + fetchProp + "]");
});
fetchLatest.onlyIf(t -> project.getGradle().getStartParameter().isOffline() == false && gitFetchLatest.get());
fetchLatest.onlyIf(t -> project.getGradle().getStartParameter().isOffline() == false && gitFetchLatest.get() != null);
fetchLatest.dependsOn(addRemoteTaskProvider);
fetchLatest.setWorkingDir(gitExtension.getCheckoutDir().get());
fetchLatest.setCommandLine(asList("git", "fetch", "--all"));
Expand Down
Loading

0 comments on commit 7360562

Please sign in to comment.