Nadav Nuni
09/14/2021, 8:21 AMunmapped
? (code added in a reply)Marko Herkaliuk
09/14/2021, 8:50 AMMaikel Penz
09/14/2021, 9:16 AMWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ffb221c2160>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
see the Temporary failure in name resolution
In summary: I’m not sure how much this is Kubernetes or a Prefect issue. I’m throwing it here as there could be a tweak on Prefect we could do to make it work.
Any ideas ?Abhishek
09/14/2021, 12:02 PMChris McPherson
09/14/2021, 1:53 PMConstantino Schillebeeckx
09/14/2021, 4:45 PMKathryn Klarich
09/14/2021, 5:41 PMmax_retries
on a task from the UI (or without having to upload new code)? I was hoping I could template the value and pass it to the @task decorator, but it doesn't look like you can use templates with the max_retries
argumentVasudevan Balakrishnan
09/14/2021, 6:10 PMJoe Schmid
09/14/2021, 6:35 PMLucas Hosoya
09/14/2021, 6:56 PMException: Java gateway process exited before sending its port number
Sean Talia
09/14/2021, 9:34 PMfrom prefect.utilities.logging import get_logger
from prefect import task
@task
def log_value(val: str) -> None:
logger = get_logger()
<http://logger.info|logger.info>(val)
Abhas P
09/14/2021, 10:28 PMwith Flow("example") as flow:
credentials = {'id': ... , 'pass': ...}
apply_map(transform ,result ,unmapped(credentials)) # can we do this ?
apply_map(transform ,result ,id =unmapped(credentials['id']), pass =unmapped(credentials['pass'])) # or is this the standard way?
Kathryn Klarich
09/14/2021, 10:55 PMBastian Röhrig
09/15/2021, 9:35 AMstate_handler
that uses the set_flow_run_name
method on the prefect client to rename itself when it moves to the running state. Now, I have set automations in prefect cloud that alert me when a flow run fails. I am now experiencing the following behaviour: If a flow run fails within a few minutes (approx. 5-10 minutes), I see the prefect generated run name (e.g. neat-kudu) in the alerts. If the flow run fails after a longer time (50 minutes), I see my custom flow run name in the alert.
Is this expected? Is there anything I can do on my site to fix it?Jérémy Trudel
09/15/2021, 4:00 PMQin XIA
09/15/2021, 4:34 PMLuca Schneider
09/15/2021, 6:34 PMquery GetLatest {
project(where: {name: {_eq: "project-test"}}) {
flows(
where: {name: {_eq: "flow-test"}, archived: {_eq: false}}
order_by: {version: desc}
limit: 1
) {
id
}
}
}
mutation TriggerLatest {
create_flow_run(input: {flow_id: "xxx"}) {
id
}
}
Daniel Manson
09/15/2021, 8:01 PMAbhas P
09/15/2021, 9:25 PMNadav
09/15/2021, 9:45 PMJason Kim
09/15/2021, 11:07 PMJacob Blanco
09/16/2021, 12:30 AMpg_terminate_backend
it would be nice if the task getting cancelled would be able to call pg_terminate_backend
.Jacob Blanco
09/16/2021, 12:35 AMMartim Lobao
09/16/2021, 12:54 AMCA Lee
09/16/2021, 3:30 AMZac Chien
09/16/2021, 7:56 AMMarko Herkaliuk
09/16/2021, 8:11 AMAndor Tóth
09/16/2021, 9:09 AMLucas Beck
09/16/2021, 9:21 AM[x1,x2,...xn]
that can be processed in parallel through a DAG. Out of this n
inputs, let's say that a fraction of those k
fail due to various reasons. We would then find the issues, fix them and like to rerun the flow for those inputs. When n
and k
is large, then it is quite some work to go through the UI and/or logs to find all the inputs that fail in order to start the next run. What I am doing right now is naming the tasks with their inputs, that way I can filter failed tasks in the UI. This is not optimal, as it is still involves quite some manual work copying and pasting stuff. I initially thought about logging which inputs failed at the end of the flow execution. However, I cannot think of a trivial way of doing this without it involving some form of global variable that needs to be passed around to different tasks and be write/read thread safe. It just does not sound like the proper way of tackling this. How do others approach this?
Challenge 2
Second, my tasks are spinning up Kubernetes jobs/pods to run computational heavy workloads. If the task execution goes well, then I use DeleteNameSpaceJob
to clean up once a job completes. But when I manually cancel those flow runs or once a job fails, I end up with lots of clutter that I need to manually clean up in the k8s cluster. I have been thinking about using state handlers to deal with this, calling the DeleteNameSpaceJob
once the new state is Cancelled
or Failed
. However, the state handler needs to know the job name it needs to delete, which is a piece of information that the tasks knows about. My struggle is on how to send the job_name
from the task to the state handler? As I understand the state handler has a specific signature, so I cannot pass extra parameters. I tried using the context for that, but what I have written in the context within the task does not seem to be propagated to the state handler. Any ideas here?
Thanks!Qin XIA
09/16/2021, 9:43 AM