diff --git a/server/src/main/java/org/opensearch/action/ActionModule.java b/server/src/main/java/org/opensearch/action/ActionModule.java index 99147e213aad2..3f50b10518e38 100644 --- a/server/src/main/java/org/opensearch/action/ActionModule.java +++ b/server/src/main/java/org/opensearch/action/ActionModule.java @@ -284,7 +284,6 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.extensions.ExtensionsManager; import org.opensearch.extensions.action.ExtensionAction; -import org.opensearch.extensions.action.ExtensionProxyAction; import org.opensearch.extensions.action.ExtensionTransportAction; import org.opensearch.common.settings.IndexScopedSettings; import org.opensearch.common.settings.Settings; @@ -718,13 +717,6 @@ public void reg // Remote Store actions.register(RestoreRemoteStoreAction.INSTANCE, TransportRestoreRemoteStoreAction.class); - // TODO: Remove this and its tests, it is no longer used - // Need to migrate its NAME prefix to the dynamic action name - if (FeatureFlags.isEnabled(FeatureFlags.EXTENSIONS)) { - // ExtensionProxyAction - actions.register(ExtensionProxyAction.INSTANCE, ExtensionTransportAction.class); - } - // Decommission actions actions.register(DecommissionAction.INSTANCE, TransportDecommissionAction.class); actions.register(GetDecommissionStateAction.INSTANCE, TransportGetDecommissionStateAction.class); @@ -992,9 +984,9 @@ public RestController getRestController() { * @opensearch.internal */ public static class DynamicActionRegistry { - // the immutable map of injected transport actions + // will be initialized with the immutable map of injected transport actions private Map actions = Collections.emptyMap(); - // the dynamic map which can be updated over time + // the dynamic map which can be updated over time after initialization private final Map registry = new ConcurrentHashMap<>(); private ActionFilters actionFilters; @@ -1002,7 +994,7 @@ public static class DynamicActionRegistry { private TransportService transportService; /** - * Initialize the immutable actions in the registry. + * Initialize the immutable actions in the registry and provide parameters needed for dynamic actions. * * @param actions The injected map of {@link ActionType} to {@link TransportAction} * @param actionFilters The action filters diff --git a/server/src/main/java/org/opensearch/extensions/action/ExtensionProxyAction.java b/server/src/main/java/org/opensearch/extensions/action/ExtensionProxyAction.java deleted file mode 100644 index 7345cf44e007f..0000000000000 --- a/server/src/main/java/org/opensearch/extensions/action/ExtensionProxyAction.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.extensions.action; - -import org.opensearch.action.ActionType; - -/** - * The main proxy action for all extensions - * - * @opensearch.internal - */ -public class ExtensionProxyAction extends ActionType { - public static final String NAME = "cluster:internal/extensions"; - public static final ExtensionProxyAction INSTANCE = new ExtensionProxyAction(); - - public ExtensionProxyAction() { - super(NAME, ExtensionActionResponse::new); - } -} diff --git a/server/src/test/java/org/opensearch/extensions/action/ExtensionProxyActionTests.java b/server/src/test/java/org/opensearch/extensions/action/ExtensionProxyActionTests.java deleted file mode 100644 index 3719c29090287..0000000000000 --- a/server/src/test/java/org/opensearch/extensions/action/ExtensionProxyActionTests.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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.extensions.action; - -import org.opensearch.test.OpenSearchTestCase; - -public class ExtensionProxyActionTests extends OpenSearchTestCase { - public void testExtensionProxyAction() { - assertEquals("cluster:internal/extensions", ExtensionProxyAction.NAME); - assertEquals(ExtensionProxyAction.class, ExtensionProxyAction.INSTANCE.getClass()); - } -}