Hi, I've been having an issue when trying to allow...
# prefect-getting-started
a
Hi, I've been having an issue when trying to allow the ECS push-workpool to pull my code from GitHub. The flow works when code is pulled locally however it produces the error below when trying from the github repository:
KeyError: "No class found for dispatch key 'github-repository' in registry for type 'Block'."
Has anyone had this error or know how to solve it? Thank you
1
j
hey, I'm assuming your defining this in your pull steps in your prefect.yaml? Could you share that?
a
We aren't using a prefect.yaml file. We currently use prefect cloud and only have files for our flows and deployments. Do we also need a prefect.yaml file?
j
sorry my apologies! It's not required. Can you share your deployment's pull steps where it is trying to pull from github?
a
No worries! Oh, we haven't defined pull steps in our deployment.yaml. We ran the following deployment command and used the file generated as is:
prefect deployment build --name example_flow flows/example_flow_file.py:example_flow --storage-block github-repository/github-analytics-data-pipeline-prod/ --pool aws-push-work-pool --skip-upload --apply
j
Ah understood! Push Work Pools and Workers in general are not compatible with storage blocks. I would recommend running
prefect deploy
and following the CLI steps. I would check out the docs here and particularly here about pulling from github. Once your deployment is configured you should see in the UI something similar to this under
Deployments -> your deployment -> configuration
a
Thank you very much Jake! I'll keep you updated.
👍 1