Skip to content
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

Organise S3 Classes in Amazon Provider #20167

Merged
merged 15 commits into from
Dec 13, 2021
Merged

Organise S3 Classes in Amazon Provider #20167

merged 15 commits into from
Dec 13, 2021

Conversation

KennyRich
Copy link
Contributor

Part of #20139


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.

@boring-cyborg
Copy link

boring-cyborg bot commented Dec 9, 2021

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@KennyRich KennyRich marked this pull request as draft December 9, 2021 13:25
@KennyRich KennyRich marked this pull request as ready for review December 9, 2021 14:05
@eladkal
Copy link
Contributor

eladkal commented Dec 9, 2021

@KennyRich can you please rebase & resolve conflicts?
Also note that some of the S3 operators are also in contrib.
For example:

'airflow.providers.amazon.aws.operators.s3_list.S3ListOperator',
'airflow.contrib.operators.s3_list_operator.S3ListOperator',

This means that contrib (which is deprecated) is now pointing to deprecated class. This is probably wrong and should direct to the new class directly(?)

@KennyRich
Copy link
Contributor Author

@KennyRich can you please rebase & resolve conflicts? Also note that some of the S3 operators are also in contrib. For example:

'airflow.providers.amazon.aws.operators.s3_list.S3ListOperator',
'airflow.contrib.operators.s3_list_operator.S3ListOperator',

This means that contrib (which is deprecated) is now pointing to deprecated class. This is probably wrong and should direct to the new class directly(?)

@eladkal Thanks for the feedback, I'll do that and send in a PR

# Conflicts:
#	dev/provider_packages/prepare_provider_packages.py
#	tests/deprecated_classes.py
Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check with Breeze locally that test passes.
Currently if you will run:
pytest -s tests/core/test_core_to_contrib.py
It will fail. some imports are wrong and also you have some duplications (I didn't add comments on all issues... running the test will tell you what needs to be fixed)

tests/deprecated_classes.py Outdated Show resolved Hide resolved
tests/deprecated_classes.py Outdated Show resolved Hide resolved
tests/deprecated_classes.py Outdated Show resolved Hide resolved
KennyRich and others added 3 commits December 9, 2021 20:20
Co-authored-by: eladkal <45845474+eladkal@users.noreply.github.com>
Co-authored-by: eladkal <45845474+eladkal@users.noreply.github.com>
Co-authored-by: eladkal <45845474+eladkal@users.noreply.github.com>
Co-authored-by: eladkal <45845474+eladkal@users.noreply.github.com>
@eladkal
Copy link
Contributor

eladkal commented Dec 12, 2021

@KennyRich you are missing also fixes to test classes:
https://github.com/apache/airflow/tree/main/tests/providers/amazon/aws/operators
https://github.com/apache/airflow/tree/main/tests/providers/amazon/aws/sensors

Tests are still importing operators from old paths.

Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Will merge once CI is green.

@KennyRich can you please rebase and resolve conflicts?

@KennyRich
Copy link
Contributor Author

LGTM Will merge once CI is green.

@KennyRich can you please rebase and resolve conflicts?

I've resolved the merge conflicts. Thanks for your help so far!

@eladkal eladkal merged commit a208463 into apache:main Dec 13, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 13, 2021

Awesome work, congrats on your first merged pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools area:providers kind:documentation provider:amazon-aws AWS/Amazon - related issues provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants