-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support deployment of >1 prefect deployment (#13)
* Initial commit * ID with underscore * Try different for loop * Test * Verify array is generated * Use GH env var * start here for deploy * Update default * Remove unneeded steps * Try forcing array * Reintroduce deploy names * Readme * Examples * if statement for req test * a note about reqs * force env * typos * update inputs * Try env * deplyoment name * docker example * Set no default for req txt * Try it this way * Remove create lists step as not needed * remove list step completely * Pass as var * Readme v3 * Readme remove addtional args * Try to test requirements * Add finalizer * Use correct option * test * Try this * Ok start from the top * Try this * Maybe try reading it as a special char * Maybe this but likely a special char issue * Purposefully set IFS * Fix spacing * Comparing prefect versions * Update if statement * Cleanup * Add information to step * Verify again * Forgot IFS * Force prefect upgrade * Cleanup verbiage * Cleanup verbiage * Correct install * Cleanup * lint * Sets line length as warning * Disable line length * Update action.yaml Co-authored-by: Edward Park <[email protected]> * Update action.yaml Co-authored-by: Edward Park <[email protected]> * Remove unneeded duplicate steps * Example prefect version update --------- Co-authored-by: Jimi Dodd-o <[email protected]> Co-authored-by: Edward Park <[email protected]>
- Loading branch information
1 parent
48f6386
commit b1a5ede
Showing
16 changed files
with
285 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
description: null | ||
entrypoint: examples/docker/flow.py:call_api | ||
flow_name: null | ||
name: null | ||
parameters: {} | ||
schedule: null | ||
tags: [] | ||
version: null | ||
work_pool: | ||
job_variables: | ||
image: '{{ image_name }}' | ||
name: null | ||
work_queue_name: null | ||
deployments: | ||
- name: Docker | ||
description: null | ||
entrypoint: examples/docker/flow.py:call_api | ||
flow_name: null | ||
parameters: {} | ||
schedule: null | ||
tags: [] | ||
version: null | ||
work_pool: | ||
job_variables: | ||
image: '{{ image_name }}' | ||
name: docker-pool | ||
work_queue_name: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
prefect==2.10.4 | ||
prefect==2.10.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# prefect artifacts | ||
.prefectignore | ||
|
||
# python artifacts | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
*.egg-info/ | ||
*.egg | ||
|
||
# Type checking artifacts | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
.pyre/ | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
*.ipynb_checkpoints/* | ||
|
||
# Environments | ||
.python-version | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
|
||
# MacOS | ||
.DS_Store | ||
|
||
# Dask | ||
dask-worker-space/ | ||
|
||
# Editors | ||
.idea/ | ||
.vscode/ | ||
|
||
# VCS | ||
.git/ | ||
.hg/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import json | ||
|
||
import requests | ||
from prefect import flow | ||
|
||
@flow(name="Simple Flow", log_prints=True) | ||
def call_api(url: str = "http://time.jsontest.com/"): | ||
"""Sends a GET request to the provided URL and returns the JSON response""" | ||
resp = requests.get(url).json() | ||
print(resp) | ||
return resp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# File for configuring project / deployment build, push and pull steps | ||
|
||
# Generic metadata about this project | ||
name: simple | ||
prefect-version: 2.10.8 | ||
|
||
# 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: | ||
repository: [email protected]:PrefectHQ/actions-prefect-deploy.git | ||
branch: main | ||
access_token: "{{ prefect.blocks.secret.simple-github-pat }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
prefect==2.10.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# prefect artifacts | ||
.prefectignore | ||
|
||
# python artifacts | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
*.egg-info/ | ||
*.egg | ||
|
||
# Type checking artifacts | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
.pyre/ | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
*.ipynb_checkpoints/* | ||
|
||
# Environments | ||
.python-version | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
|
||
# MacOS | ||
.DS_Store | ||
|
||
# Dask | ||
dask-worker-space/ | ||
|
||
# Editors | ||
.idea/ | ||
.vscode/ | ||
|
||
# VCS | ||
.git/ | ||
.hg/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import json | ||
|
||
import requests | ||
from prefect import flow | ||
|
||
@flow(name="Simple Flow", log_prints=True) | ||
def call_api(url: str = "http://time.jsontest.com/"): | ||
"""Sends a GET request to the provided URL and returns the JSON response""" | ||
resp = requests.get(url).json() | ||
print(resp) | ||
return resp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# File for configuring project / deployment build, push and pull steps | ||
|
||
# Generic metadata about this project | ||
name: simple | ||
prefect-version: 2.10.8 | ||
|
||
# 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: | ||
repository: [email protected]:PrefectHQ/actions-prefect-deploy.git | ||
branch: main | ||
access_token: "{{ prefect.blocks.secret.simple-github-pat }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
prefect==2.10.8 |
Oops, something went wrong.