-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'opensearch-project:main' into fdp
- Loading branch information
Showing
856 changed files
with
24,231 additions
and
5,953 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ BWC_VERSION: | |
- "2.7.0" | ||
- "2.7.1" | ||
- "2.8.0" | ||
- "2.8.1" | ||
- "2.9.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @reta @anasalkouz @andrross @reta @Bukhtawar @CEHENKLE @dblock @gbbafna @setiah @kartg @kotwanikunal @mch2 @nknize @owaiskazi19 @Rishikesh1159 @ryanbogan @saratvemulapalli @shwetathareja @dreamer-89 @tlfeng @VachaShah @dbwiddis | ||
* @reta @anasalkouz @andrross @reta @Bukhtawar @CEHENKLE @dblock @gbbafna @setiah @kartg @kotwanikunal @mch2 @nknize @owaiskazi19 @Rishikesh1159 @ryanbogan @saratvemulapalli @shwetathareja @dreamer-89 @tlfeng @VachaShah @dbwiddis @sachinpkale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Add comment | ||
on: | ||
issues: | ||
types: | ||
- labeled | ||
jobs: | ||
add-comment: | ||
if: github.event.label.name == 'poc' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Add comment | ||
uses: peter-evans/create-or-update-comment@v2 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
### POC Checklist: | ||
Please go through the following checklist to ensure these items are taken into account while designing the POC. | ||
- [ ] Supports safe upgrade paths from all supported BWC versions to the current version | ||
- [ ] Supports compatibility with all plugins | ||
- [ ] opensearch-alerting | ||
- [ ] opensearch-anomaly-detection | ||
- [ ] opensearch-asynchronous-search | ||
- [ ] opensearch-cross-cluster-replication | ||
- [ ] opensearch-geospatial | ||
- [ ] opensearch-index-management | ||
- [ ] opensearch-job-scheduler | ||
- [ ] opensearch-knn | ||
- [ ] opensearch-ml | ||
- [ ] opensearch-notifications | ||
- [ ] opensearch-notifications-core | ||
- [ ] opensearch-observability | ||
- [ ] opensearch-performance-analyzer | ||
- [ ] opensearch-reports-scheduler | ||
- [ ] opensearch-security | ||
- [ ] opensearch-sql | ||
- [ ] Supports lucene upgrades across minor lucene versions | ||
- [ ] Supports lucene upgrades across major lucene versions | ||
- [ ] Supports lucene upgrades across underlying lucene codec bumps (Eg: Lucene95Codec -> Lucene96Codec) | ||
- [ ] Supports wire compatibility of OpenSearch | ||
- [ ] Plan to measure performance degradation/improvement (if any) | ||
- [ ] Plan to document any user facing changes introduced by this feature | ||
- [ ] Ensure working and passing CI | ||
Thank you for your contribution! | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
buildSrc/src/main/groovy/org/opensearch/gradle/plugin/OptionalDependenciesPlugin.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
/* | ||
* Copyright 2014-2016 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.opensearch.gradle.plugin | ||
|
||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.api.publish.PublishingExtension | ||
import org.gradle.api.publish.ivy.IvyPublication | ||
import org.gradle.api.publish.maven.MavenPublication | ||
import org.gradle.api.publish.plugins.PublishingPlugin | ||
|
||
/** | ||
* Including the support of `optional` dependencies: /~https://github.com/nebula-plugins/gradle-extra-configurations-plugin/blob/v9.0.0/src/main/groovy/nebula/plugin/extraconfigurations/OptionalBasePlugin.groovy | ||
*/ | ||
class OptionalDependenciesPlugin implements Plugin<Project> { | ||
static final String OPTIONAL_IDENTIFIER = 'optional' | ||
|
||
@Override | ||
void apply(Project project) { | ||
enhanceProjectModel(project) | ||
configureMavenPublishPlugin(project) | ||
configureIvyPublishPlugin(project) | ||
} | ||
|
||
/** | ||
* Enhances the Project domain object by adding | ||
* | ||
* a) a extra property List that holds optional dependencies | ||
* b) a extra method that can be executed as parameter when declaring dependencies | ||
* | ||
* @param project Project | ||
*/ | ||
private void enhanceProjectModel(Project project) { | ||
project.ext.optionalDeps = [] | ||
|
||
project.ext.optional = { dep -> | ||
project.ext.optionalDeps << dep | ||
} | ||
} | ||
|
||
/** | ||
* Configures Maven Publishing plugin to ensure that published dependencies receive the optional element. | ||
* | ||
* @param project Project | ||
*/ | ||
private void configureMavenPublishPlugin(Project project) { | ||
project.plugins.withType(PublishingPlugin) { | ||
project.publishing { | ||
publications { | ||
project.extensions.findByType(PublishingExtension)?.publications?.withType(MavenPublication) { MavenPublication pub -> | ||
pub.pom.withXml { | ||
project.ext.optionalDeps.each { dep -> | ||
def foundDep = asNode().dependencies.dependency.find { | ||
it.groupId.text() == dep.group && it.artifactId.text() == dep.name | ||
} | ||
|
||
if (foundDep) { | ||
if (foundDep.optional) { | ||
foundDep.optional.value = 'true' | ||
} else { | ||
foundDep.appendNode(OPTIONAL_IDENTIFIER, 'true') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* Configures Ivy Publishing plugin to ensure that published dependencies receive the correct conf attribute value. | ||
* | ||
* @param project Project | ||
*/ | ||
private void configureIvyPublishPlugin(Project project) { | ||
project.plugins.withType(PublishingPlugin) { | ||
project.publishing { | ||
publications { | ||
project.extensions.findByType(PublishingExtension)?.publications?.withType(IvyPublication) { IvyPublication pub -> | ||
pub.descriptor.withXml { | ||
def rootNode = asNode() | ||
|
||
// Add optional configuration if it doesn't exist yet | ||
if (!rootNode.configurations.find { it.@name == OPTIONAL_IDENTIFIER }) { | ||
rootNode.configurations[0].appendNode('conf', [name: OPTIONAL_IDENTIFIER, visibility: 'public']) | ||
} | ||
|
||
// Replace dependency "runtime->default" conf attribute value with "optional" | ||
project.ext.optionalDeps.each { dep -> | ||
def foundDep = rootNode.dependencies.dependency.find { it.@name == dep.name } | ||
foundDep?.@conf = OPTIONAL_IDENTIFIER | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.