Skip to content

Commit

Permalink
Bump version to 2.1.0.0 (#1883)
Browse files Browse the repository at this point in the history
Signed-off-by: cliu123 <lc12251109@gmail.com>
  • Loading branch information
cliu123 authored Jun 16, 2022
1 parent e40d935 commit cd28b11
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ jobs:
cp -r build/ ./bwc-test/
mkdir ./bwc-test/src/test/resources/security_plugin_version_no_snapshot
cp build/distributions/opensearch-security-${security_plugin_version_no_snapshot}.zip ./bwc-test/src/test/resources/${security_plugin_version_no_snapshot}
mkdir bwc-test/src/test/resources/1.3.0.0
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/latest/linux/x64/builds/opensearch/plugins/opensearch-security-1.3.0.0.zip
mv opensearch-security-1.3.0.0.zip bwc-test/src/test/resources/1.3.0.0/
mkdir bwc-test/src/test/resources/2.0.0.0
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.0.0/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-security-2.0.0.0.zip
mv opensearch-security-2.0.0.0.zip bwc-test/src/test/resources/2.0.0.0/
cd bwc-test/
./gradlew bwcTestSuite -Dtests.security.manager=false
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ repositories {
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://d1nvenhzbhpy0q.cloudfront.net/snapshots/lucene/" }
}

ext {
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
opensearch_version = System.getProperty("opensearch.version", "2.0.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.1.0-SNAPSHOT")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
version_tokens = opensearch_version.tokenize('-')
opensearch_build = version_tokens[0] + '.0'
Expand Down
8 changes: 4 additions & 4 deletions bwc-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ext {

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.0.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.1.0-SNAPSHOT")
opensearch_group = "org.opensearch"
}
repositories {
Expand All @@ -73,16 +73,16 @@ dependencies {
testImplementation "org.opensearch.test:framework:${opensearch_version}"
}

String bwcVersion = "1.3.0.0";
String bwcVersion = "2.0.0.0";
String baseName = "securityBwcCluster"
String bwcFilePath = "src/test/resources/"
String projectVersion = "2.0.0.0"
String projectVersion = "2.1.0.0"

2.times {i ->
testClusters {
"${baseName}$i" {
testDistribution = "ARCHIVE"
versions = ["1.3.0","2.0.0"]
versions = ["2.0.0","2.1.0"]
numberOfNodes = 3
plugin(provider(new Callable<RegularFile>() {
@Override
Expand Down
2 changes: 1 addition & 1 deletion bwc-test/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,11 @@ public long nextOrd() throws IOException {
return sortedSetDocValues.nextOrd();
}

@Override
public long docValueCount() {
return sortedSetDocValues.docValueCount();
}

@Override
public BytesRef lookupOrd(long ord) throws IOException {
return mf.mask(sortedSetDocValues.lookupOrd(ord));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ protected void checkGeneralAccess(int status, String username, String password)
rh.sendAdminCertificate = sendAdminCertificate;
}

protected String checkReadAccess(int status, String username, String password, String indexName, String type,
protected String checkReadAccess(int status, String username, String password, String indexName, String actionType,
int id) throws Exception {
boolean sendAdminCertificate = rh.sendAdminCertificate;
rh.sendAdminCertificate = false;
String action = indexName + "/" + type + "/" + id;
String action = indexName + "/" + actionType + "/" + id;
HttpResponse response = rh.executeGetRequest(action,
encodeBasicHeader(username, password));
int returnedStatus = response.getStatusCode();
Expand All @@ -209,12 +209,12 @@ protected String checkReadAccess(int status, String username, String password, S

}

protected String checkWriteAccess(int status, String username, String password, String indexName, String type,
protected String checkWriteAccess(int status, String username, String password, String indexName, String actionType,
int id) throws Exception {

boolean sendAdminCertificate = rh.sendAdminCertificate;
rh.sendAdminCertificate = false;
String action = indexName + "/" + type + "/" + id;
String action = indexName + "/" + actionType + "/" + id;
String payload = "{\"value\" : \"true\"}";
HttpResponse response = rh.executePutRequest(action, payload,
encodeBasicHeader(username, password));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ private void checkAllSfAllowed() throws Exception {
rh.sendAdminCertificate = false;
checkReadAccess(HttpStatus.SC_OK, "picard", "picard", "sf", "_doc", 1);
checkWriteAccess(HttpStatus.SC_OK, "picard", "picard", "sf", "_doc", 1);
// ES7 only supports one doc type, so trying to create a second one leads to 400 BAD REQUEST
checkWriteAccess(HttpStatus.SC_BAD_REQUEST, "picard", "picard", "sf", "public", 1);
}

private void checkAllSfForbidden() throws Exception {
Expand Down

0 comments on commit cd28b11

Please sign in to comment.