uranusjr opened a new pull request #19242: URL: https://github.com/apache/airflow/pull/19242
This rewrites SimpleTaskInstance to carry *all* of TaskInstance's columns, instead of "just what's needed". This means the class would carry some dead weight, but that's a practical tradeoff since validating whether a field is needed is too difficult to automate without intimacy to the code base. A new function refresh_from_instance() is added to TaskInstance, which is used for both "defreeze" a SimpleTaskInstance back into a TI, and loading a TI from the database via refresh_from_db(). Since refresh_from_db() is very heavily used and any errors are caught quickly by various tests, it is very difficult to miss a field in that function, thus indirectly guaranteeing both the SimpleTaskInstance does not miss a new field added to TaskInstance, and the defreezing process does not miss setting a field on SimpleTaskInstance back to the TI. Close #16804. -- 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]
