tirkarthi commented on issue #57792: URL: https://github.com/apache/airflow/issues/57792#issuecomment-3486763342
This could be due to d9969be6c9b44e9c3bbccf7dc5e9e0c9d06db734 where schema has 0 as default value for "retries" which could be leading to it not being serialized. https://github.com/apache/airflow/blob/1242e07c0fe4577059c841c97ba09063ec391247/airflow-core/src/airflow/serialization/serialized_objects.py#L1868-L1869 {"retries": 1} in default_args has the retries value in tasks dict ```json {"dag": {"tags": ["test"], "tasks": [{"__var": {"retries": 1, "task_id": "echo_and_fail", "ui_color": "#f0ede4", "task_type": "BashOperator", "retry_delay": 300.0, "_task_module": "airflow.providers.standard.operators.bash", "bash_command": "echo \"This is a test message\" && exit 1", "template_ext": [".sh", ".bash"], "template_fields": ["bash_command", "env", "cwd"], "_needs_expansion": false, "template_fields_renderers": {"env": "json", "bash_command": "bash"}}, "__type": "operator"}], "dag_id": "gh57792", "params": [], "fileloc": "/home/karthikeyan/airflow/dags1/gh57792.py", "deadline": null, "timezone": "UTC", "edge_info": {}, "timetable": {"__var": {}, "__type": "airflow.timetables.simple.NullTimetable"}, "start_date": 1704067200.0, "task_group": {"tooltip": "", "children": {"echo_and_fail": ["operator", "echo_and_fail"]}, "ui_color": "CornflowerBlue", "_group_id": null, "ui_fgcolor": "#000", "prefix_group_id": true, "upstream_task_ids": [], "group_display_name": "", "upstrea m_group_ids": [], "downstream_task_ids": [], "downstream_group_ids": []}, "description": "Test DAG that echoes a message and fails", "default_args": {"__var": {"owner": "airflow", "retries": 1, "start_date": {"__var": 1704067200.0, "__type": "datetime"}, "email_on_retry": false, "depends_on_past": false, "email_on_failure": false}, "__type": "dict"}, "dag_dependencies": [], "relative_fileloc": "gh57792.py", "_processor_dags_folder": "/home/karthikeyan/airflow/dags"}, "__version": 3, "client_defaults": {"tasks": {"retries": 10}}} ``` {"retries": 0} in default_args skips the retries value in tasks dict ```json {"dag": {"tags": ["test"], "tasks": [{"__var": {"task_id": "echo_and_fail", "ui_color": "#f0ede4", "task_type": "BashOperator", "retry_delay": 300.0, "_task_module": "airflow.providers.standard.operators.bash", "bash_command": "echo \"This is a test message\" && exit 1", "template_ext": [".sh", ".bash"], "template_fields": ["bash_command", "env", "cwd"], "_needs_expansion": false, "template_fields_renderers": {"env": "json", "bash_command": "bash"}}, "__type": "operator"}], "dag_id": "gh57792", "params": [], "fileloc": "/home/karthikeyan/airflow/dags1/gh57792.py", "deadline": null, "timezone": "UTC", "edge_info": {}, "timetable": {"__var": {}, "__type": "airflow.timetables.simple.NullTimetable"}, "start_date": 1704067200.0, "task_group": {"tooltip": "", "children": {"echo_and_fail": ["operator", "echo_and_fail"]}, "ui_color": "CornflowerBlue", "_group_id": null, "ui_fgcolor": "#000", "prefix_group_id": true, "upstream_task_ids": [], "group_display_name": "", "upstream_group_ids": [], "downstream_task_ids": [], "downstream_group_ids": []}, "description": "Test DAG that echoes a message and fails", "default_args": {"__var": {"owner": "airflow", "retries": 0, "start_date": {"__var": 1704067200.0, "__type": "datetime"}, "email_on_retry": false, "depends_on_past": false, "email_on_failure": false}, "__type": "dict"}, "dag_dependencies": [], "relative_fileloc": "gh57792.py", "_processor_dags_folder": "/home/karthikeyan/airflow/dags"}, "__version": 3, "client_defaults": {"tasks": {"retries": 10}}} ``` -- 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]
