Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,6 @@ ActionRequestValidationException validateNoCrossProjectWhenCrossProjectFeatureIs
validationException
);
}
// verify there is no project routing
if (getSource().getProjectRouting() != null) {
validationException = addValidationError(
"Cross-project calls are not supported, but project_routing was requested: " + getSource().getProjectRouting(),
validationException
);
}
}
return validationException;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1139,10 +1139,6 @@ public void testCrossProjectWithFeatureDisabled() throws IOException {
validationException.getMessage(),
containsString("Cross-project calls are not supported, but remote indices were requested: [project-1:src]")
);
assertThat(
validationException.getMessage(),
containsString("Cross-project calls are not supported, but project_routing was requested: _alias:_origin")
);
}

public void testNotCrossProjectEnvironment() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.elasticsearch.xpack.core.transform.action.ValidateTransformAction;
import org.elasticsearch.xpack.core.transform.action.ValidateTransformAction.Request;
import org.elasticsearch.xpack.core.transform.action.ValidateTransformAction.Response;
import org.elasticsearch.xpack.core.transform.transforms.TransformConfig;
import org.elasticsearch.xpack.transform.TransformServices;
import org.elasticsearch.xpack.transform.transforms.FunctionFactory;
import org.elasticsearch.xpack.transform.transforms.TransformNodes;
Expand Down Expand Up @@ -152,8 +151,7 @@ protected void doExecute(Task task, Request request, ActionListener<Response> li

// <3> Validate Project Routing is not set when CPS is not supported
ActionListener<Boolean> validateProjectRoutingListener = validateConfigListener.delegateFailureAndWrap((l, ignored) -> {
if (config.getSource().getProjectRouting() == null
|| (crossProjectModeDecider.crossProjectEnabled() && TransformConfig.TRANSFORM_CROSS_PROJECT.isEnabled())) {
if (config.getSource().getProjectRouting() == null || crossProjectModeDecider.crossProjectEnabled()) {
l.onResponse(true);
} else {
l.onFailure(
Expand Down