Skip to content

Commit

Permalink
Improve serialization speeds (#2802)
Browse files Browse the repository at this point in the history
Use custom serialization in security plugin. 
- Resolves #2780

Signed-off-by: Paras Jain <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Co-authored-by: Paras Jain <[email protected]>
Co-authored-by: Peter Nied <[email protected]>
  • Loading branch information
3 people authored Sep 29, 2023
1 parent 8628a89 commit 22f44d3
Show file tree
Hide file tree
Showing 30 changed files with 1,842 additions and 472 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ jobs:
arguments: |
integrationTest -Dbuild.snapshot=false
backward-compatibility-build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v3
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 17

- name: Checkout Security Repo
uses: actions/checkout@v4

- name: Build BWC tests
uses: gradle/gradle-build-action@v2
with:
cache-disabled: true
arguments: |
-p bwc-test build -x test -x integTest
backward-compatibility:
strategy:
fail-fast: false
Expand Down
4 changes: 4 additions & 0 deletions bwc-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ buildscript {
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT")
opensearch_group = "org.opensearch"
common_utils_version = System.getProperty("common_utils.version", '2.9.0.0-SNAPSHOT')
jackson_version = System.getProperty("jackson_version", "2.15.2")
}
repositories {
mavenLocal()
Expand All @@ -72,6 +73,9 @@ dependencies {
testImplementation "org.opensearch.test:framework:${opensearch_version}"
testImplementation "org.apache.logging.log4j:log4j-core:${versions.log4j}"
testImplementation "org.opensearch:common-utils:${common_utils_version}"
testImplementation "com.fasterxml.jackson.core:jackson-databind:${jackson_version}"
testImplementation "com.fasterxml.jackson.core:jackson-annotations:${jackson_version}"

}

loggerUsageCheck.enabled = false
Expand Down
205 changes: 0 additions & 205 deletions bwc-test/src/test/java/SecurityBackwardsCompatibilityIT.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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
* compatible open source license.
*/

package org.opensearch.security.bwc;

public enum ClusterType {
OLD,
MIXED,
UPGRADED;

public static ClusterType parse(String value) {
switch (value) {
case "old_cluster":
return OLD;
case "mixed_cluster":
return MIXED;
case "upgraded_cluster":
return UPGRADED;
default:
throw new AssertionError("unknown cluster type: " + value);
}
}
}
Loading

0 comments on commit 22f44d3

Please sign in to comment.