dejii commented on PR #63725:
URL: https://github.com/apache/airflow/pull/63725#issuecomment-4068680547

   > Thanks for the clarification. Was it explained somewhere and I missed it?
   
   No. I just dug into the code to understand why it was failing.
   
   I checked #16922 - the K8s operators originally had `template_ext = ('yaml', 
'yml', 'json')` without dots, so any string ending in json was treated as a 
file path. The fix in #16930 added dot prefixes `(.yaml, .yml, .json)`, but 
`KubernetesPodOperator` ultimately removed `.json` from `template_ext` 
entirely. 
   
   I think it's still useful especially for Airflow teams that separate and 
reuse definitions but adding it here affects the current implementation so it 
not really worth fixing in its current state
   
   I still think the feature is useful - especially for teams that separate and 
reuse table definitions, but since `template_ext` applies to all 
`template_fields` with no way to scope it, it's not worth pursuing in its 
current form as it affects the `gcs_schema_object` flow.
   
   Long-term, 
[AIP-80](https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-80+Explicit+Template+Fields+in+Operator+Arguments)
 should fix this by eliminating `template_ext` in favor of explicit 
`FileTemplate`/`StringTemplate` wrappers. It's something I plan to take a stab 
at to move it forward.
   
   


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