-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align cncf provider file names with AIP-21 #29905
Conversation
Some static checks need fixing and warnings need accounting for, but otherwise the changes lgtm 👍 |
(Pending fixing the tests :) |
Changes to import paths: `operators.kubernetes_pod` -> `operators.pod` `triggers.kubernetes_pod` -> `triggers.pod` This PR is backward compatible
I am confused what was the basis of this change. I thought AIP-21 just said that you should omit the I should clarify, specifically I'm concerned with the rename of |
Please explain why this is needed?
Please clarify why. We are not going to remove kubernetes_pod.py any time soon.. This is one that will stay with us for long till we are fully confident that most users migrated. At least 1 year to my taste.. even more (at least this is how I see it) |
My sentence structure maybe makes it harder to see but to clarify I'm talking about with kubernetes hook we call the file
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. But yeah so anyway, just not sure why the change and curious to understand, does not seem that it is required / suggested / indicated by the AIP. I thought that |
I think (and this is why I approve it) - this change was really going together with the "spirit" of the AIP 21 even if not necessarily the "letter" of it. The spirit of AIP-21 was that we remove redundant, repeated names from the full path of the class/module. That was the gist of it and the reason we implemented the change. And In this case. the change was rather following that:
contains To be perfectly honest, I have not agreed with the change when we implemented it. I was against shortening the imports because I though that rather than length of the imports, the important thing is that when I press SHIFT (search anywhere) three times in my IntelliJ IDE and start typing I think this is just a natural application to be more consistent there. Again - I would personally prefer to go with the |
The import is You know it's Kubernetes because you import it from Kubernetes provider. There is no reason to have
When we have single hook we normally name it after the provider itself.
When we have multiple hooks we name it after the service (like you can see in Amazon and Google providers. About operators note that #29930 is going to add We are not quite there in having this completely organized, we probably need better defined policy with enforcement to bind all providers. |
Well. If there are two of us, we might actually attempt to revert that decision..... 🤯 |
AIP-21 did not completely resolved all issues. For example: Then why do we have I can raise like 5-6 more issues of inconstancy of how we name things. We can reopen this and potentially come up with a replacement to AIP-21 with new rules and some enforcements but that is a massive refactor. |
Changes to import paths:
operators.kubernetes_pod
->operators.pod
triggers.kubernetes_pod
->triggers.pod
This PR is backward compatible
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.