Currently using managed worker pool. Deploying with pool using prefect3 results in the run crashing with "_Reported flow run ... as crashed: Flow run process exited with non-zero status code 1._" Downgrading the pool to use prefect2 kind of solves this crash (also mentioned here:
https://github.com/PrefectHQ/prefect/issues/15234#issuecomment-2339776848).
But now (with prefect2) it complains about "ModuleNotFoundError: No module named 'prefect_github'" which I need to get GitHubCredentials.
Possible to add pip package to the managed work pool, so I added it like this ["prefect[github]"]. Now it runs successfully.
But why does the run crash in the first place with the worker pool with prefect3? Had no issues when using .serve instead of .deploy
if __name__ == "__main__":
main_flow.from_source(
source=GitRepository(
url="<https://github.com/me/myrepo.git>",
credentials=GitHubCredentials.load("github-personal-access-token")
),
entrypoint="prefect/main_flow.py:main_flow",
).deploy(
name="my-deployment",
work_pool_name="default",
build=False
)