most likely due to https://github.com/elastic/elasticsearch/commit/f6fcfe51d0fb6fe801f29a3025dacb9752c97f3f

**Build scan:**
https://gradle-enterprise.elastic.co/s/46n4vkx6fe2kw/tests/:x-pack:plugin:ml:qa:ml-with-security:yamlRestTest/org.elasticsearch.smoketest.MlWithSecurityIT/test%20%7Byaml=ml%2F3rd_party_deployment%2FTest%20start%20deployment%20fails%20while%20model%20download%20in%20progress%7D


**Reproduction line:**
```
./gradlew ':x-pack:plugin:ml:qa:ml-with-security:yamlRestTest' --tests "org.elasticsearch.smoketest.MlWithSecurityIT.test {yaml=ml/3rd_party_deployment/Test start deployment fails while model download in progress}" -Dtests.seed=6AE1748ADF67F8A2 -Dtests.locale=ar-KW -Dtests.timezone=Europe/Ljubljana -Druntime.java=21
```

**Applicable branches:**
main

**Reproduces locally?:**
Didn't try

**Failure history:**
[Failure dashboard for `org.elasticsearch.smoketest.MlWithSecurityIT#test {yaml=ml/3rd_party_deployment/Test start deployment fails while model download in progress}`](https://es-delivery-stats.elastic.dev/app/dashboards#/view/dcec9e60-72ac-11ee-8f39-55975ded9e63?_g=(refreshInterval:(pause:!t,value:60000),time:(from:now-7d%2Fd,to:now))&_a=(controlGroupInput:(chainingSystem:HIERARCHICAL,controlStyle:twoLine,ignoreParentSettings:(ignoreFilters:!f,ignoreQuery:!f,ignoreTimerange:!f,ignoreValidations:!t),panels:('0c0c9cb8-ccd2-45c6-9b13-96bac4abc542':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:task.keyword,grow:!t,id:'0c0c9cb8-ccd2-45c6-9b13-96bac4abc542',searchTechnique:wildcard,selectedOptions:!(),singleSelect:!t,title:'Gradle%20Task',width:medium),grow:!t,order:0,type:optionsListControl,width:small),'144933da-5c1b-4257-a969-7f43455a7901':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:name.keyword,grow:!t,id:'144933da-5c1b-4257-a969-7f43455a7901',searchTechnique:wildcard,selectedOptions:!('test%20%7Byaml%3Dml/3rd_party_deployment/Test%20start%20deployment%20fails%20while%20model%20download%20in%20progress%7D'),title:Test,width:medium),grow:!t,order:2,type:optionsListControl,width:medium),'4e6ad9d6-6fdc-4fcc-bf1a-aa6ca79e0850':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:className.keyword,grow:!t,id:'4e6ad9d6-6fdc-4fcc-bf1a-aa6ca79e0850',searchTechnique:wildcard,selectedOptions:!('org.elasticsearch.smoketest.MlWithSecurityIT'),title:Suite,width:medium),grow:!t,order:1,type:optionsListControl,width:medium)))))


**Failure excerpt:**
```
java.lang.AssertionError: Failure at [ml/3rd_party_deployment:231]: the error message was expected to match the provided regex but didn't
Expected: Model download task is currently running\. Wait for trained model \[.elser_model_2\] download task to complete then try again
     but: was "{root_cause=[{type=status_exception, reason=Model definition truncated. Unable to deserialize trained model definition [.elser_model_2], stack_trace=org.elasticsearch.ElasticsearchStatusException: Model definition truncated. Unable to deserialize trained model definition [.elser_model_2]\n\tat org.elasticsearch.xcore@8.12.0-SNAPSHOT/org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper.badRequestException(ExceptionsHelper.java:90)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.lambda$step3VerifyModelPartsArePresent$17(TransportStartTrainedModelDeploymentAction.java:499)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.failOrRespondWith0(TransportStartTrainedModelDeploymentAction.java:586)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.lambda$step3VerifyModelPartsArePresent$18(TransportStartTrainedModelDeploymentAction.java:498)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:178)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:344)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.tasks.TaskManager$1.onResponse(TaskManager.java:202)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.tasks.TaskManager$1.onResponse(TaskManager.java:196)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:95)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.TransportSearchAction.lambda$doExecute$4(TransportSearchAction.java:302)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:236)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$RunAfterActionListener.onResponse(ActionListenerImplementations.java:260)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:344)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener.respondAndRelease(ActionListener.java:319)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.sendSearchResponse(AbstractSearchAsyncAction.java:703)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchLookupFieldsPhase.run(FetchLookupFieldsPhase.java:75)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:451)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:445)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.ExpandSearchPhase.onPhaseDone(ExpandSearchPhase.java:151)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.ExpandSearchPhase.run(ExpandSearchPhase.java:105)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:451)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:445)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.moveToNextPhase(FetchSearchPhase.java:238)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:109)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:88)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n}], type=status_exception, reason=Model definition truncated. Unable to deserialize trained model definition [.elser_model_2], stack_trace=org.elasticsearch.ElasticsearchStatusException: Model definition truncated. Unable to deserialize trained model definition [.elser_model_2]\n\tat org.elasticsearch.xcore@8.12.0-SNAPSHOT/org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper.badRequestException(ExceptionsHelper.java:90)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.lambda$step3VerifyModelPartsArePresent$17(TransportStartTrainedModelDeploymentAction.java:499)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.failOrRespondWith0(TransportStartTrainedModelDeploymentAction.java:586)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.lambda$step3VerifyModelPartsArePresent$18(TransportStartTrainedModelDeploymentAction.java:498)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:178)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:344)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.tasks.TaskManager$1.onResponse(TaskManager.java:202)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.tasks.TaskManager$1.onResponse(TaskManager.java:196)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:95)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.TransportSearchAction.lambda$doExecute$4(TransportSearchAction.java:302)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:236)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$RunAfterActionListener.onResponse(ActionListenerImplementations.java:260)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:344)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener.respondAndRelease(ActionListener.java:319)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.sendSearchResponse(AbstractSearchAsyncAction.java:703)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchLookupFieldsPhase.run(FetchLookupFieldsPhase.java:75)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:451)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:445)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.ExpandSearchPhase.onPhaseDone(ExpandSearchPhase.java:151)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.ExpandSearchPhase.run(ExpandSearchPhase.java:105)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:451)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:445)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.moveToNextPhase(FetchSearchPhase.java:238)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:109)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:88)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n}"

  at __randomizedtesting.SeedInfo.seed([6AE1748ADF67F8A2:E2B54B50719B955A]:0)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:572)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:524)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  at java.lang.reflect.Method.invoke(Method.java:580)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1583)

  Caused by: java.lang.AssertionError: the error message was expected to match the provided regex but didn't
  Expected: Model download task is currently running\. Wait for trained model \[.elser_model_2\] download task to complete then try again
       but: was "{root_cause=[{type=status_exception, reason=Model definition truncated. Unable to deserialize trained model definition [.elser_model_2], stack_trace=org.elasticsearch.ElasticsearchStatusException: Model definition truncated. Unable to deserialize trained model definition [.elser_model_2]\n\tat org.elasticsearch.xcore@8.12.0-SNAPSHOT/org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper.badRequestException(ExceptionsHelper.java:90)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.lambda$step3VerifyModelPartsArePresent$17(TransportStartTrainedModelDeploymentAction.java:499)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.failOrRespondWith0(TransportStartTrainedModelDeploymentAction.java:586)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.lambda$step3VerifyModelPartsArePresent$18(TransportStartTrainedModelDeploymentAction.java:498)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:178)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:344)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.tasks.TaskManager$1.onResponse(TaskManager.java:202)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.tasks.TaskManager$1.onResponse(TaskManager.java:196)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:95)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.TransportSearchAction.lambda$doExecute$4(TransportSearchAction.java:302)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:236)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$RunAfterActionListener.onResponse(ActionListenerImplementations.java:260)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:344)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener.respondAndRelease(ActionListener.java:319)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.sendSearchResponse(AbstractSearchAsyncAction.java:703)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchLookupFieldsPhase.run(FetchLookupFieldsPhase.java:75)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:451)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:445)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.ExpandSearchPhase.onPhaseDone(ExpandSearchPhase.java:151)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.ExpandSearchPhase.run(ExpandSearchPhase.java:105)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:451)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:445)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.moveToNextPhase(FetchSearchPhase.java:238)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:109)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:88)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n}], type=status_exception, reason=Model definition truncated. Unable to deserialize trained model definition [.elser_model_2], stack_trace=org.elasticsearch.ElasticsearchStatusException: Model definition truncated. Unable to deserialize trained model definition [.elser_model_2]\n\tat org.elasticsearch.xcore@8.12.0-SNAPSHOT/org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper.badRequestException(ExceptionsHelper.java:90)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.lambda$step3VerifyModelPartsArePresent$17(TransportStartTrainedModelDeploymentAction.java:499)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.failOrRespondWith0(TransportStartTrainedModelDeploymentAction.java:586)\n\tat org.elasticsearch.ml@8.12.0-SNAPSHOT/org.elasticsearch.xpack.ml.action.TransportStartTrainedModelDeploymentAction.lambda$step3VerifyModelPartsArePresent$18(TransportStartTrainedModelDeploymentAction.java:498)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:178)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:344)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.tasks.TaskManager$1.onResponse(TaskManager.java:202)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.tasks.TaskManager$1.onResponse(TaskManager.java:196)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:95)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.TransportSearchAction.lambda$doExecute$4(TransportSearchAction.java:302)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:236)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListenerImplementations$RunAfterActionListener.onResponse(ActionListenerImplementations.java:260)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:344)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.ActionListener.respondAndRelease(ActionListener.java:319)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.sendSearchResponse(AbstractSearchAsyncAction.java:703)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchLookupFieldsPhase.run(FetchLookupFieldsPhase.java:75)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:451)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:445)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.ExpandSearchPhase.onPhaseDone(ExpandSearchPhase.java:151)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.ExpandSearchPhase.run(ExpandSearchPhase.java:105)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:451)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:445)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.moveToNextPhase(FetchSearchPhase.java:238)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:109)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:88)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n}"

    at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
    at org.junit.Assert.assertThat(Assert.java:956)
    at org.elasticsearch.test.rest.yaml.section.DoSection.execute(DoSection.java:388)
    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:552)
    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:524)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke(Method.java:580)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
    at java.lang.Thread.run(Thread.java:1583)

```
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportPutTrainedModelAction.java
request.timeout()
        );
    }
    void verifyMlNodesAndModelArchitectures(
        TrainedModelConfig configToReturn,
        Client client,
        ThreadPool threadPool,
        ActionListener<TrainedModelConfig> configToReturnListener
    ) {
        ActionListener<TrainedModelConfig> addWarningHeaderOnFailureListener = new ActionListener<TrainedModelConfig>() {
            @Override
            public void onResponse(TrainedModelConfig config) {
                assert Objects.equals(config, configToReturn);
                configToReturnListener.onResponse(configToReturn);
            }
            @Override
            public void onFailure(Exception e) {
                HeaderWarning.addWarning(e.getMessage());
                configToReturnListener.onResponse(configToReturn);
            }
        };
        callVerifyMlNodesAndModelArchitectures(configToReturn, addWarningHeaderOnFailureListener, client, threadPool);
    }
    void callVerifyMlNodesAndModelArchitectures(
        TrainedModelConfig configToReturn,
        ActionListener<TrainedModelConfig> failureListener,
        Client client,
        ThreadPool threadPool
    ) {
        MlPlatformArchitecturesUtil.verifyMlNodesAndModelArchitectures(