Skip to content

Commit 59eaa78

Browse files
committed
Make migrate/20_reindex_status/* pass
1 parent 62c4540 commit 59eaa78

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/action/GetMigrationReindexStatusTransportAction.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.elasticsearch.action.support.IndicesOptions;
2121
import org.elasticsearch.client.internal.Client;
2222
import org.elasticsearch.cluster.node.DiscoveryNode;
23+
import org.elasticsearch.cluster.project.ProjectResolver;
2324
import org.elasticsearch.cluster.service.ClusterService;
2425
import org.elasticsearch.common.util.concurrent.EsExecutors;
2526
import org.elasticsearch.core.Strings;
@@ -48,26 +49,29 @@ public class GetMigrationReindexStatusTransportAction extends HandledTransportAc
4849
private final ClusterService clusterService;
4950
private final TransportService transportService;
5051
private final Client client;
52+
private final ProjectResolver projectResolver;
5153

5254
@Inject
5355
public GetMigrationReindexStatusTransportAction(
5456
ClusterService clusterService,
5557
TransportService transportService,
5658
ActionFilters actionFilters,
57-
Client client
59+
Client client,
60+
ProjectResolver projectResolver
5861
) {
5962
super(GetMigrationReindexStatusAction.NAME, transportService, actionFilters, Request::new, EsExecutors.DIRECT_EXECUTOR_SERVICE);
6063
this.clusterService = clusterService;
6164
this.transportService = transportService;
6265
this.client = client;
66+
this.projectResolver = projectResolver;
6367
}
6468

6569
@Override
6670
protected void doExecute(Task task, Request request, ActionListener<Response> listener) {
6771
String index = request.getIndex();
6872
String persistentTaskId = ReindexDataStreamAction.TASK_ID_PREFIX + index;
6973
PersistentTasksCustomMetadata.PersistentTask<?> persistentTask = PersistentTasksCustomMetadata.getTaskWithId(
70-
clusterService.state(),
74+
projectResolver.getProjectMetadata(clusterService.state()),
7175
persistentTaskId
7276
);
7377
if (persistentTask == null) {

x-pack/qa/multi-project/xpack-rest-tests-with-multiple-projects/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ tasks.named("yamlRestTest").configure {
4949
'^ilm/60_operation_mode/*',
5050
'^ilm/80_health/*',
5151
'^logsdb/10_usage/*',
52-
'^migrate/20_reindex_status/*',
5352
'^migrate/30_create_from/*',
5453
'^migration/10_get_feature_upgrade_status/*',
5554
'^migration/20_post_feature_upgrade/*',

0 commit comments

Comments
 (0)