Vera Zabeida
02/24/2023, 5:13 PMname: Ad Hoc Deployment
env:
PREFECT_API_KEY: ${{ secrets.PREFECT_API_KEY }}
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }}
on:
push:
branches:
- main
jobs:
ad-hoc-deployment:
name: Build and apply deployment
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python 3.11.1
uses: actions/setup-python@v4
with:
python-version: "3.11.1"
cache: "pip"
cache-dependency-path: "requirements*.txt"
- name: Install packages
run: |
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager -r requirements.txt
- name: Build and apply deployment
run: |
prefect deployment build ./flows/pipeline.py:hello \
--name "Ad Hoc Deployment" \
--params '{"user_input": "github action"}' \
--version $GITHUB_SHA \
--tag ad-hoc-gh \
--work-queue github \
--apply
In the video they set up a --storage-block
and use github as a storage block, and use that on the prefect deployment build command, but I'm wondering why that'd be needed. In the step above, we're checking out the repo so for me that would mean that we have all of the code already in this job, so no github storage is needed?
I've had one build that succeeded with this setup, but I didn't see any deployments in the UI, double checked my env vars, and since then getting this error message that isn't very helpful, here's the repo where you can see it:
prefect.exceptions.PrefectHTTPStatusError: Client error '404 Not Found' for url '***/flows/'
Response: {'detail': 'Not Found'}
I'm just trying to get a minimal setup going, and understand what's needed and not needed for that. TIA for any pointers!