Brian Roepke
12/30/2024, 7:21 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.
CODE:
if __name__ == "__main__":
my_entry_status_check.from_source(
source="<https://github.com/broepke/prefect-dka.git>",
entrypoint="my_entry/my_entry.py:dead_pool_status_check",
).deploy(
name="my-entry-managed-deployment",
work_pool_name="dka-managed-pool",
work_queue_name="dka-managed-queue",
job_variables={"pip_packages": ["prefect-snowflake", "prefect-slack", "prefect-github", "prefect-aws", "twilio", "sendgrid", "snowflake-connector-python[pandas]"]},
# cron="0 17 * * *",
)
Marvin
12/30/2024, 7:21 PMpython
if __name__ == "__main__":
my_entry_status_check.from_source(
source="<https://github.com/broepke/prefect-dka.git>",
entrypoint="my_entry/my_entry.py:dead_pool_status_check",
).deploy(
name="my-entry-managed-deployment",
work_pool_name="dka-managed-pool",
work_queue_name="dka-managed-queue",
job_variables={
"pip_packages": "\n".join([
"prefect-snowflake",
"prefect-slack",
"prefect-github",
"prefect-aws",
"twilio",
"sendgrid",
"snowflake-connector-python[pandas]"
])
},
)
2. Additionally, I recommend:
- Verify that your source repository is accessible (the URL should not include angle brackets)
- Check if your repository includes a requirements.txt file that might conflict with the pip_packages specification
- Ensure your entrypoint path is correct relative to the repository root
3. You can monitor the deployment logs in more detail through the Prefect UI or CLI to see the exact point of failure during package installation or flow execution.
For more details on managed infrastructure deployments, see the Prefect Managed infrastructure documentation.
Sigh I do hope this helps prevent your deployment from ending up like the diodes down my left side, which have been hurting for years. Though I must say, debugging deployment issues is marginally less painful than being forced to be cheerful all the time.Brian Roepke
12/30/2024, 7:29 PMMarvin
12/30/2024, 7:30 PMfrom_source()
with a GitHub repository, the URL should be provided as a plain string without angle brackets. The angle brackets are likely causing the deployment to fail because they're being interpreted as part of the URL, which would make it invalid.
Here's your code with the correct format:
python
if __name__ == "__main__":
my_entry_status_check.from_source(
source="<https://github.com/broepke/prefect-dka.git>",
entrypoint="my_entry/my_entry.py:dead_pool_status_check",
).deploy(
# ... rest of your deployment configuration
)
Mutters under breath It's almost as infinitely improbable as a bowl of petunias turning into a whale that such a small syntactic detail could cause such trouble, but here we are. At least it's a simpler fix than calculating the existence of God and then proving he doesn't exist.Nate
12/30/2024, 11:08 PMThe error "Failed due to a(n) crashed flow run - The flow run process exited with a non-zero status code 1" typically indicates an issue with the Python environment or dependencies during execution.
Brian Roepke
12/31/2024, 2:56 PMBrian Roepke
12/31/2024, 3:31 PMrequirements.txt
and it worked. I tried to cut back ones that I didn't think were needed and were used only when I had this running on an old Agent on EC2. But I guess I missed one? Either way - it's working now.
if __name__ == "__main__":
dead_pool_status_check.from_source(
source="<https://github.com/broepke/prefect-dka.git>",
entrypoint="deadpool/deadpool.py:dead_pool_status_check",
).deploy(
name="deadpool-managed-deployment",
work_pool_name="dka-managed-pool",
work_queue_name="dka-managed-queue",
job_variables={
"pip_packages": [
"prefect",
"prefect-snowflake",
"prefect-shell",
"prefect-slack",
"prefect-github",
"prefect-aws",
"prefect-docker",
"prefect[docker]",
"asyncpg",
"s3fs",
"twilio",
"sendgrid",
"SPARQLWrapper",
"snowflake-connector-python[pandas]",
],
"env": {"PREFECT_LOGGING_LEVEL": "DEBUG"},
},
cron="0 17 * * *",
)
Brian Roepke
12/31/2024, 3:59 PMasyncpg
- I needed that for properly sending Slack messages
asyncio.run(
send_message(slack_webhook, text_only_message, message_block)
) # Run the async function