-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-4438] Add Gzip compression to S3_hook #7680
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit-picking. If you correct it - we can merge it :)
@@ -442,6 +445,9 @@ def load_file(self, | |||
:param encrypt: If True, the file will be encrypted on the server-side | |||
by S3 and will be stored in an encrypted form while at rest in S3. | |||
:type encrypt: bool | |||
:param gzip: If True, the file will be compressed on the server-side |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:param gzip: If True, the file will be compressed on the server-side | |
:param gzip: If True, the file will be compressed locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I will resolve this
- Added bool parameter gzip to load_file to s3_hook - Tested the load_file with load_file_gzip unittest - Updated the load_file docstring to reflect the extra parameter
Codecov Report
@@ Coverage Diff @@
## master #7680 +/- ##
===========================================
- Coverage 86.99% 64.47% -22.53%
===========================================
Files 904 903 -1
Lines 43728 43723 -5
===========================================
- Hits 38043 28189 -9854
- Misses 5685 15534 +9849
Continue to review full report at Codecov.
|
Awesome work, congrats on your first merged pull request! |
Thanks @OmairK ! |
Your welcome @potiuk 😄 . Thanks a lot for guiding me through my first PR. |
Hello, @OmairK I'm afraid this isn't working like it should. When you pass a string filename, how can filename.name be derived? https://github.com/apache/airflow/pull/7680/files#diff-411e5140735ea97206a32c7b390e2800R459 Or I'm misunderstanding how this should work. thx for update. |
Fixes a bug introduced in #7680 with passing filename as string
@thierryturpin Thanks for pointing it out, you are right about this I overlooked this silly mistake. I have made the changes and PR has been merged #8571 |
Fixes a bug introduced in apache#7680 with passing filename as string (cherry picked from commit 74bc316)
Issue link: AIRFLOW-4438
Make sure to mark the boxes below before creating PR: [x]
[AIRFLOW-NNNN]
. AIRFLOW-NNNN = JIRA ID** For document-only changes commit message can start with
[AIRFLOW-XXXX]
.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.
Read the Pull Request Guidelines for more information.