-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Restructure Amazon provider operators files #20139
Comments
Hey Elad, Thanks for cutting this ticket! We can take this work item over here at AWS; assign the task to me unless someone else is keen to do it, and we'll pick away at it 👍 |
Multiple people can work on it together. Each action item is stand alone. Together we can finish this quickly. |
Ah okay, I didn't think there was any urgency here. Fair enough. But yes, definitely agree that it is parallelizable 👍 |
Nice. you just might want to make it easier to get people to migrate and keep the deprecation working @o-nikolas @eladkal . We also have very nice framework for deprecation warnings (used during 1.10/2.0 migration: https://github.com/apache/airflow/blob/main/tests/deprecated_classes.py. |
Agree with the proposed changes @eladkal |
Can I work on one of the classes? I can work on S3. @eladkal and @o-nikolas |
I can take up a few of them since @KennyRich wants to do S3. I'll start with EC2 |
Already started EC2 as mentioned earlier.. I'll PR shortly... There is plenty to pick up...
|
@eladkal Please kindly link your PR here so I can easily see and learn from it. |
Let me start with dms.py then. Quick question. Should we add the deprecated warning like the following on existing modules, or is this auto-generated?
|
Found the following error in
|
See the linked PR to the action items. |
I see Also, noticed that glue hooks follow the multi-file pattern. Probably the only hook which follows that pattern.
I can unify them as well as part of the PR. cc: @eladkal |
@yeshbash I'm not 100% on combining glue, glue_crawler, glue_catalog together - which is why I left it out and focused only on glue as stand alone. |
Hey cool initiative, I definitely agree with this plan! Sorry for the delay in response, I was enjoying a seaside cabin without internet last week. 🏖️ I will take a closer look at what's been claimed and add some work on this tomorrow. For the Glue question, the docstring on glue.py was created 2020-05-02 by abdulbasitds from the initial PR here it looks like there was some copy/pasta from someone else's fork so maybe the plan was to combine them all along? I don't really use Glue so maybe someone with a better working knowledge of how it's actually used in the wild would have an opinion on this, and I'd definitely defer to that, but it looks to me like maybe we can combine them. |
[EDIT: It looks like you already sorted it out, but for posterity in case this pops up in a search later: ] You need to edit |
Since we are making these changes and going to be deprecating old operators in favor of new ones, it may be a good time to address some standardization issues as well? Two that have bugged me a bit are acronym capitalization across the Operators, and whether to prefix them all with These are incomplete lists just for example: we have |
The instructions are listed in AIP 21 cases 3-4 and case 6. The sensors/operators classes names should not have Aws/AWS as part of the class name. So: @ferruzzi would you like to work on it? |
Yup, I can take that on. |
Batch has multiple Hook files, that may fall under this campaign? One is for the waiter and the other for the client though, so maybe not? |
Batch is not part of the action items of this issue as here we are focused on Operators/Sensors. |
@ferruzzi what do you think about the case of |
@eladkal To be honest, I'm not a Glue user and I agree with you that it should be whatever a regular user would expect, but I don't know what that would be. I only have a passing knowledge of that service so I'm not in the best position to make that call. I'll see if I can find someone who uses it "in the wild" that I can chat with tomorrow and see what a user's perspective is. |
OK so i'm leaving Glue as is as this point. We can always revisit in the future. |
Alright, FWIW, my huge sample size of two says they should be fine to combine. It's not a lot, and one of those two said they are "very new" to Glue but have used it a couple times, but they both said to combine them into one package. |
For what it's worth, a third Glue user got back to me today, also claiming they are "not an expert" but they suggested that combining them sounded logical to them. Three out of three users agree? Not exactly a huge sample size, but it's fairly consistent. |
Thank you everyone for getting this done so quickly! |
Body
Spun out of #19665 (comment)
Info:
Currently operators in Amazon provider has a structure of operator per file (link) A single service S3 has 7 operators files! This makes it very hard to discover classes.
The proposed structure is what we have for GCP (link) where file is created for a service and all operators for that services are in a single file.
Proposed changes:
Operators:
files that don't require changes:
athena.py
batch.py
cloud_formation.py
datasync.py
ecs.py
eks.py
glacier.py
glue.py
glue_crawler.py
redshift.py
sns.py
sqs.py
files that require changes:
Sensors:
files that don't require changes:
athena.py
batch.py
cloud_formation.py
eks.py
glacier.py
glue.py
glue_crawler.py
redshift.py
sqs.py
files that require changes:
Action items:
Create new files and deprecate old ones. This is a backward compatible change.
old file should raise deprecation warnings.
[ ] sensors/glue.py @eladkal On hold as we don't know if this really required. Will be revisited in the future if neededFYI @dstandish @ferruzzi @o-nikolas @dbarrundiag
Committer
The text was updated successfully, but these errors were encountered: