Hello, we are getting lots of these error logs: `...
# flyte-v1-support
f
Hello, we are getting lots of these error logs:
Copy code
duplicate key value violates unique constraint "tasks_pkey" (SQLSTATE 23505)
and our executions are all in UNKNOWN state. Would you have a pointer?
a
Without the
task def
and and the
workflow details
it is very difficult to point out the issue. See the example how to create a map task below: https://www.union.ai/docs/v1/flyte/user-guide/core-concepts/tasks/map-tasks/ If you are using concurrency , set it to 1 and see if you get the issue. Also check the infa that you are running your task on :- container,kubernetesCluster etc. Register your workflow witha different version
flytectl register files --project myproj --domain development --version v1.2.3
and see if the error persist You have to provide the issue/error with the code so someone can help like below:
Copy code
THRESHOLD = 11

@fl.task
def detect_anomalies(data_point: int) -> bool:
    return data_point > THRESHOLD

@fl.workflow
def map_workflow(data: list[int] = [10, 12, 11, 10, 13, 12, 100, 11, 12, 10]) -> list[bool]:
    # Use the map task to apply the anomaly detection function to each data point
    return fl.map_task(detect_anomalies)(data_point=data)
👍 1