wjszlachta-man opened a new pull request, #46766:
URL: https://github.com/apache/airflow/pull/46766

   This fixes a bug where task deserialisation fails with `TypeError` when task 
`execution_timeout` is set to `None`, but 
[core.default-task-execution-timeout](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#default-task-execution-timeout)
 is **not** set to `None` in `airflow.cfg`.
   
   In order to reproduce:
   
   - set 
[core.default-task-execution-timeout](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#default-task-execution-timeout)
 in `airflow.cfg` to any integer value
   - set `execution_timeout=None` on any operator inside a DAG
   - open DAG in Airflow UI
   - you will see `Internal Server Error` in the browser, and the following in 
`webserver` logs:
   
   ```
   ...
   airflow/serialization/serialized_objects.py:1488: in deserialize_operator
       cls.populate_operator(op, encoded_op)
   airflow/serialization/serialized_objects.py:1345: in populate_operator
       v = cls._deserialize_timedelta(v)
   airflow/serialization/serialized_objects.py:941: in _deserialize_timedelta
       return datetime.timedelta(seconds=seconds)
   E   TypeError: unsupported type for timedelta seconds component: NoneType
   ```
   
   If you are running with 
[scheduler.standalone-dag-processor](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#standalone-dag-processor)
 set to `True`, this is more catastrophic as you will see the same 
deserialization error in `scheduler` and you will not be able to schedule any 
new tasks.
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a 
newsfragment file, named `{pr_number}.significant.rst` or 
`{issue_number}.significant.rst`, in 
[newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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