Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature/sandboxing branch]Add initial doc for plugin sandboxing #1582

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c86d765
Add extension point for custom TranslogDeletionPolicy in EnginePlugin…
adnapibar Oct 22, 2021
2abd536
Recommend Docker 3.6.0. (#1427)
dblock Oct 22, 2021
a19c373
Adjust CodeCache size to eliminate JVM warnings (and crashes) (#1426)
reta Oct 22, 2021
8394f54
Run spotless and exclude checkstyle on libs module (#1428)
owaiskazi19 Oct 25, 2021
f469d53
[BUG] SymbolicLinkPreservingUntarTransform fails on Windows (#1433)
reta Oct 26, 2021
39ddb77
changed work-in-progress language (#1275)
stockholmux Oct 26, 2021
3f6e1df
Fixing bwc test for repository-multi-version (#1441)
VachaShah Oct 27, 2021
37ac378
Run spotless and exclude checkstyle on modules module (#1442)
owaiskazi19 Oct 27, 2021
12789f8
Close first engine instance before creating second (#1457)
andrross Oct 28, 2021
53334b2
Upgrade to Lucene 8.10.1 (#1440)
nknize Oct 28, 2021
f08ee2c
Moving DCO to workflows (#1458)
CEHENKLE Oct 28, 2021
2cb71a3
Remove deprecated settings and logic for translog pruning by retentio…
adnapibar Oct 29, 2021
294ad0e
[Upgrade] 1.2 BWC to Lucene 8.10.1 (#1460)
nknize Oct 29, 2021
f4bdb94
Run spotless and exclude checkstyle on rest-api-spec module (#1462)
owaiskazi19 Oct 29, 2021
f6115ae
Adding spotless support for subprojects under :test (#1464)
saratvemulapalli Oct 29, 2021
d45f5df
Make TranslogDeletionPolicy abstract for extension (#1456)
adnapibar Nov 1, 2021
9c514d3
Update bundled JDK distribution to 17.0.1+12 (#1476)
reta Nov 1, 2021
2c1e89a
Fixing support for a multi-node cluster via "gradle run" (#1455)
kartg Nov 1, 2021
389b7df
Upgrading dependencies in hdfs plugin (#1466)
VachaShah Nov 1, 2021
681e554
Enabling spotless, disabling checkstyle check on plugins (#1488)
setiah Nov 2, 2021
a439371
Cleanup for Checkstyle (#1370)
owaiskazi19 Nov 2, 2021
af6ae75
Upgrading dependencies (#1491)
VachaShah Nov 2, 2021
f54cc38
remove codeQL warning about implicit narrowing conversion in compound…
xuezhou25 Nov 2, 2021
286121f
Added logic to allow {dot} files on startup (#1437)
ryanbogan Nov 4, 2021
4c42c14
[BWC] Diable BWC tests until branch versions are synced (#1508)
nknize Nov 4, 2021
ac37cc9
Add staged version 1.1.1 (#1506)
nknize Nov 4, 2021
99a356b
[main] Add staged version 1.3.0 for bwc (#1510)
nknize Nov 4, 2021
eb5e454
[bwc] reenable bwc testing after syncing staged branches (#1511)
nknize Nov 5, 2021
546ab21
Use a non-default port for upgrade-cli unit tests (#1512)
andrross Nov 5, 2021
fb78d10
Integration test that checks for settings upgrade (#1482)
meghasaik Nov 9, 2021
37233a9
add codeowners file (#1530)
CEHENKLE Nov 11, 2021
0e6b0c5
[repository-azure] Update to the latest Azure Storage SDK v12, remove…
reta Nov 11, 2021
762601f
Add .whitesource configuration file (#1525)
mend-for-github-com[bot] Nov 11, 2021
c437b34
Update developer guide reference to download JDK 14 (#1452)
andrross Nov 11, 2021
01d1cb0
Updated links for linkchecker (#1539)
ryanbogan Nov 11, 2021
864f98c
Adding initial commit for sandboxing doc
saratvemulapalli Nov 14, 2021
a4eda5a
Adding problem statement
saratvemulapalli Nov 15, 2021
1cc7268
Updating problem statement
saratvemulapalli Nov 15, 2021
c6dd484
Upgrading gson to 2.8.9 (#1541)
VachaShah Nov 15, 2021
90a8a72
Add a whitesource unified agent file and update the config (#1540)
zelinh Nov 17, 2021
bcfb57c
Upgrade dependency (#1571)
VachaShah Nov 18, 2021
d467283
Start MockLogAppender before adding to static context (#1587)
andrross Nov 19, 2021
a15c526
Improve leader node-left logging to indicate timeout/coordination sta…
Poojita-Raj Nov 19, 2021
79eaa06
Add 1.2 release notes and correct 1.1 release notes. (#1581)
mch2 Nov 22, 2021
4eaa60c
Enable RestHighLevel-Client to set parameter require_alias for bulk i…
jbaudisc Nov 22, 2021
0c21689
Renaming slave to replica in filebeat-6.0.template.json file. (#1569)
Rishikesh1159 Nov 22, 2021
12a2294
Giving informative error messages for double slashes in API call URLs…
meghasaik Nov 22, 2021
fd87f3a
Upgrading commons-codec in hdfs-fixture and cleaning up dependencies …
VachaShah Nov 23, 2021
8477290
Adding Github action for auto backport PR creation (#1600)
VachaShah Nov 23, 2021
74943c4
Rename field_masking_span to span_field_masking (#1606)
xuezhou25 Nov 29, 2021
8bf6fa6
Support Gradle 7 (#1609)
reta Nov 29, 2021
231c29f
Support Gradle 7. Fixing publishing to Maven Local for plugins (#1624)
reta Nov 30, 2021
30c31f9
Support Gradle 7. More reliable tasks dependencies for Maven plugins …
reta Nov 30, 2021
4749793
Merge branch 'main' of https://github.com/opensearch-project/OpenSear…
saratvemulapalli Dec 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,6 @@ BWC_VERSION:
- "1.0.0"
- "1.0.1"
- "1.1.0"
- "1.1.1"
- "1.2.0"
- "1.3.0"
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
* @opensearch-project/opensearch-core

16 changes: 16 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Backport
on:
pull_request:
types:
- closed
- labeled

jobs:
backport:
runs-on: ubuntu-latest
name: Backport
steps:
- name: Backport
uses: tibdex/backport@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/dco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Developer Certificate of Origin Check

on: [pull_request]

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@v1.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@v1.1.0
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
15 changes: 15 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"scanSettings": {
"configMode": "LOCAL",
"configExternalURL": "",
"projectToken": "",
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OpenSearch is a community project that is built and maintained by people just li

## Ways to Contribute

**Please note:** OpenSearch is a fork of [Elasticsearch 7.10.2](https://github.com/elastic/elasticsearch), and is work in progress. If you do find references to Elasticsearch (outside of attributions and copyrights!) please [open an issue](https://github.com/opensearch-project/OpenSearch/issues).
**Please note:** OpenSearch is a fork of [Elasticsearch 7.10.2](https://github.com/elastic/elasticsearch). If you do find references to Elasticsearch (outside of attributions and copyrights!) please [open an issue](https://github.com/opensearch-project/OpenSearch/issues).

### Bug Reports

Expand Down
11 changes: 8 additions & 3 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- [Git Clone OpenSearch Repo](#git-clone-opensearch-repo)
- [Install Prerequisites](#install-prerequisites)
- [JDK 11](#jdk-11)
- [JDK 8 and 17](#jdk-8-and-17)
- [JDK 8 and 14](#jdk-8-and-14)
- [Runtime JDK](#runtime-jdk)
- [Windows](#windows)
- [Docker](#docker)
Expand Down Expand Up @@ -44,6 +44,7 @@
- [Aggregations](#aggregations)
- [Distributed Framework](#distributed-framework)
- [Submitting Changes](#submitting-changes)
- [Backports](#backports)

# Developer Guide

Expand All @@ -63,9 +64,9 @@ OpenSearch builds using Java 11 at a minimum. This means you must have a JDK 11

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

#### JDK 8 and 17
#### JDK 8 and 14

To run the full suite of tests, download and install [JDK 8](https://adoptium.net/releases.html?variant=openjdk8) and [17](https://adoptium.net/releases.html?variant=openjdk17) and set `JAVA8_HOME`, `JAVA11_HOME`, and `JAVA14_HOME`. They are required by the [backwards compatibility test](./TESTING.md#testing-backwards-compatibility).
To run the full suite of tests, download and install [JDK 8](https://adoptium.net/releases.html?variant=openjdk8) and [JDK 14](https://jdk.java.net/archive/) and set `JAVA8_HOME`, `JAVA11_HOME`, and `JAVA14_HOME`. They are required by the [backwards compatibility test](./TESTING.md#testing-backwards-compatibility).

#### Runtime JDK

Expand Down Expand Up @@ -408,3 +409,7 @@ Includes:
## Submitting Changes

See [CONTRIBUTING](CONTRIBUTING.md).

## Backports

The Github workflow in [`backport.yml`](.github/workflows/backport.yml) creates backport PRs automatically when the original PR with an appropriate label `backport <backport-branch-name>` is merged to main. For example, if a PR on main needs to be backported to `1.x` branch, add a label `backport 1.x` to the PR. Once this PR is merged to main, the workflow will create a backport PR to the `1.x` branch.
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| Harold Wang | [harold-wang](https://github.com/harold-wang) | Amazon |
| Himanshu Setia | [setiah](https://github.com/setiah) | Amazon |
| Nick Knize | [nknize](https://github.com/nknize) | Amazon |
| Rabi Panda | [adnapibar](adnapibar) | Amazon |
| Rabi Panda | [adnapibar](https://github.com/adnapibar) | Amazon |
| Sarat Vemulapalli | [saratvemulapalli](https://github.com/saratvemulapalli) | Amazon |
| Tianli Feng | [tlfeng](https://github.com/tlfeng) | Amazon |
| Gopala Krishna Ambareesh | [krishna-ggk](https://github.com/krishna-ggk) |Amazon |
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ allprojects {
}
}
boolean hasShadow = project.plugins.hasPlugin(ShadowPlugin)
project.configurations.compile.dependencies
project.configurations.implementation.dependencies
.findAll()
.toSorted(sortClosure)
.each({ c -> depJavadocClosure(hasShadow, c) })
Expand Down
13 changes: 8 additions & 5 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,27 +104,27 @@ dependencies {

api 'commons-codec:commons-codec:1.13'
api 'org.apache.commons:commons-compress:1.21'
api 'org.apache.ant:ant:1.10.9'
api 'org.apache.ant:ant:1.10.12'
api 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
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.11'
api 'org.apache.rat:apache-rat:0.13'
api 'commons-io:commons-io:2.7'
api "net.java.dev.jna:jna:5.5.0"
api 'com.github.jengelman.gradle.plugins:shadow:6.0.0'
api 'de.thetaphi:forbiddenapis:3.0'
api 'com.avast.gradle:gradle-docker-compose-plugin:0.12.1'
api 'org.apache.maven:maven-model:3.6.2'
api 'com.networknt:json-schema-validator:1.0.36'
api 'com.fasterxml.jackson.core:jackson-databind:2.12.5'

compileOnly "com.puppycrawl.tools:checkstyle:${props.getProperty('checkstyle')}"
testImplementation "com.puppycrawl.tools:checkstyle:${props.getProperty('checkstyle')}"
testFixturesApi "junit:junit:${props.getProperty('junit')}"
testFixturesApi "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${props.getProperty('randomizedrunner')}"
testFixturesApi gradleApi()
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:1.3-groovy-2.5') {
integTestImplementation('org.spockframework:spock-core:2.0-groovy-3.0') {
exclude module: "groovy"
}
}
Expand Down Expand Up @@ -260,6 +260,9 @@ if (project != rootProject) {
*/
afterEvaluate {
generatePomFileForPluginMavenPublication.enabled = false
tasks.matching { it.name.contains("PluginMaven") }*.configure {
dependsOn("generatePomFileForNebulaPublication")
}
}

publishing.publications.named("nebula").configure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,11 @@
package org.opensearch.gradle;

import org.opensearch.gradle.test.GradleIntegrationTestCase;
import org.gradle.testkit.runner.BuildResult;

public class ExportOpenSearchBuildResourcesTaskIT extends GradleIntegrationTestCase {

public static final String PROJECT_NAME = "opensearch-build-resources";

public void testUpToDateWithSourcesConfigured() {
getGradleRunner(PROJECT_NAME).withArguments("clean", "-s").build();

BuildResult result = getGradleRunner(PROJECT_NAME).withArguments("buildResources", "-s", "-i").build();
assertTaskSuccessful(result, ":buildResources");
assertBuildFileExists(result, PROJECT_NAME, "build-tools-exported/checkstyle.xml");
assertBuildFileExists(result, PROJECT_NAME, "build-tools-exported/checkstyle_suppressions.xml");

result = getGradleRunner(PROJECT_NAME).withArguments("buildResources", "-s", "-i").build();
assertTaskUpToDate(result, ":buildResources");
assertBuildFileExists(result, PROJECT_NAME, "build-tools-exported/checkstyle.xml");
assertBuildFileExists(result, PROJECT_NAME, "build-tools-exported/checkstyle_suppressions.xml");
}

public void testOutputAsInput() {
BuildResult result = getGradleRunner(PROJECT_NAME).withArguments("clean", "sampleCopy", "-s", "-i").build();

assertTaskSuccessful(result, ":sampleCopy");
assertBuildFileExists(result, PROJECT_NAME, "sampleCopy/checkstyle.xml");
assertBuildFileExists(result, PROJECT_NAME, "sampleCopy/checkstyle_suppressions.xml");
}

public void testIncorrectUsage() {
assertOutputContains(
getGradleRunner(PROJECT_NAME).withArguments("noConfigAfterExecution", "-s", "-i").buildAndFail().getOutput(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class PrecommitTasks {

static void create(Project project, boolean includeDependencyLicenses) {

project.pluginManager.apply(CheckstylePrecommitPlugin)
project.pluginManager.apply(ForbiddenApisPrecommitPlugin)
project.pluginManager.apply(JarHellPrecommitPlugin)
project.pluginManager.apply(ForbiddenPatternsPrecommitPlugin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ public BwcVersions(SortedSet<Version> allVersions, Version currentVersionPropert

private void assertNoOlderThanTwoMajors() {
Set<Integer> majors = groupByMajor.keySet();
if (majors.size() != 2 && currentVersion.getMinor() != 0 && currentVersion.getRevision() != 0) {
// until OpenSearch 3.0 we will need to carry three major support
// (1, 7, 6) && (2, 1, 7) since OpenSearch 1.0 === Legacy 7.x
int numSupportedMajors = (currentVersion.getMajor() < 3) ? 3 : 2;
if (majors.size() != numSupportedMajors && currentVersion.getMinor() != 0 && currentVersion.getRevision() != 0) {
throw new IllegalStateException("Expected exactly 2 majors in parsed versions but found: " + majors);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,17 @@ private void setupRepository(Project project, Jdk jdk) {

if (jdk.getVendor().equals(VENDOR_ADOPTIUM)) {
repoUrl = "https://github.com/adoptium/temurin" + jdk.getMajor() + "-binaries/releases/download/";
// JDK updates are suffixed with 'U' (fe OpenJDK17U), whereas GA releases are not (fe OpenJDK17).
// To distinguish between those, the GA releases have only major version component (fe 17+32),
// the updates always have minor/patch components (fe 17.0.1+12), checking for the presence of
// version separator '.' should be enough.
artifactPattern = "jdk-"
+ jdk.getBaseVersion()
+ "+"
+ jdk.getBuild()
+ "/OpenJDK"
+ jdk.getMajor()
+ (jdk.getBaseVersion().contains(".") ? "U" : "")
+ "-jdk_[classifier]_[module]_hotspot_"
+ jdk.getBaseVersion()
+ "_"
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/org/opensearch/gradle/LoggedExec.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public LoggedExec(FileSystemOperations fileSystemOperations) {
doLast(new Action<Task>() {
@Override
public void execute(Task task) {
if (LoggedExec.this.getExecResult().getExitValue() != 0) {
if (LoggedExec.this.getExecutionResult().get().getExitValue() != 0) {
try {
LoggedExec.this.getLogger().error("Output for " + LoggedExec.this.getExecutable() + ":");
outputLogger.accept(LoggedExec.this.getLogger());
Expand All @@ -94,7 +94,7 @@ public void execute(Task task) {
"Process '%s %s' finished with non-zero exit value %d",
LoggedExec.this.getExecutable(),
LoggedExec.this.getArgs(),
LoggedExec.this.getExecResult().getExitValue()
LoggedExec.this.getExecutionResult().get().getExitValue()
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void apply(Project project) {
File heapdumpDir = new File(project.getBuildDir(), "heapdump");

project.getTasks().withType(Test.class).configureEach(test -> {
File testOutputDir = new File(test.getReports().getJunitXml().getDestination(), "output");
File testOutputDir = new File(test.getReports().getJunitXml().getOutputLocation().getAsFile().get(), "output");

ErrorReportingTestListener listener = new ErrorReportingTestListener(test.getTestLogging(), test.getLogger(), testOutputDir);
test.getExtensions().add("errorReportingTestListener", listener);
Expand Down

This file was deleted.

Loading