airflow.providers.amazon.aws.executors.ecs.utils¶
AWS ECS Executor Utilities.
Data classes and utility functions used by the ECS executor.
Attributes¶
Exceptions¶
Thrown when something unexpected has occurred within the ECS ecosystem. |
Classes¶
Represents a queued ECS workload (task or callback). The workload will be run in the next heartbeat. |
|
Contains information about a currently running ECS task. |
|
Keys loaded into the config which are valid ECS run_task kwargs. |
|
All keys loaded into the config which are related to the ECS Executor. |
|
Data Transfer Object for an ECS Task. |
|
A five-way dictionary between Airflow workload keys, commands, ECS ARNs, and ECS task objects. |
Functions¶
|
Convert "assign_public_ip" from True/False to ENABLE/DISABLE. |
|
Accept a potentially nested dictionary and recursively convert all keys into camelCase. |
Module Contents¶
- type airflow.providers.amazon.aws.executors.ecs.utils.CommandType = Sequence[str] | Sequence[ExecuteTask] | Sequence[ExecuteCallback][source]¶
- class airflow.providers.amazon.aws.executors.ecs.utils.EcsQueuedTask[source]¶
Represents a queued ECS workload (task or callback). The workload will be run in the next heartbeat.
- next_attempt_time: datetime.datetime[source]¶
- class airflow.providers.amazon.aws.executors.ecs.utils.EcsTaskInfo[source]¶
Contains information about a currently running ECS task.
- class airflow.providers.amazon.aws.executors.ecs.utils.RunTaskKwargsConfigKeys[source]¶
Bases:
airflow.providers.amazon.aws.executors.utils.base_config_keys.BaseConfigKeysKeys loaded into the config which are valid ECS run_task kwargs.
- class airflow.providers.amazon.aws.executors.ecs.utils.AllEcsConfigKeys[source]¶
Bases:
RunTaskKwargsConfigKeysAll keys loaded into the config which are related to the ECS Executor.
- exception airflow.providers.amazon.aws.executors.ecs.utils.EcsExecutorException[source]¶
Bases:
ExceptionThrown when something unexpected has occurred within the ECS ecosystem.
- class airflow.providers.amazon.aws.executors.ecs.utils.EcsExecutorTask(task_arn, last_status, desired_status, containers, started_at=None, stopped_reason=None, external_executor_id=None)[source]¶
Data Transfer Object for an ECS Task.
- get_task_state()[source]¶
Determine the state of an ECS task based on its status and other relevant attributes.
- It can return one of the following statuses:
QUEUED - Task is being provisioned. RUNNING - Task is launched on ECS. REMOVED - Task provisioning has failed for some reason. See stopped_reason. FAILED - Task is completed and at least one container has failed. SUCCESS - Task is completed and all containers have succeeded.
- class airflow.providers.amazon.aws.executors.ecs.utils.EcsTaskCollection[source]¶
A five-way dictionary between Airflow workload keys, commands, ECS ARNs, and ECS task objects.
- tasks: dict[str, EcsExecutorTask][source]¶
- key_to_task_info: dict[airflow.executors.workloads.types.WorkloadKey, EcsTaskInfo][source]¶
- add_task(task, airflow_task_key, queue, airflow_cmd, exec_config, attempt_number)[source]¶
Add a task to the collection.
- failure_count_by_key(task_key)[source]¶
Get the number of times a workload has failed given an Airflow workload key.