|
20 | 20 | import org.elasticsearch.action.support.master.AcknowledgedResponse; |
21 | 21 | import org.elasticsearch.client.internal.Client; |
22 | 22 | import org.elasticsearch.client.internal.node.NodeClient; |
| 23 | +import org.elasticsearch.cluster.AbstractNamedDiffable; |
23 | 24 | import org.elasticsearch.cluster.ClusterModule; |
24 | 25 | import org.elasticsearch.cluster.ClusterState; |
25 | 26 | import org.elasticsearch.cluster.NamedDiff; |
|
59 | 60 | import org.elasticsearch.test.XContentTestUtils; |
60 | 61 | import org.elasticsearch.transport.netty4.Netty4Plugin; |
61 | 62 | import org.elasticsearch.xcontent.NamedXContentRegistry; |
| 63 | +import org.elasticsearch.xcontent.ParseField; |
62 | 64 | import org.elasticsearch.xpack.autoscaling.Autoscaling; |
63 | 65 | import org.elasticsearch.xpack.autoscaling.AutoscalingMetadata; |
64 | 66 | import org.elasticsearch.xpack.autoscaling.capacity.AutoscalingDeciderResult; |
|
99 | 101 | import org.elasticsearch.xpack.esql.core.plugin.EsqlCorePlugin; |
100 | 102 | import org.elasticsearch.xpack.esql.plugin.EsqlPlugin; |
101 | 103 | import org.elasticsearch.xpack.ilm.IndexLifecycle; |
| 104 | +import org.elasticsearch.xpack.inference.registry.ClearInferenceEndpointCacheAction; |
102 | 105 | import org.elasticsearch.xpack.inference.registry.ModelRegistryMetadata; |
103 | 106 | import org.elasticsearch.xpack.ml.LocalStateMachineLearning; |
104 | 107 | import org.elasticsearch.xpack.ml.autoscaling.MlScalingReason; |
@@ -436,6 +439,24 @@ protected void assertClusterRoundTrip() throws IOException { |
436 | 439 | new NamedWriteableRegistry.Entry(Metadata.ProjectCustom.class, ModelRegistryMetadata.TYPE, ModelRegistryMetadata::new) |
437 | 440 | ); |
438 | 441 | entries.add(new NamedWriteableRegistry.Entry(NamedDiff.class, ModelRegistryMetadata.TYPE, ModelRegistryMetadata::readDiffFrom)); |
| 442 | + entries.add( |
| 443 | + new NamedWriteableRegistry.Entry( |
| 444 | + Metadata.ProjectCustom.class, |
| 445 | + ClearInferenceEndpointCacheAction.InvalidateCacheMetadata.NAME, |
| 446 | + ClearInferenceEndpointCacheAction.InvalidateCacheMetadata::new |
| 447 | + ) |
| 448 | + ); |
| 449 | + entries.add( |
| 450 | + new NamedWriteableRegistry.Entry( |
| 451 | + NamedDiff.class, |
| 452 | + ClearInferenceEndpointCacheAction.InvalidateCacheMetadata.NAME, |
| 453 | + in -> AbstractNamedDiffable.readDiffFrom( |
| 454 | + Metadata.ProjectCustom.class, |
| 455 | + ClearInferenceEndpointCacheAction.InvalidateCacheMetadata.NAME, |
| 456 | + in |
| 457 | + ) |
| 458 | + ) |
| 459 | + ); |
439 | 460 |
|
440 | 461 | // Retrieve the cluster state from a random node, and serialize and deserialize it. |
441 | 462 | final ClusterStateResponse clusterStateResponse = client().admin() |
|
0 commit comments