utkarsharma2 commented on PR #31662: URL: https://github.com/apache/airflow/pull/31662#issuecomment-1581910460
> Hmm, yeah adding a new field is probably the simplest approach. Can you find other uses of `TaskInstance.operator` so maybe we can analyze if this field is simply for UI (if so, we can just change it to use `operator_name`), or do other logic depends on it? Adding a field is relatively expensive on TaskInstance so we should avoid that if possible. > > Either way, I think we should hold this PR as-is and continue looking into the `TaskInstance.operator` in a different PR. @uranusjr I checked for the usage of `ti.operator` and found out there are a lot of places where it's been used, below are a few examples https://github.com/apache/airflow/blob/8891c6944671d8965a63ddbd59b5c23597e86f0a/airflow/models/dagrun.py#L1126 https://github.com/apache/airflow/blob/8891c6944671d8965a63ddbd59b5c23597e86f0a/airflow/models/dag.py#L1749 https://github.com/apache/airflow/blob/8891c6944671d8965a63ddbd59b5c23597e86f0a/airflow/jobs/scheduler_job_runner.py#L744 `TaskInstance.operator` certainly has more usage than just displaying in UI. I think adding another field to `TaskInstance` will be a quick solution. WDYT? -- 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]
