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

[Backport 2.x] fix build errors caused by filterIndices method being moved from SnapshotUtils to IndexUtils (#4312) #4319

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/plugin_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Plugin Install
on: [push, pull_request, workflow_dispatch]

env:
OPENSEARCH_VERSION: 2.14.0
OPENSEARCH_VERSION: 2.15.0
PLUGIN_NAME: opensearch-security

jobs:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import groovy.json.JsonBuilder

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.14.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.15.0-SNAPSHOT")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")

Expand Down
4 changes: 2 additions & 2 deletions bwc-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ext {

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.14.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.15.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")
Expand Down Expand Up @@ -83,7 +83,7 @@ testingConventions.enabled = false
validateNebulaPom.enabled = false

String previousVersion = System.getProperty("bwc.version.previous", "2.10.0.0")
String nextVersion = System.getProperty("bwc.version.next", "2.14.0.0")
String nextVersion = System.getProperty("bwc.version.next", "2.15.0.0")

String bwcVersion = previousVersion
String baseName = "securityBwcCluster"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
import org.opensearch.cluster.metadata.IndexAbstraction;
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.util.IndexUtils;
import org.opensearch.core.index.Index;
import org.opensearch.index.IndexNotFoundException;
import org.opensearch.index.reindex.ReindexRequest;
Expand All @@ -91,7 +92,6 @@
import org.opensearch.security.support.SnapshotRestoreHelper;
import org.opensearch.security.support.WildcardMatcher;
import org.opensearch.snapshots.SnapshotInfo;
import org.opensearch.snapshots.SnapshotUtils;
import org.opensearch.transport.RemoteClusterService;
import org.opensearch.transport.TransportRequest;

Expand Down Expand Up @@ -694,7 +694,7 @@ private boolean getOrReplaceAllIndices(final Object request, final IndicesProvid
);
provider.provide(new String[] { "*" }, request, false);
} else {
final List<String> requestedResolvedIndices = SnapshotUtils.filterIndices(
final List<String> requestedResolvedIndices = IndexUtils.filterIndices(
snapshotInfo.indices(),
restoreRequest.indices(),
restoreRequest.indicesOptions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
import org.opensearch.SpecialPermission;
import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest;
import org.opensearch.action.support.PlainActionFuture;
import org.opensearch.common.util.IndexUtils;
import org.opensearch.repositories.RepositoriesService;
import org.opensearch.repositories.Repository;
import org.opensearch.security.OpenSearchSecurityPlugin;
import org.opensearch.snapshots.SnapshotId;
import org.opensearch.snapshots.SnapshotInfo;
import org.opensearch.snapshots.SnapshotUtils;
import org.opensearch.threadpool.ThreadPool;

public class SnapshotRestoreHelper {
Expand All @@ -56,7 +56,7 @@ public static List<String> resolveOriginalIndices(RestoreSnapshotRequest restore
log.warn("snapshot repository '{}', snapshot '{}' not found", restoreRequest.repository(), restoreRequest.snapshot());
return null;
} else {
return SnapshotUtils.filterIndices(snapshotInfo.indices(), restoreRequest.indices(), restoreRequest.indicesOptions());
return IndexUtils.filterIndices(snapshotInfo.indices(), restoreRequest.indices(), restoreRequest.indicesOptions());
}

}
Expand Down
Loading