Skip to content

Commit

Permalink
Chart: Allow AWS Executors (apache#38524)
Browse files Browse the repository at this point in the history
  • Loading branch information
LipuFei authored and jannisko committed Jun 15, 2024
1 parent b67b4b8 commit 018cdf2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
3 changes: 3 additions & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ cluster using the [Helm](https://helm.sh) package manager.
## Features

* Supported executors: ``LocalExecutor``, ``CeleryExecutor``, ``KubernetesExecutor``, ``LocalKubernetesExecutor``, ``CeleryKubernetesExecutor``
* Supported AWS executors with AWS provider version ``8.21.0+``:
* ``airflow.providers.amazon.aws.executors.batch.AwsBatchExecutor``
* ``airflow.providers.amazon.aws.executors.ecs.AwsEcsExecutor``
* Supported Airflow version: ``1.10+``, ``2.0+``
* Supported database backend: ``PostgreSQL``, ``MySQL``
* Autoscaling for ``CeleryExecutor`` provided by KEDA
Expand Down
4 changes: 3 additions & 1 deletion chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,9 @@
"LocalKubernetesExecutor",
"CeleryExecutor",
"KubernetesExecutor",
"CeleryKubernetesExecutor"
"CeleryKubernetesExecutor",
"airflow.providers.amazon.aws.executors.batch.AwsBatchExecutor",
"airflow.providers.amazon.aws.executors.ecs.AwsEcsExecutor"
]
},
"allowPodLaunching": {
Expand Down
24 changes: 23 additions & 1 deletion helm_tests/airflow_aux/test_basic_helm_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,26 @@ def get_k8s_objs_with_image(obj: list[Any] | dict[str, Any]) -> list[dict[str, A
# Make sure that a command is not specified
assert "command" not in obj

@pytest.mark.parametrize(
"executor",
[
"LocalExecutor",
"LocalKubernetesExecutor",
"CeleryExecutor",
"KubernetesExecutor",
"CeleryKubernetesExecutor",
"airflow.providers.amazon.aws.executors.batch.AwsBatchExecutor",
"airflow.providers.amazon.aws.executors.ecs.AwsEcsExecutor",
],
)
def test_supported_executor(self, executor):
render_chart(
"test-basic",
{
"executor": executor,
},
)

def test_unsupported_executor(self):
with pytest.raises(CalledProcessError) as ex_ctx:
render_chart(
Expand All @@ -524,7 +544,9 @@ def test_unsupported_executor(self):
assert (
'executor must be one of the following: "LocalExecutor", '
'"LocalKubernetesExecutor", "CeleryExecutor", '
'"KubernetesExecutor", "CeleryKubernetesExecutor"' in ex_ctx.value.stderr.decode()
'"KubernetesExecutor", "CeleryKubernetesExecutor", '
'"airflow.providers.amazon.aws.executors.batch.AwsBatchExecutor", '
'"airflow.providers.amazon.aws.executors.ecs.AwsEcsExecutor"' in ex_ctx.value.stderr.decode()
)

@pytest.mark.parametrize(
Expand Down

0 comments on commit 018cdf2

Please sign in to comment.