diff --git a/Dockerfile b/Dockerfile index 738ee8e..361afe9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM prefecthq/prefect:2.14.9-python3.10 +FROM prefecthq/prefect:2.18.0-python3.10 # explicitly specify workdir expected by the deployment (even though its the same as the base image) WORKDIR /opt/prefect diff --git a/Makefile b/Makefile index 5e4d9cd..0514119 100644 --- a/Makefile +++ b/Makefile @@ -41,13 +41,13 @@ kubes-prefect: kubectl apply -f infra/rbac-dask.yaml kubectl apply -f infra/sa-flows.yaml helm upgrade --install --repo https://prefecthq.github.io/prefect-helm \ - prefect-server prefect-server --version=2023.11.30 \ + prefect-server prefect-server --version=2024.4.18205353 \ --values infra/values-server.yaml --wait --debug > /dev/null helm upgrade --install --repo https://prefecthq.github.io/prefect-helm \ - prefect-worker prefect-worker --version=2023.11.30 \ + prefect-worker prefect-worker --version=2024.4.18205353 \ --values infra/values-worker.yaml --wait --debug > /dev/null helm upgrade --install --repo https://prefecthq.github.io/prefect-helm \ - prefect-agent prefect-agent --version=2023.11.30 \ + prefect-agent prefect-agent --version=2024.4.18205353 \ --values infra/values-agent.yaml --wait --debug > /dev/null @echo -e "\nProbing for the prefect API to be available (~30 secs)..." && \ while ! curl -fsS http://localhost:4200/api/admin/version ; do sleep 5; done && echo @@ -132,7 +132,7 @@ kubes-db: ## upgrade to latest version of prefect upgrade: latest=$$(PIP_REQUIRE_VIRTUALENV=false pip index versions prefect | tail -n +1 | head -n1 | sed -E 's/.*\(([0-9.]+)\)/\1/') && \ - rg -l 2.14.9 | xargs sed -i '' "s/2.14.9/$$latest/g" + rg -l 2.18.0 | xargs sed -i '' "s/2.18.0/$$latest/g" make install ## forward traefik dashboard diff --git a/README.md b/README.md index 1c85f05..8d3a1df 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Flows: - [Map flow](flows/map_flow.py) uses [Task.map](https://docs.prefect.io/faq/?h=map#does-prefect-2-support-mapping). - [Flatten flow](flows/flatten_flow.py) demonstrates how to parallelise over a list of lists. - [Parent flow](flows/parent_flow.py) shows how to [trigger a flow run from a deployment](https://annageller.medium.com/44d65b625627) within a parent flow. The triggered flow is treated as a sub flow. -- [Context flow](flows/context_flow.py) accessing [prefect context at runtime](https://docs.prefect.io/2.14.9/concepts/runtime-context/). +- [Context flow](flows/context_flow.py) accessing [prefect context at runtime](https://docs.prefect.io/2.18.0/concepts/runtime-context/). Deployments to Kubernetes created via: diff --git a/deployments/deployment-child.yaml b/deployments/deployment-child.yaml index 04f0b18..1eb2358 100644 --- a/deployments/deployment-child.yaml +++ b/deployments/deployment-child.yaml @@ -22,7 +22,7 @@ infrastructure: labels: {} name: null command: null - image: prefecthq/prefect:2.14.9-python3.10 + image: prefecthq/prefect:2.18.0-python3.10 namespace: default service_account_name: null image_pull_policy: null diff --git a/deployments/deployment-dask-kubes.yaml b/deployments/deployment-dask-kubes.yaml index 4cb1550..ba93e17 100644 --- a/deployments/deployment-dask-kubes.yaml +++ b/deployments/deployment-dask-kubes.yaml @@ -27,7 +27,7 @@ infrastructure: labels: {} name: null command: null - image: prefecthq/prefect:2.14.9-python3.10 + image: prefecthq/prefect:2.18.0-python3.10 namespace: default service_account_name: null image_pull_policy: null diff --git a/deployments/deployment-parent.yaml b/deployments/deployment-parent.yaml index 278e5e9..76ec06f 100644 --- a/deployments/deployment-parent.yaml +++ b/deployments/deployment-parent.yaml @@ -40,7 +40,7 @@ infrastructure: labels: {} name: null command: null - image: prefecthq/prefect:2.14.9-python3.10 + image: prefecthq/prefect:2.18.0-python3.10 namespace: default service_account_name: null image_pull_policy: null diff --git a/flows/dask_kubes_flow.py b/flows/dask_kubes_flow.py index c248f34..a88ee72 100644 --- a/flows/dask_kubes_flow.py +++ b/flows/dask_kubes_flow.py @@ -24,7 +24,7 @@ def dask_pod_spec() -> V1Pod: # we need a image containing dask + prefect image="prefect-registry:5550/flow:latest", # image="ghcr.io/dask/dask:latest", - # env={"EXTRA_PIP_PACKAGES": "prefect==2.14.9"}, + # env={"EXTRA_PIP_PACKAGES": "prefect==2.18.0"}, memory_limit="1G", memory_request="1G", cpu_limit=1, diff --git a/flows/deploy.py b/flows/deploy.py index 808ec88..4e4a3f2 100644 --- a/flows/deploy.py +++ b/flows/deploy.py @@ -1,5 +1,5 @@ """ -See https://docs.prefect.io/2.14.9/concepts/deployments/#create-a-deployment-from-a-python-object +See https://docs.prefect.io/2.18.0/concepts/deployments/#create-a-deployment-from-a-python-object """ from prefect.deployments.deployments import Deployment diff --git a/flows/ray_flow.py b/flows/ray_flow.py index 6dbcd00..657f84f 100644 --- a/flows/ray_flow.py +++ b/flows/ray_flow.py @@ -29,7 +29,7 @@ def say_goodbye(name: str) -> None: address="ray://127.0.0.1:10001", init_kwargs={ "runtime_env": { - "pip": ["prefect==2.14.9"], + "pip": ["prefect==2.18.0"], # the PREFECT_API_* env vars in the current environment will be passed through by prefect # make sure PREFECT_API_URL and PREFECT_API_KEY are set to a host that can be reached # from the client running the flow and the ray worker node diff --git a/infra/values-agent.yaml b/infra/values-agent.yaml index 69d8e2a..76e737a 100644 --- a/infra/values-agent.yaml +++ b/infra/values-agent.yaml @@ -1,7 +1,7 @@ # see https://github.com/PrefectHQ/prefect-helm/tree/main/charts/prefect-agent agent: image: - prefectTag: 2.14.9-python3.10 + prefectTag: 2.18.0-python3.10 config: workPool: default-agent-pool diff --git a/infra/values-server.yaml b/infra/values-server.yaml index 118da46..9985102 100644 --- a/infra/values-server.yaml +++ b/infra/values-server.yaml @@ -1,7 +1,7 @@ # see https://github.com/PrefectHQ/prefect-helm/tree/main/charts/prefect-server server: image: - prefectTag: 2.14.9-python3.10 + prefectTag: 2.18.0-python3.10 ingress: enabled: true diff --git a/infra/values-worker.yaml b/infra/values-worker.yaml index 1d4dd82..5100601 100644 --- a/infra/values-worker.yaml +++ b/infra/values-worker.yaml @@ -1,7 +1,7 @@ # see https://github.com/PrefectHQ/prefect-helm/tree/main/charts/prefect-worker worker: image: - prefectTag: 2.14.9-python3.10-kubernetes + prefectTag: 2.18.0-python3.10-kubernetes config: workPool: kubes-pool diff --git a/prefect.yaml b/prefect.yaml index 7831267..2b4cc65 100644 --- a/prefect.yaml +++ b/prefect.yaml @@ -1,7 +1,7 @@ -# see https://docs.prefect.io/2.14.9/concepts/deployments-ux/ +# see https://docs.prefect.io/2.18.0/concepts/deployments-ux/ name: prefect-demo -prefect-version: 2.14.9 +prefect-version: 2.18.0 # build section allows you to manage and build docker images # build: null diff --git a/pyproject.toml b/pyproject.toml index f985e68..67afd7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ version = "0.0.0" readme = "README.md" requires-python = ">=3.10" dependencies = [ - "prefect==2.14.9", + "prefect==2.18.0", # to pull/push flows in s3 "prefect-aws==0.4.5", "prefect-shell==0.2.2",