Zach Schumacher
04/26/2021, 6:16 PMfrom prefect import task, Flow
from prefect.run_configs import KubernetesRun
from prefect.storage import GitHub
@task()
def print_hello(name: str):
print(f"hello {name}!")
with Flow(
"Example",
storage=GitHub(
repo="Simplebet/sbprefect",
path="sbprefect/flows/example.py",
access_token_secret="GITHUB_ACCESS_TOKEN")
) as flow:
example_task = print_hello("world")
flow.run_config = KubernetesRun()
Zach Schumacher
04/26/2021, 6:17 PMKevin Kho
Zach Schumacher
04/26/2021, 6:18 PMKevin Kho
Zach Schumacher
04/26/2021, 6:19 PM____ __ _ _ _
4/19/2021 2:54:12 PM | _ \ _ __ ___ / _| ___ ___| |_ / \ __ _ ___ _ __ | |_
4/19/2021 2:54:12 PM | |_) | '__/ _ \ |_ / _ \/ __| __| / _ \ / _` |/ _ \ '_ \| __|
4/19/2021 2:54:12 PM | __/| | | __/ _| __/ (__| |_ / ___ \ (_| | __/ | | | |_
4/19/2021 2:54:12 PM |_| |_| \___|_| \___|\___|\__| /_/ \_\__, |\___|_| |_|\__|
4/19/2021 2:54:12 PM |___/
4/19/2021 2:54:12 PM
4/19/2021 2:54:12 PM [2021-04-19 18:54:12,774] INFO - agent | Starting KubernetesAgent with labels ['d', 'e', 'v']
4/19/2021 2:54:12 PM [2021-04-19 18:54:12,774] INFO - agent | Agent documentation can be found at <https://docs.prefect.io/orchestration/>
4/19/2021 2:54:12 PM [2021-04-19 18:54:12,774] INFO - agent | Agent connecting to the Prefect API at <https://api.prefect.io>
4/19/2021 2:54:12 PM [2021-04-19 18:54:12,858] INFO - agent | Waiting for flow runs...
4/20/2021 10:07:04 AM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/20/2021 7:05:44 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/20/2021 8:18:20 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/21/2021 4:16:12 AM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/21/2021 2:00:17 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/22/2021 7:54:02 AM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/22/2021 6:38:02 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/22/2021 9:10:21 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/22/2021 11:52:03 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/23/2021 12:06:58 AM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/23/2021 7:58:36 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/24/2021 6:05:31 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/24/2021 6:05:48 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/24/2021 6:06:07 PM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
4/25/2021 7:40:00 AM <WARNING:urllib3.connectionpool>:Retrying (Retry(total=5, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Read timed out. (read timeout=15)",)': /
Zach Schumacher
04/26/2021, 6:19 PMKevin Kho
Zach Schumacher
04/26/2021, 6:23 PMKevin Kho
ECSRun
, KubernetesRun
, DockerRun
. Environments like dev, staging are more handled by users in their own way. Some use labels so that flows only get picked up by infrastructure with the same labels. For example, dev
and prod
as labels like what you had.Kevin Kho
Zach Schumacher
04/26/2021, 7:02 PMKevin Kho