Yaron Levi
05/09/2023, 7:53 AMNikhil Joseph
05/09/2023, 8:34 AMcess to XMLHttpRequest at '<https://api.prefect.cloud/api/accounts/sensitive/automations/count>' from origin '<https://app.prefect.cloud>' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Runar
05/09/2023, 9:11 AM--include-children
. My prefect flow calls a lot of Docker containers btw, which might be the reason that the reporting is way off.Aditya N
05/09/2023, 9:36 AMGhassan Hallaq
05/09/2023, 10:12 AMGhassan Hallaq
05/09/2023, 10:13 AMGhassan Hallaq
05/09/2023, 10:14 AMGhassan Hallaq
05/09/2023, 10:15 AMAlon Barad
05/09/2023, 10:19 AMFile "/Users/barad/Desktop/Code/prefect/venv/lib/python3.11/site-packages/prefect/utilities/importtools.py", line 164, in load_script_as_module
raise ScriptError(user_exc=exc, path=path) from exc
prefect.exceptions.ScriptError: Script at 'quotes_flow.py' encountered an exception: ModuleNotFoundError("No module named 'common'")
How can I change the working directory?Alon Barad
05/09/2023, 10:24 AMquotes_flow.py
from prefect import flow, get_run_logger
from prefect.blocks.system import Secret
from common.blocks.mongodb import MongoDB
from common.subflows.crawl.crawl import crawl
from flows.quotes.parse import parse
@flow(name="quotes", flow_run_name="quotes-page-{page_number}")
def quotes_flow(run_id: str, page_number: int):
logger = get_run_logger()
conn_str = Secret.load('database-connection-string').get()
database = MongoDB(conn_str=conn_str)
run_config = database.find_one(
database="configs",
collection="run_configs",
query={
"run_id": run_id,
},
)
actions = run_config["actions"]
formatted_url = f"<https://quotes.toscrape.com/page/{page_number}/>"
if 'CRAWL' in actions:
crawl(url=formatted_url)
else:
<http://logger.info|logger.info>("Skipping crawl step")
if 'PARSE' in actions:
parse(url=formatted_url)
else:
<http://logger.info|logger.info>("Skipping parse step")
if __name__ == "__main__":
quotes_flow(
run_id="3227",
page_number=1,
)
Ritabrata Moitra
05/09/2023, 10:45 AMpending
state while trying to run through an ECSTask block. I was referring to https://prefecthq.github.io/prefect-aws/#save-an-infrastructure-and-storage-block.
Probing a bit further, I checked the containerDefinition
for the ECS task that was created by prefect deployment apply
and the command seems to be ["python","-m","prefect.engine"]
To me, it seems that this is the malformed command, as what I see from the logs is that the Fargate instance is stuck on this command and starts some sort of a server, instead of running the desired flow. Could you folks kindly advise on this?Matt Delacour
05/09/2023, 1:27 PMflapili
05/09/2023, 1:41 PMNicholas Torba
05/09/2023, 1:51 PMNicholas Torba
05/09/2023, 2:18 PMjack
05/09/2023, 4:06 PMprefect work-queue inspect [work_flow_id]
Thomas Moore
05/09/2023, 4:11 PMCody
05/09/2023, 4:13 PMChris
05/09/2023, 4:14 PMscott
05/09/2023, 4:15 PMSlackbot
05/09/2023, 4:18 PMAnders Segerberg
05/09/2023, 6:50 PMAbhinav Chordia
05/09/2023, 8:06 PMChris Reuter
05/09/2023, 8:33 PMYaron Levi
05/10/2023, 6:42 AMWolfgang Steitz
05/10/2023, 7:06 AMdeployment.yaml
:
push:
- prefect_aws.projects.steps.push_project_to_s3:
requires: "prefect-aws>=0.3.1"
bucket: "prefect-..."
folder: somefolder
credentials: "{{ prefect.blocks.aws-credentials.prod }}"
When initiating a deploy via prefect deploy --name ...
, the step fails with TypeError: Session.client() got an unexpected keyword argument 'profile_name'
. I am getting a similar error when using push_project_to_gcs
and gcp credentials. The credentials themselves are working fine when using them with an agent and some ecstask. What's the correct way of using credentials stored in a block? Or is it possible to use a s3 block directly?Deceivious
05/10/2023, 7:55 AMTask
over task
?shekhar koirala
05/10/2023, 11:49 AM/usr/bin/python: No module named prefect.engine.__main__; 'prefect.engine' is a package and cannot be directly executed
More info:
in the logs of prefect agent, which looks fine.
11:37:58.507 | INFO | prefect.agent - Submitting flow run 'e7122502-521e-45aa-9d63-a015cf5aa436'
11:37:58.608 | INFO | prefect.agent - Completed submission of flow run 'e7122502-521e-45aa-9d63-a015cf5aa436'
11:37:58.620 | INFO | prefect.infrastructure.kubernetes-job - Job 'k3sjob-7ftqb': Pod has status 'Pending'.
11:39:38.012 | INFO | prefect.infrastructure.kubernetes-job - Job 'k3sjob-7ftqb': Pod has status 'Running'.
but the args of k3s jobs pod is :
containers:
- name: prefect-job
image: >-
<custom-image-url>
args:
- python
- '-m'
- prefect.engine
Ton Steijvers
05/10/2023, 12:53 PMRoy Ben Dov
05/10/2023, 3:12 PM<http://ephemeral-prefect/api/flow-runs/flow-run/05ec5358-311d-45e4-8f86-781552c7426b>
which is not a correct one.
I want to it to be: http://<my_url>/flow-runs/flow-run/05ec5358-311d-45e4-8f86-781552c7426b
,
How can I do it?