Skip to content

Add new LocalFilesystemToS3Operator under Amazon provider (#17168)#17382

Merged
potiuk merged 7 commits intoapache:mainfrom
denimalpaca:main
Aug 14, 2021
Merged

Add new LocalFilesystemToS3Operator under Amazon provider (#17168)#17382
potiuk merged 7 commits intoapache:mainfrom
denimalpaca:main

Conversation

@denimalpaca
Copy link
Copy Markdown
Contributor

Add new LocalFilesystemToS3Operator under Amazon provider (#17168)

Currently, an S3Hook exists that allows transfer of files to S3 via load_file(), however there is no operator associated with it. The LocalFilesystemToS3Operator would wrap the S3 Hook, so it is not used directly.

Seeing as to upload a local file to S3 using the S3 Hook, a Python task with the same functionality has to be written anyway, this could reduce a lot of redundant boiler-plate code and standardize the local file to S3 load process.

closes: #17168

Fix `airflow celery stop` to accept the pid file. (apache#17278)

Fix isort (apache#17330)

Fix failing celery test (apache#17337)

This change fixes failing test due to mocking
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Aug 2, 2021
@boring-cyborg
Copy link
Copy Markdown

boring-cyborg bot commented Aug 2, 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

When dest_key is given as a full s3:// filepath and dest_bucket is
also provided, operator throws an error in its init() method. A test
is added for this case.
… given

When dest_key is given as a full s3:// file path, the parent operator does
not expect a dest_bucket. A TypeError is raised when dest_bucket is not None
in this case.
Copy link
Copy Markdown
Member

@mik-laj mik-laj left a comment

Choose a reason for hiding this comment

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

LGTM, But CI hasn't been running for this change yet

@github-actions
Copy link
Copy Markdown

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Aug 14, 2021
@potiuk potiuk merged commit 1632c9f into apache:main Aug 14, 2021
@boring-cyborg
Copy link
Copy Markdown

boring-cyborg bot commented Aug 14, 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:providers okay to merge It's ok to merge this PR as it does not require more tests provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add LocalFilesystemtoS3Operator

6 participants