PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
16.34k stars 1.59k forks source link

Bug: gitlab-repository class unfindable at deployment build time #13112

Open MrChadMWood opened 1 year ago

MrChadMWood commented 1 year ago

Hello,

Running prefecthq/prefect:2.10.16-python3.11 in docker on a CentOS7 vm instance. I've successfully created gitlab-credentials and gitlab-repository blocks via the self-hosted Prefect UI.

I attempted to build a deployment as such (using the Prefect CLI): prefect deployment build -sb "gitlab-repository/reporting-automations" -n "test_depl" -q default flow.py:greetings

Result: KeyError: "No class found for dispatch key 'gitlab-repository' in request for type 'Block'."

Expected behavior: Prefect would create the deployment as it would with any other block type.

Possibly related: https://discourse.prefect.io/t/using-gitlab-block-as-flow-source-with-kubernetes-agent-on-prefect-2/2216

MrChadMWood commented 1 year ago

Sorry, seems this issue was addressed here: https://github.com/PrefectHQ/prefect-gitlab/issues/10#issuecomment-1397267952 -- Is it possible to accomplish this in a way that will persist restarts, but without modifying the base image?

Also, when I get this working by running pip install and prefect register through the CLI (doesn't persist restarting), I noticed something. Upon deployment, I get an error: GitLabRepository(...) does not have upload capabilities; no files uploads. Pass --skip-upload to suppress this warning.

-- Is there any way to turn on upload capabilities? Or is it not developed yet? -- If not, how exactly should I store the flow inside my GitLab so that Prefect will know how to use it? Is there a file structure I must use, or anything special? Or will prefect just search for the flow name at the repository's top level?