More details in thread.
Error during execution of task: ValueError('Received both `flow_id` and `flow_name`. Only one flow identifier can be passed.')
, it will assume the default name
. This is okay when you only run one replica, but when you increase the replica number to 2, both will take the default name and in the Prefect UI, the two agents are treated as the same agent. So what is the recommended way to deploy multiple agents for HA purposes in Kubernetes?
) is it possible to recover that traceback/error from a state handler? Right now I can say “this task failed and will be retrying in X minutes”, but not “this task failed for reason Y and will retry in X minutes”. Or can we pass keyword arguments to a state handler with this signature:
# What I have now. def notify_on_retry(task: Task, old_state: State, new_state: Retrying) -> State: ... # Maybe what I want? def notify_on_retry(task: Task, old_state: State, new_state: Retrying, message: str) -> State: ... # Alternative? def notify_on_retry(task: Task, old_state: State, new_state: Retrying, **kwargs) -> State: ...
but its yelling at me about "ValueError: Could not infer an active Flow context while creating edge". my app does a lot of chaining of flows, so i wanted to streamline this
@task() def flow_run_helper(flow_name, project_name): cfr = create_flow_run(flow_name=flow_name, project_name=project_name) wfr = wait_for_flow_run(cfr, stream_logs=True, raise_final_state=True) return wfr