From 3f1d633f9862ddd4ca8dae9ea1a0d53a1b6e995e Mon Sep 17 00:00:00 2001 From: jimid27 Date: Wed, 4 Sep 2024 10:53:56 -0400 Subject: [PATCH 1/4] 3.0-auth --- README.md | 6 +++--- action.yaml | 2 +- examples/simple/deployment.yaml | 13 ------------- examples/simple/prefect.yaml | 23 +++++++++++++---------- 4 files changed, 17 insertions(+), 27 deletions(-) delete mode 100644 examples/simple/deployment.yaml diff --git a/README.md b/README.md index 536368d..3584fc9 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ jobs: python-version: '3.10' - name: Prefect Auth - uses: PrefectHQ/actions-prefect-auth@v1 + uses: PrefectHQ/actions-prefect-auth@v2 with: prefect-api-key: ${{ secrets.PREFECT_API_KEY }} prefect-workspace: ${{ secrets.PREFECT_WORKSPACE }} @@ -63,13 +63,13 @@ jobs: python-version: '3.10' - name: Prefect Auth - uses: PrefectHQ/actions-prefect-auth@v1 + uses: PrefectHQ/actions-prefect-auth@v2 with: prefect-api-key: ${{ secrets.PREFECT_API_KEY }} prefect-workspace: ${{ secrets.PREFECT_WORKSPACE }} - name: Run Prefect Deploy - uses: PrefectHQ/actions-prefect-deploy@v1 + uses: PrefectHQ/actions-prefect-deploy@v4 with: requirements-file-path: ./examples/simple/requirements.txt entrypoint: ./examples/simple/flow.py:call_api diff --git a/action.yaml b/action.yaml index 393cf14..f542378 100644 --- a/action.yaml +++ b/action.yaml @@ -23,7 +23,7 @@ runs: steps: - id: install-prefect-locally shell: bash - run: pip install -q "prefect<3" + run: pip install -q "prefect>3,<4" - id: prefect-cloud-login run: | diff --git a/examples/simple/deployment.yaml b/examples/simple/deployment.yaml deleted file mode 100644 index 59e6158..0000000 --- a/examples/simple/deployment.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: null -entrypoint: examples/simple/flow.py:call_api -flow_name: null -name: Simple -parameters: {} -schedule: null -tags: [] -version: null -work_pool: - job_variables: - image: prefecthq/prefect:2-latest - name: simple-pool - work_queue_name: null diff --git a/examples/simple/prefect.yaml b/examples/simple/prefect.yaml index c4d4333..29269d4 100644 --- a/examples/simple/prefect.yaml +++ b/examples/simple/prefect.yaml @@ -1,20 +1,23 @@ -# File for configuring project / deployment build, push and pull steps - -# Generic metadata about this project name: simple -prefect-version: 2.10.4 +prefect-version: 3.0.0 -# build section allows you to manage and build docker images build: null -# push section allows you to manage if -# and how this project is uploaded to remote locations push: null -# pull section allows you to provide instructions -# for cloning this project in remote locations pull: - - prefect.projects.steps.git_clone_project: + - prefect.deployments.steps.git_clone: repository: git@github.com:PrefectHQ/actions-prefect-deploy.git branch: main access_token: "{{ prefect.blocks.secret.simple-github-pat }}" + +deployments: + - name: Simple + description: A simple example + entrypoint: flow.py:call_api + parameters: {} + schedule: {} + work_pool: + job_variables: + image: prefecthq/prefect:3-latest + name: simple-pool \ No newline at end of file From 43a09b31829eb60eb1537ae76babd59ebffa9e81 Mon Sep 17 00:00:00 2001 From: jimid27 Date: Wed, 4 Sep 2024 10:54:14 -0400 Subject: [PATCH 2/4] Cleanup --- examples/simple/flow.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/simple/flow.py b/examples/simple/flow.py index c140d36..0f6c559 100755 --- a/examples/simple/flow.py +++ b/examples/simple/flow.py @@ -1,5 +1,3 @@ -import json - import requests from prefect import flow From 9904cb39d57797a23bec000dd6a2cb297d43565d Mon Sep 17 00:00:00 2001 From: jimid27 Date: Wed, 4 Sep 2024 10:56:29 -0400 Subject: [PATCH 3/4] Lint --- examples/simple/prefect.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/simple/prefect.yaml b/examples/simple/prefect.yaml index 29269d4..0fc023c 100644 --- a/examples/simple/prefect.yaml +++ b/examples/simple/prefect.yaml @@ -1,3 +1,4 @@ +--- name: simple prefect-version: 3.0.0 @@ -20,4 +21,4 @@ deployments: work_pool: job_variables: image: prefecthq/prefect:3-latest - name: simple-pool \ No newline at end of file + name: simple-pool From 9ee6523b48dd528c9e6461cc8f19e31a74914856 Mon Sep 17 00:00:00 2001 From: jimid27 Date: Wed, 4 Sep 2024 11:02:42 -0400 Subject: [PATCH 4/4] Equal to as well --- action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index f542378..09cce64 100644 --- a/action.yaml +++ b/action.yaml @@ -23,7 +23,7 @@ runs: steps: - id: install-prefect-locally shell: bash - run: pip install -q "prefect>3,<4" + run: pip install -q "prefect>=3,<4" - id: prefect-cloud-login run: |