Joeri Smits
01/02/2025, 4:37 PMFlow run infrastructure exited with non-zero status code:
Task flow-run-e2436ff7-ca28-42ef-ae21-f65e022fdd61-b643cc869097gvjwk-task0 failed with message: The container exited with an error. (Error Code: 1)
When I make a deployment to a prefect managed work-pool. The task is a simple print line so not sure what’s going on.Marvin
01/02/2025, 4:37 PMJoeri Smits
01/02/2025, 4:41 PMMarvin
01/02/2025, 4:41 PMJoeri Smits
01/02/2025, 4:42 PMMarvin
01/02/2025, 4:42 PMprefect work-pool create --name <NAME> --base-job-template <PATH_TO_JSON>
- To update a work pool: prefect work-pool update --name <NAME> --base-job-template <PATH_TO_JSON>
5. Infrastructure Type: Choose the infrastructure type that supports your environment needs (e.g., Kubernetes, Docker).
For more details, you can refer to the work pools documentation.Joeri Smits
01/02/2025, 4:50 PMFailed due to a(n) crashed flow run - The flow run process exited with a non-zero status code 1, indicating a crash. Further investigation is needed to determine the cause of the crash.
Even when I select prefecthq/prefect:3-python3.12
as base imageMarvin
01/02/2025, 4:51 PMprefecthq/prefect:3-python3.12
base image, might be related to several factors as seen in related GitHub issues:
1. Environment and Dependencies: Ensure that all necessary dependencies are included in the Docker image. Even though the base image is specified, additional dependencies required by your flow might not be present.
2. Memory and Resource Limits: The process might be getting killed due to insufficient memory or CPU resources. Check if the container has enough resources allocated to it. This can sometimes cause the operating system to terminate the process with a SIGKILL signal, often reflected as a non-zero exit code.
3. Network and External Access: If your flow requires access to external resources (like a GitLab repository), ensure that the necessary network permissions and credentials are correctly set up.
4. Error in Flow Code: While your flow only contains a print statement, ensure there are no hidden issues in the deployment configuration or in any imported modules that could cause a crash.
5. Prefect Version and Compatibility: Make sure the Prefect version in the Docker image aligns with your deployment configuration. Sometimes, mismatches can lead to unexpected behavior.
For further troubleshooting, you might want to:
- Check the detailed logs for more specific error messages.
- Test the flow locally to isolate whether the issue is with the environment or the Prefect setup.
- Review any recent changes in your flow or deployment configuration that might have introduced the issue.
For additional context, you can refer to the related GitHub issue where similar problems have been discussed.Jake Kaplan
01/02/2025, 4:51 PMJoeri Smits
01/02/2025, 4:52 PM.deploy
method on a flow.Jake Kaplan
01/02/2025, 4:54 PM.from_source
method before you can call .deploy
.
That indicates to the deployment that your code should be pulled in remotely (from source) at the start of your flow runJake Kaplan
01/02/2025, 4:54 PMJoeri Smits
01/02/2025, 4:55 PMJoeri Smits
01/02/2025, 4:56 PMJoeri Smits
01/03/2025, 1:02 PMfrom prefect import flow
from prefect.runner.storage import GitRepository
from prefect_github import GitHubCredentials
from sync_from_airbyte_flow import sync_from_airbyte
github_repo = GitRepository(
url="<https://github.com/webbio/AirByte>",
credentials=GitHubCredentials.load("github"),
)
@flow
def master_flow():
sync_result = sync_from_airbyte()
return sync_result
if __name__ == "__main__":
master_flow.from_source(
source=github_repo,
entrypoint="orchestration/master_flow.py:master_flow",
).deploy(
name="Sync from Airbyte and run DBT transform",
work_pool_name="webbio-workpool",
image="prefecthq/prefect:3-python3.12",
push=True,
cron="0 0 * * *",
)
Joeri Smits
01/03/2025, 1:02 PMJake Kaplan
01/03/2025, 4:28 PMJoeri Smits
01/03/2025, 4:28 PMJoeri Smits
01/03/2025, 4:30 PMJoeri Smits
01/03/2025, 4:30 PMJake Kaplan
01/03/2025, 4:35 PMJoeri Smits
01/03/2025, 4:35 PMJoeri Smits
01/03/2025, 4:36 PMJake Kaplan
01/03/2025, 4:38 PMJoeri Smits
01/03/2025, 4:39 PM077a193c-378f-4a78-b38b-8ce7640ce2c5
Jake Kaplan
01/03/2025, 4:51 PMoutstanding-oryx
? It looks like it's still in "Cancelling" which counts as in progress stateJoeri Smits
01/03/2025, 4:52 PMJoeri Smits
01/03/2025, 4:54 PMJoeri Smits
01/03/2025, 4:54 PMJake Kaplan
01/03/2025, 4:56 PMJoeri Smits
01/03/2025, 4:59 PMexited with status code: 1
. Despite having configured ["prefect-github"]
in the work-pool.Joeri Smits
01/03/2025, 4:59 PMJake Kaplan
01/03/2025, 5:10 PMexited with status code: 1
is a general error that the worker is reporting the container didn't succeed. I would expect prefect
(that's running your code in the container) to log an error here. let me take a lookJoeri Smits
01/03/2025, 5:10 PMJoeri Smits
01/03/2025, 5:10 PMJake Kaplan
01/03/2025, 5:11 PMJake Kaplan
01/03/2025, 5:11 PMJoeri Smits
01/03/2025, 5:11 PMJoeri Smits
01/03/2025, 5:11 PMwhat was it?I think I was a bit too fast. When I did a rerun it starting running my code in the flow.
Joeri Smits
01/03/2025, 5:12 PMJake Kaplan
01/03/2025, 5:18 PMJoeri Smits
01/03/2025, 5:18 PMAdriano Resende
01/09/2025, 11:54 PMJake Kaplan
01/10/2025, 12:03 AM["package1, package2, package3"]
instead of each python package as a string item in the array ["package1", "package2", "package3"]
Jake Kaplan
01/10/2025, 12:03 AMAdriano Resende
01/10/2025, 4:40 PMJake Kaplan
01/10/2025, 4:52 PMsmtplib
but that's not a package available via pip, it's just part of the python standard library. you can just import it w/o installing anything extra