I found some information that might help you with the error you're encountering. The error message "Flow run infrastructure exited with non-zero status code -1" could be related to issues with the flow run's infrastructure. Here are some steps you can take to troubleshoot the problem:
1. Verify that the agent process is running, e.g., Kubernetes deployment, ECS service, or dockerd daemon.
2. Check the agent logs to see if anything suspicious stands out.
3. Verify that your execution layer is able to pull your flow run's image. If the image needs to be pulled from a container registry, make sure your container can reach the internet and has appropriate permissions to pull the image.
4. Verify that your execution layer has enough permissions.
You can find more information in this
discourse post.
Additionally, you can review the Prefect agent source code on
GitHub to better understand how flow run cancellations and infrastructure management work.
I hope this helps you resolve the issue. If you need further assistance, please let me know.