Florent VanDeMoortele
07/19/2024, 11:45 AMFlow run infrastructure exited with non-zero status code:
Task prefect-enthusiastic-alligator-97f4p-task0 failed with message: Internal error. (Error Code: 1)
This may be caused by attempting to run an image with a misspecified platform or architecture.
Marvin
07/19/2024, 11:46 AMpython
async def _submit_run_and_capture_errors(
self, flow_run: "FlowRun", task_status: anyio.abc.TaskStatus = None
) -> Union[BaseWorkerResult, Exception]:
# Existing code until status_code check
if result.status_code != 0:
try:
await self.kill_infrastructure(
infrastructure_pid=flow_run.infrastructure_pid,
configuration=configuration,
)
except NotImplementedError:
self._logger.error(
f"Worker type {self.type!r} does not support killing created "
"infrastructure. Cleanup cannot be guaranteed."
)
await self._propose_crashed_state(
flow_run,
(
f"Flow run infrastructure exited with non-zero status code "
f"{result.status_code}."
),
)
self._emit_flow_run_executed_event(result, configuration, submitted_event)
return result
3. Additional Context from GitHub Issues: Review related GitHub issues for more context and potential fixes. Here are a few relevant issues:
- Ensure infrastructure is always killed when a job has crashed
- Handle failed Kubernetes scheduling events more gracefully
- CannotPullContainerError for failed Task
For detailed troubleshooting steps, you can refer to the Prefect GCP integration documentation.
If this does not resolve the issue, consider providing additional logs or context to further diagnose the problem.