You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/15 05:06:55 UTC

[GitHub] [airflow] selvamshan opened a new pull request #10338: Update redshift_to_s3.py

selvamshan opened a new pull request #10338:
URL: https://github.com/apache/airflow/pull/10338


   S3ToRedshiftTransfer and RedshiftToS3Transfer with temporary token credentials
   #9970
   AWS ref:https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-authorization.html
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] stale[bot] commented on pull request #10338: Update redshift_to_s3.py

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #10338:
URL: https://github.com/apache/airflow/pull/10338#issuecomment-751246652


   This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] RosterIn commented on a change in pull request #10338: Update redshift_to_s3.py

Posted by GitBox <gi...@apache.org>.
RosterIn commented on a change in pull request #10338:
URL: https://github.com/apache/airflow/pull/10338#discussion_r502310879



##########
File path: airflow/providers/amazon/aws/transfers/redshift_to_s3.py
##########
@@ -112,13 +112,14 @@ def execute(self, context):
                     UNLOAD ('{select_query}')
                     TO 's3://{s3_bucket}/{s3_key}'
                     with credentials
-                    'aws_access_key_id={access_key};aws_secret_access_key={secret_key}'
+                    'aws_access_key_id={access_key};aws_secret_access_key={secret_key};token={token}'

Review comment:
       You need also to modify the test
   `tests.providers.amazon.aws.transfers.test_redshift_to_s3.TestRedshiftToS3Transfer`
   because it's failing:
   ```
       def fail(self, msg=None):
           """Fail immediately, with the given message."""
   >       raise self.failureException(msg)
   E       AssertionError: "UNLO[110 chars]ws_secret_access_key=aws_secret_access_key;token=None' HEADER;" != "UNLO[110 chars]ws_secret_access_key=aws_secret_access_key' HEADER;"
   E       - UNLOAD ('SELECT * FROM schema.table') TO 's3://bucket/key' with credentials 'aws_access_key_id=aws_access_key_id;aws_secret_access_key=aws_secret_access_key;token=None' HEADER;
   E       ?                                                                                                                                                             -----------
   E       + UNLOAD ('SELECT * FROM schema.table') TO 's3://bucket/key' with credentials 'aws_access_key_id=aws_access_key_id;aws_secret_access_key=aws_secret_access_key' HEADER;
   
   /usr/local/lib/python3.6/unittest/case.py:670: AssertionError
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] closed pull request #10338: Update redshift_to_s3.py

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #10338:
URL: https://github.com/apache/airflow/pull/10338


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] RosterIn commented on a change in pull request #10338: Update redshift_to_s3.py

Posted by GitBox <gi...@apache.org>.
RosterIn commented on a change in pull request #10338:
URL: https://github.com/apache/airflow/pull/10338#discussion_r502310879



##########
File path: airflow/providers/amazon/aws/transfers/redshift_to_s3.py
##########
@@ -112,13 +112,14 @@ def execute(self, context):
                     UNLOAD ('{select_query}')
                     TO 's3://{s3_bucket}/{s3_key}'
                     with credentials
-                    'aws_access_key_id={access_key};aws_secret_access_key={secret_key}'
+                    'aws_access_key_id={access_key};aws_secret_access_key={secret_key};token={token}'

Review comment:
       You need also to modify the test
   `tests.providers.amazon.aws.transfers.test_redshift_to_s3.TestRedshiftToS3Transfer`
   because it's failing:
   ```
       def fail(self, msg=None):
           """Fail immediately, with the given message."""
   >       raise self.failureException(msg)
   E       AssertionError: "UNLO[110 chars]ws_secret_access_key=aws_secret_access_key;token=None' HEADER;" != "UNLO[110 chars]ws_secret_access_key=aws_secret_access_key' HEADER;"
   E       - UNLOAD ('SELECT * FROM schema.table') TO 's3://bucket/key' with credentials 'aws_access_key_id=aws_access_key_id;aws_secret_access_key=aws_secret_access_key;token=None' HEADER;
   E       ?                                                                                                                                                             -----------
   E       + UNLOAD ('SELECT * FROM schema.table') TO 's3://bucket/key' with credentials 'aws_access_key_id=aws_access_key_id;aws_secret_access_key=aws_secret_access_key' HEADER;
   
   /usr/local/lib/python3.6/unittest/case.py:670: AssertionError
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org