airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] feluelle commented on a change in pull request #7030: [AIRFLOW-6440][AIP-29][WIP] Add AWS Fargate Executor
Date Tue, 07 Jan 2020 12:39:27 GMT
feluelle commented on a change in pull request #7030: [AIRFLOW-6440][AIP-29][WIP] Add AWS Fargate
Executor
URL: https://github.com/apache/airflow/pull/7030#discussion_r363723577
 
 

 ##########
 File path: airflow/executors/fargate_executor.py
 ##########
 @@ -0,0 +1,327 @@
+# 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.
+"""AWS Fargate Executor."""
+
+import time
+from typing import Dict, List, Optional, Callable
+
+from .base_executor import BaseExecutor, TaskInstanceKeyType, CommandType
+from airflow.utils.module_loading import import_string
+from airflow.utils.state import State
+
+from airflow import configuration
+import boto3  # Additional Requirement from base-airflow
+from boto3.exceptions import Boto3Error
+
+
+ExecutorConfigFunctionType = Callable[[CommandType], dict]
+
+
+class FargateExecutor(BaseExecutor):
+    """
+    The Airflow Scheduler create a shell command, and passes it to the executor. This Fargate
Executor simply runs
+    said airflow command on a remote AWS Fargate Cluster with an task-definition configured
with the same containers as
+    the Scheduler. It then periodically checks in with the launched tasks (via task-arns)
to determine the status.
+
+    Prerequisite: proper configuration of boto3 library
+    See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html
for credential management
 
 Review comment:
   ```suggestion
       .. seealso:: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html
for credential management
   ```
   
   You can use rst seealso to generate colored boxes: https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html#colored-boxes-note-seealso-todo-and-warnings
   
   

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


With regards,
Apache Git Services

Mime
View raw message