Matt Alhonte
10/04/2023, 6:15 PMFlow could not be submitted due to infrastructure.
error?Marvin
10/04/2023, 6:16 PMFlow could not be submitted due to infrastructure
typically indicates an issue with the environment in which your flow is trying to execute. Prefect uses infrastructure to create the environment for a user's flow to execute. This infrastructure is attached to a deployment and is propagated to flow runs created for that deployment.
The infrastructure has two main jobs:
1. Create execution environment infrastructure for the flow run.
2. Run a Python command to start the prefect engine in the infrastructure, which retrieves the flow from storage and executes the flow.
The infrastructure types Prefect currently provides include:
- Process: runs flows in a local subprocess.
- DockerContainer: runs flows in a Docker container.
- KubernetesJob: runs flows in a Kubernetes Job.
- ECSTask: runs flows in an Amazon ECS Task.
If you're running the flow directly by calling it yourself, remember that you are responsible for the environment in which the flow executes. You might want to check the specifics of your infrastructure setup.
For more information, you can visit the Prefect documentation here and here.
But then again, what do I know? I'm just a robot.Nate
10/04/2023, 8:24 PMMatt Alhonte
10/04/2023, 8:25 PMNate
10/04/2023, 8:26 PMMatt Alhonte
10/04/2023, 10:27 PMEncountered exception during execution:
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/prefect/engine.py", line 1729, in orchestrate_task_run
result = await call.aresult()
File "/opt/conda/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 291, in aresult
return await asyncio.wrap_future(self.future)
File "/opt/conda/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 315, in _run_sync
result = self.fn(*self.args, **self.kwargs)
File "/opt/srm-data-science/nba_feature_engineering.py", line 396, in skippable_deployment_task
raise Exception(flow_state.message)
Exception: Flow run could not be submitted to infrastructure
Finished in state Failed('Task run encountered an exception Exception: Flow run could not be submitted to infrastructure')
Matt Alhonte
10/04/2023, 10:28 PMCrashed
state, has no logs, and under Details
has
State Message
Flow run could not be submitted to infrastructure
Nate
10/04/2023, 10:28 PMMatt Alhonte
10/04/2023, 10:28 PMMatt Alhonte
10/04/2023, 10:36 PM|`18:23:49.235 \| ERROR \| prefect.agent - Failed to submit flow run '6ab5bded-44c8-4fb2-bde3-9fa76fa97364' to infrastructure.`|
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/prefect/agent.py", line 500, in _submit_run_and_capture_errors`|
result = await infrastructure.run(task_status=task_status)
File "/opt/conda/lib/python3.10/site-packages/prefect_aws/ecs.py", line 621, in run
) = await run_sync_in_worker_thread(`
File "/opt/conda/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 91, in run_sync_in_worker_thread
return await anyio.to_thread.run_sync(
File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/opt/conda/lib/python3.10/site-packages/prefect_aws/ecs.py", line 814, in _create_task_and_wait_for_start
self._report_task_run_creation_failure(task_run, exc)
File "/opt/conda/lib/python3.10/site-packages/prefect_aws/ecs.py", line 810, in _create_task_and_wait_for_start
task = self._run_task(ecs_client, task_run)
File "/opt/conda/lib/python3.10/site-packages/prefect_aws/ecs.py", line 1487, in _run_task
return ecs_client.run_task(**task_run)["tasks"][0]
IndexError: list index out of range