I got an error when I run a flow stored in gitlab....
# ask-community
j
I got an error when I run a flow stored in gitlab. The error: Failed due to a(n)
ModuleNotFoundError
caused by missing module 'gitlab' in the deployment environment. However, I definately installed python-gitlab in the virtue environment.
j
You’ll need
prefect-gitlab
installed. If that’s what you have installed instead of
python-gitlab
, what kind of infrastructure are you running your flow on?
j
my flow is stored in gitlab. it runs in prefect cloud
prefect-gitlab is already installed
my requirements: gitlab prefect>=2.13.5 prefect-gitlab python-gitlab>=3.12.0 tenacity>=8.2.3
j
Gotcha. Are you using a Prefect Manged type work pool or some other type?
j
Prefect Manged type work pool
which pool should I use if my flow code is stored in gitlab?
j
That work pool type should be fine. For a Prefect Managed work pool, you can specify the
prefect-gitlab
dependency in the work pool’s Pip Packages field in the UI or in the deployment’s
job_variables
->
"pip_packages"
as shown here.
There is another Slack thread ongoing about using GitLab/Bitbucket with a Managed work pool here.
j
Thank you so much Jeff, I got a new error: Failed due to a
PrefectError
in the flow run infrastructure, likely caused by a task failure with the container exiting with an error (Error Code: 1).