simi commented on issue #53905:
URL: https://github.com/apache/airflow/issues/53905#issuecomment-3408590260

   faced the same (randomly) with Airflow 3.0.1 and PostgreSQL DB backend
   
   ```
   [2025-10-14, 02:06:17] DEBUG - Connection not found in any of the configured 
Secrets Backends. Trying to retrieve from API server: conn_id="cerberus": 
source="task"
   [2025-10-14, 02:06:17] DEBUG - Sending request: 
json="{\"conn_id\":\"cerberus\",\"type\":\"GetConnection\"}\n": source="task"
   [2025-10-14, 02:06:24] ERROR - Error response from the API Server: 
source="task"
   [2025-10-14, 02:06:24] ERROR - Task failed with exception: source="task"
   AirflowRuntimeError: API_SERVER_ERROR: {'status_code': 409, 'message': 
'Server returned error', 'detail': {'detail': {'reason': 'Unique constraint 
violation', 'statement': 'INSERT INTO rendered_task_instance_fields (dag_id, 
task_id, run_id, map_index, rendered_fields, k8s_pod_yaml) VALUES (%(dag_id)s, 
%(task_id)s, %(run_id)s, %(map_index)s, %(rendered_fields)s, 
%(k8s_pod_yaml)s)', 'orig_error': 'duplicate key value violates unique 
constraint "rendered_task_instance_fields_pkey"\nDETAIL:  Key (dag_id, task_id, 
run_id, map_index)=(splits_yt_catalog, export_organization_yt_catalog, 
scheduled__2025-10-14T00:06:00+00:00, 4) already exists.\n'}}}
   [2025-10-14, 02:06:24] DEBUG - Sending request: 
json="{\"state\":\"failed\",\"end_date\":\"2025-10-14T00:06:24.951168Z\",\"type\":\"TaskState\",\"rendered_map_index\":null}\n":
 source="task"
   [2025-10-14, 02:06:24] DEBUG - Running 
   ```
   
   I'm happy to share interesting DAG parts (not sure which ones). It is using 
`expand_kwargs` and it seems to repeat randomly once per cca 3 weeks on daily 
task. This happens on "generated" task with random map index (seen with index 4 
and index 5 in recent month).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to