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 2021/01/15 23:42:39 UTC

[GitHub] [airflow] JavierLopezT opened a new pull request #13707: Add FTPToS3Operator

JavierLopezT opened a new pull request #13707:
URL: https://github.com/apache/airflow/pull/13707


   New transfer


----------------------------------------------------------------
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] dstandish commented on a change in pull request #13707: Add FTPToS3Operator

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



##########
File path: airflow/providers/amazon/aws/transfers/ftp_to_s3.py
##########
@@ -0,0 +1,106 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from tempfile import NamedTemporaryFile
+
+from airflow.models import BaseOperator
+from airflow.providers.amazon.aws.hooks.s3 import S3Hook
+from airflow.providers.ftp.hooks.ftp import FTPHook
+from airflow.utils.decorators import apply_defaults
+
+
+class FTPToS3Operator(BaseOperator):
+    """
+    This operator enables the transferring of files from FTP server to S3.
+
+    :param ftp_conn_id: The ftp connection id. The name or identifier for

Review comment:
       i think the params in doc should have same order as in `__init__`




----------------------------------------------------------------
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] commented on pull request #13707: Add FTPToS3Operator

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/555203581) is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason.


----------------------------------------------------------------
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] commented on pull request #13707: Add FTPToS3Operator

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/551050054) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


----------------------------------------------------------------
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] JavierLopezT removed a comment on pull request #13707: Add FTPToS3Operator

Posted by GitBox <gi...@apache.org>.
JavierLopezT removed a comment on pull request #13707:
URL: https://github.com/apache/airflow/pull/13707#issuecomment-795833652


   > All checks have passed. Could anyone approve this, please? Thanks
   
   Anyone? Thanks


----------------------------------------------------------------
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] dstandish commented on a change in pull request #13707: Add FTPToS3Operator

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



##########
File path: airflow/providers/amazon/aws/transfers/ftp_to_s3.py
##########
@@ -0,0 +1,106 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from tempfile import NamedTemporaryFile
+
+from airflow.models import BaseOperator
+from airflow.providers.amazon.aws.hooks.s3 import S3Hook
+from airflow.providers.ftp.hooks.ftp import FTPHook
+from airflow.utils.decorators import apply_defaults
+
+
+class FTPToS3Operator(BaseOperator):
+    """
+    This operator enables the transferring of files from FTP server to S3.
+
+    :param ftp_conn_id: The ftp connection id. The name or identifier for
+        establishing a connection to the FTP server.
+    :type ftp_conn_id: str
+    :param ftp_path: The ftp remote path, including the file.
+    :type ftp_path: str
+    :param aws_conn_id: The s3 connection id. The name or identifier for
+        establishing a connection to S3
+    :type aws_conn_id: str
+    :param s3_bucket: The targeted s3 bucket in which upload the file to
+    :type s3_bucket: str
+    :param s3_key: The targeted s3 key. This is the specified file path for
+        uploading the file from S3.

Review comment:
       file _to_ s3




----------------------------------------------------------------
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] JavierLopezT commented on pull request #13707: Add FTPToS3Operator

Posted by GitBox <gi...@apache.org>.
JavierLopezT commented on pull request #13707:
URL: https://github.com/apache/airflow/pull/13707#issuecomment-785084345


   All checks have passed. Could anyone approve this, please? Thanks


----------------------------------------------------------------
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] commented on pull request #13707: Add FTPToS3Operator

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/539893935) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


----------------------------------------------------------------
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] commented on pull request #13707: Add FTPToS3Operator

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


   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 master or amend the last commit of the PR, and push it with --force-with-lease.


----------------------------------------------------------------
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] subkanthi commented on a change in pull request #13707: Add FTPToS3Operator

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



##########
File path: tests/providers/amazon/aws/transfers/test_ftp_to_s3.py
##########
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import unittest
+from unittest import mock
+
+from airflow.providers.amazon.aws.transfers.ftp_to_s3 import FTPToS3Operator
+
+TASK_ID = 'test_s3_to_ftp'

Review comment:
       task id should probably be ftp to s3.




----------------------------------------------------------------
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] commented on pull request #13707: Add FTPToS3Operator

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/489203032) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


----------------------------------------------------------------
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] commented on pull request #13707: Add FTPToS3Operator

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


   [The Workflow run](https://github.com/apache/airflow/actions/runs/490449476) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


----------------------------------------------------------------
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] dstandish merged pull request #13707: Add FTPToS3Operator

Posted by GitBox <gi...@apache.org>.
dstandish merged pull request #13707:
URL: https://github.com/apache/airflow/pull/13707


   


----------------------------------------------------------------
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] JavierLopezT commented on pull request #13707: Add FTPToS3Operator

Posted by GitBox <gi...@apache.org>.
JavierLopezT commented on pull request #13707:
URL: https://github.com/apache/airflow/pull/13707#issuecomment-795833652


   > All checks have passed. Could anyone approve this, please? Thanks
   
   Anyone? Thanks


----------------------------------------------------------------
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] dstandish commented on a change in pull request #13707: Add FTPToS3Operator

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



##########
File path: airflow/providers/amazon/aws/transfers/ftp_to_s3.py
##########
@@ -0,0 +1,106 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from tempfile import NamedTemporaryFile
+
+from airflow.models import BaseOperator
+from airflow.providers.amazon.aws.hooks.s3 import S3Hook
+from airflow.providers.ftp.hooks.ftp import FTPHook
+from airflow.utils.decorators import apply_defaults
+
+
+class FTPToS3Operator(BaseOperator):
+    """
+    This operator enables the transferring of files from FTP server to S3.
+
+    :param ftp_conn_id: The ftp connection id. The name or identifier for
+        establishing a connection to the FTP server.
+    :type ftp_conn_id: str
+    :param ftp_path: The ftp remote path, including the file.
+    :type ftp_path: str
+    :param aws_conn_id: The s3 connection id. The name or identifier for
+        establishing a connection to S3
+    :type aws_conn_id: str
+    :param s3_bucket: The targeted s3 bucket in which upload the file to
+    :type s3_bucket: str
+    :param s3_key: The targeted s3 key. This is the specified file path for
+        uploading the file from S3.

Review comment:
       file _to_ s3




----------------------------------------------------------------
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