Rahul Chittora
04/27/2023, 11:24 AMDownloading flow code from storage at ''
Rahul Chittora
04/27/2023, 12:08 PMDavid
04/27/2023, 12:59 PMRuntimeError: Cannot create flow run. Failed to reach API at <http://127.0.0.1:4200/api/>.
Any ideas on what the problem could be?Tabari Brannon
04/27/2023, 1:23 PMEmma Rizzi
04/27/2023, 1:54 PMNicholas Torba
04/27/2023, 5:29 PMCharles Leung
04/27/2023, 6:34 PMTomás Emilio Silva Ebensperger
04/27/2023, 6:42 PMMansour Zayer
04/27/2023, 7:00 PMrun_deployment()
.
Now in my unit test, I want to mock run_deployment
, but I don't know what to return. I tried returning a Future object, but didn't work because I do some result.name, result.state_name
on the output of run_deployment
. I appreciate any help here on how to construct a flow_run object for my run deployment mock. ThanksDeep shah
04/27/2023, 7:06 PMDaniel Sloan
04/27/2023, 7:07 PMJhonatan Sossa
04/27/2023, 7:56 PMdef build_and_register_flow(schedule_time, flow_name):
"""Build the prefect flow."""
response = run_deployment(
name=flow_name,
scheduled_time=schedule_time,
idempotency_key=schedule_time.strftime("%Y-%m-%d %H:%M:%S"),
timeout=0
)
print(response)
But I am getting:
<coroutine object run_deployment at 0x7fc5082b9f40>
And the deployment is not set. Does anyone know what is going on?dherincx
04/27/2023, 8:41 PMErik Amundson
04/27/2023, 9:02 PMMatheus Rocha
04/28/2023, 4:48 AM'NoneType' object has no attribute 'get'
Anyone with that error too?vholmer
04/28/2023, 8:43 AMMarius Vollmer
04/28/2023, 1:55 PMSubmission failed. kubernetes.client.exceptions.ApiException: (403) Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': '8dafec7b-865c-4190-9ff8-2c6859310d44', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '271f18eb-a208-418a-b558-589f2b1931ce', 'X-Kubernetes-Pf-Prioritylevel-Uid': '666d5261-3a03-4c64-b623-ed6529882f73', 'Date': 'Fri,
28 Apr 2023 13: 47: 23 GMT', 'Content-Length': '332'
}) HTTP response body: {
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "admission webhook \"validation.gatekeeper.sh\" denied the request: [job-ttl-after-finished-v2] Job does not have ttlSecondsAfterFinished configured",
"reason": "[job-ttl-after-finished-v2] Job does not have ttlSecondsAfterFinished configured",
"code": 403
}
Base Job Manifest
{
"apiVersion": "batch/v1",
"kind": "Job",
"metadata": {
"labels": {}
},
"spec": {
"ttlSecondsAfterFinished": 120,
"template": {
"spec": {
"serviceAccountName": "prefect-agent",
"completions": 1,
"containers": [
{
"env": [],
"name": "prefect-job"
}
],
"parallelism": 1,
"restartPolicy": "Never"
}
}
}
}
Can anyone help me here? Thanks in advance!Taylor Babin
04/28/2023, 2:40 PMraise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Server error '503 Service Unavailable' for url
For more information <https://httpstatuses.com/503>
and then my agent stops running is there a way to make sure my agent doesn't shut down?
This has happened more than once and not sure if there's a a way to prevent this from happening?Nathaniel Russell
04/28/2023, 4:04 PMMatheus Rocha
04/28/2023, 4:48 PMprefect server database reset -y
and now I'm unable to prefect server start
I've been facing this error: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
Charles Leung
04/28/2023, 5:01 PMwait_for
command when invoking a function to get the dependency arrows but I'm not seeing anything. Code snippet is below, along with UI output. Any help would be appreciated. Thanks!
from prefect import flow, task
@task
def task_1():
pass
@task
def task_2():
pass
@task
def task_3():
pass
@flow
def my_flow():
x = task_1()
# task 2 will wait for task_1 to complete
y = task_2(wait_for=[x])
task_3(wait_for=[y])
if __name__ == "__main__":
my_flow()
Ofir
04/28/2023, 5:13 PMimport os
PERSISTENT_OUT_DIR = '/my_data'
out_path = os.path.join(PERSISTENT_OUT_DIR, 'my_output.csv')
with open(out_path, 'w') as f:
f.write('my,cool,csv,header')
And then kubectl cp
or e.g. use a filebrowser to access them via a Web UI.
However, I am sure that there are standard ways to upload generated files during the workflow runs from Prefect
and I’d love to learn about the idiomatic approaches.
I am guessing Prefect has support through its SDK to access S3 / Azure Blob Storage / Azure Files, etc.
Your thoughts?James Ashby
04/28/2023, 5:29 PMprefect agent start -q main
. When I look at the logs for this, it shows me the agent starts and that it's checking for runs but it doesn't find any. Meanwhile the work queue in Prefect Cloud is unhealthy with a bunch of late runs. I tried reauthenticating to Prefect Cloud from the terminal and restarting the agent and upgrading to the latest prefect version. Any other advice?Sam Cook
04/28/2023, 6:24 PMZachary Lee
04/28/2023, 7:36 PMclient.delete_flow_run(flow_run_id=flow_run.id)
Does that actually delete a) the logs b) any other data associated with that flow run?
Also more, generally, is this the recommended approach for managing a growing database size as prefect flow runs accumulate?Yaron Levi
04/28/2023, 8:04 PMMitch Comardo - Lyric Research
04/28/2023, 8:40 PMJames Ashby
04/28/2023, 9:42 PMNelson Griffiths
04/29/2023, 4:33 AMDeep Vakharia
04/29/2023, 9:11 AM