eladkal commented on PR #29905:
URL: https://github.com/apache/airflow/pull/29905#issuecomment-1549228093

   > My sentence structure maybe makes it harder to see but to clarify I'm 
talking about with kubernetes hook we call the file kubernetes.py -- what would 
you call it if you removed the "kubernetes"? That's what I mean. :)
   
   The import is
   `from airflow.providers.cncf.kubernetes.operators.pod import 
KubernetesPodOperator`
   
   You know it's Kubernetes because you import it from Kubernetes provider. 
There is no reason to have `kubernetes_` for any `py` file in the provider.
   
   > When I wrote "specifically I'm concerned" I was clarifying that that was 
the rename I was asking about because there were other renames in the PR but I 
was just asking about pod.py (initially i said "what's the reason for this 
change" so it wasn't clear what I was asking about). I'm not saying that the 
change is like... especially "concerning" just clarifying what I'm asking about.
   
   When we have single hook we normally name it after the provider itself.
   
   ```
   from airflow.providers.asana.hooks.asana import AsanaHook
   from airflow.providers.ftp.hooks.ftp import FTPHook
   from airflow.providers.http.hooks.http import HttpHook
   ```
   
   When we have multiple hooks we name it after the service (like you can see 
in Amazon and Google providers.
   
   About operators note that https://github.com/apache/airflow/pull/29930 is 
going to add
   `airflow.providers.cncf.kubernetes.operators.resource`
   so having
   `airflow.providers.cncf.kubernetes.operators.pod`
   along side make sense to me.
   
   We are not quite there in having this completely organized, we probably need 
better defined policy with enforcement to bind all providers.


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