This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c7e4e8eafa D205 Support - Helm files (#33302)
c7e4e8eafa is described below
commit c7e4e8eafa1076a5f851d80c1a7070a0076d8183
Author: D. Ferruzzi <[email protected]>
AuthorDate: Fri Aug 11 01:28:42 2023 -0700
D205 Support - Helm files (#33302)
---
helm_tests/airflow_aux/test_airflow_common.py | 11 +++++------
helm_tests/airflow_aux/test_basic_helm_chart.py | 10 ++++------
helm_tests/airflow_core/test_scheduler.py | 6 ++----
helm_tests/airflow_core/test_triggerer.py | 5 +++--
helm_tests/other/test_git_sync_webserver.py | 5 +----
helm_tests/other/test_keda.py | 5 ++---
6 files changed, 17 insertions(+), 25 deletions(-)
diff --git a/helm_tests/airflow_aux/test_airflow_common.py
b/helm_tests/airflow_aux/test_airflow_common.py
index 3cd517660d..72b39e031c 100644
--- a/helm_tests/airflow_aux/test_airflow_common.py
+++ b/helm_tests/airflow_aux/test_airflow_common.py
@@ -24,11 +24,9 @@ from tests.charts.helm_template_generator import render_chart
class TestAirflowCommon:
"""
- This class holds tests that apply to more than 1 Airflow component so
- we don't have to repeat tests everywhere.
+ Tests that apply to more than 1 Airflow component so we don't have to
repeat tests everywhere.
- The one general exception will be the KubernetesExecutor PodTemplateFile,
- as it requires extra test setup.
+ The one general exception will be the KubernetesExecutor PodTemplateFile,
as it requires extra test setup.
"""
@pytest.mark.parametrize(
@@ -126,8 +124,9 @@ class TestAirflowCommon:
def test_annotations(self):
"""
- Test Annotations are correctly applied on all pods created Scheduler,
Webserver & Worker
- deployments.
+ Test Annotations are correctly applied.
+
+ Verifies all pods created Scheduler, Webserver & Worker deployments.
"""
release_name = "test-basic"
k8s_objects = render_chart(
diff --git a/helm_tests/airflow_aux/test_basic_helm_chart.py
b/helm_tests/airflow_aux/test_basic_helm_chart.py
index 3cf03707f3..7aeea3eac0 100644
--- a/helm_tests/airflow_aux/test_basic_helm_chart.py
+++ b/helm_tests/airflow_aux/test_basic_helm_chart.py
@@ -408,8 +408,9 @@ class TestBaseChartTest:
def test_annotations_on_airflow_pods_in_deployment(self):
"""
- Test Annotations are correctly applied on all pods created Scheduler,
Webserver & Worker
- deployments.
+ Test Annotations are correctly applied.
+
+ Verifies all pods created Scheduler, Webserver & Worker deployments.
"""
release_name = "test-basic"
k8s_objects = render_chart(
@@ -441,10 +442,7 @@ class TestBaseChartTest:
def test_chart_is_consistent_with_official_airflow_image(self):
def get_k8s_objs_with_image(obj: list[Any] | dict[str, Any]) ->
list[dict[str, Any]]:
- """
- Recursive helper to retrieve all the k8s objects that have an
"image" key
- inside k8s obj or list of k8s obj.
- """
+ """Retrieve all the k8s objects that have an "image" key inside
k8s obj or list of k8s obj."""
out = []
if isinstance(obj, list):
for item in obj:
diff --git a/helm_tests/airflow_core/test_scheduler.py
b/helm_tests/airflow_core/test_scheduler.py
index cb0aa7e669..9bf2f0071d 100644
--- a/helm_tests/airflow_core/test_scheduler.py
+++ b/helm_tests/airflow_core/test_scheduler.py
@@ -40,10 +40,7 @@ class TestScheduler:
],
)
def test_scheduler_kind(self, executor, persistence, kind):
- """
- Test scheduler kind is StatefulSet only when using a local executor &
- worker persistence is enabled.
- """
+ """Test scheduler kind is StatefulSet only with a local executor &
worker persistence is enabled."""
docs = render_chart(
values={
"executor": executor,
@@ -676,6 +673,7 @@ class TestScheduler:
):
"""
DAG Processor can move gitsync and DAGs mount from the scheduler to
the DAG Processor only.
+
The only exception is when we have a Local executor.
In these cases, the scheduler does the worker role and needs access to
DAGs anyway.
"""
diff --git a/helm_tests/airflow_core/test_triggerer.py
b/helm_tests/airflow_core/test_triggerer.py
index 64f1a3419b..d19d83f917 100644
--- a/helm_tests/airflow_core/test_triggerer.py
+++ b/helm_tests/airflow_core/test_triggerer.py
@@ -44,8 +44,9 @@ class TestTriggerer:
def test_can_be_disabled(self):
"""
- Triggerer should be able to be disabled if the users desires
- (e.g. Python 3.6 or doesn't want to use async tasks).
+ Triggerer should be able to be disabled if the users desires.
+
+ For example, user may be disabled when using Python 3.6 or doesn't
want to use async tasks.
"""
docs = render_chart(
values={"triggerer": {"enabled": False}},
diff --git a/helm_tests/other/test_git_sync_webserver.py
b/helm_tests/other/test_git_sync_webserver.py
index b574abcc63..01bf49a65b 100644
--- a/helm_tests/other/test_git_sync_webserver.py
+++ b/helm_tests/other/test_git_sync_webserver.py
@@ -82,10 +82,7 @@ class TestGitSyncWebserver:
],
)
def test_git_sync_with_different_airflow_versions(self, airflow_version,
exclude_webserver):
- """
- If Airflow >= 2.0.0 - git sync related containers, volume mounts &
volumes
- are not created.
- """
+ """If Airflow >= 2.0.0 - git sync related containers, volume mounts &
volumes are not created."""
docs = render_chart(
values={
"airflowVersion": airflow_version,
diff --git a/helm_tests/other/test_keda.py b/helm_tests/other/test_keda.py
index 5fd6c14f8e..e171f3f6a9 100644
--- a/helm_tests/other/test_keda.py
+++ b/helm_tests/other/test_keda.py
@@ -41,9 +41,7 @@ class TestKeda:
],
)
def test_keda_enabled(self, executor, is_created):
- """ScaledObject should only be created when set to enabled and
- executor is Celery or CeleryKubernetes.
- """
+ """ScaledObject should only be created when enabled and executor is
Celery or CeleryKubernetes."""
docs = render_chart(
values={
"workers": {"keda": {"enabled": True}, "persistence":
{"enabled": False}},
@@ -128,6 +126,7 @@ class TestKeda:
def test_keda_query_kubernetes_queue(self, executor, queue, should_filter):
"""
Verify keda sql query ignores kubernetes queue when CKE is used.
+
Sometimes a user might want to use a different queue name for k8s
executor tasks,
and we also verify here that we use the configured queue name in that
case.
"""