Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes
  • Loading branch information
jscheffl committed Feb 24, 2026
commit a90f3dd3d9b3265df28b55a0dd423d4f00b28ba2
5 changes: 0 additions & 5 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1184,11 +1184,6 @@
"type": "boolean",
"default": true
},
"AIRFLOW__CORE__SQL_ALCHEMY_CONN": {
"description": "Enable ``AIRFLOW__CORE__SQL_ALCHEMY_CONN`` variable to be read from the Metadata Secret",
"type": "boolean",
"default": true
},
"AIRFLOW__DATABASE__SQL_ALCHEMY_CONN": {
"description": "Enable ``AIRFLOW__DATABASE__SQL_ALCHEMY_CONN`` variable to be read from the Metadata Secret",
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,12 @@ def test_should_disable_some_variables(self):
docs = render_chart(
values={
"enableBuiltInSecretEnvVars": {
"AIRFLOW__CORE__SQL_ALCHEMY_CONN": False,
"AIRFLOW__DATABASE__SQL_ALCHEMY_CONN": False,
"AIRFLOW__API__SECRET_KEY": False,
"AIRFLOW__API_AUTH__JWT_SECRET": False,
"AIRFLOW__WEBSERVER__SECRET_KEY": False,
# the following vars only appear if remote logging is set, so disabling them in this test is kind of a no-op
"AIRFLOW__ELASTICSEARCH__HOST": False,
"AIRFLOW__ELASTICSEARCH__ELASTICSEARCH_HOST": False,
"AIRFLOW__OPENSEARCH__HOST": False,
},
},
Expand Down Expand Up @@ -418,7 +416,6 @@ def test_have_all_variables(self):
expected_vars = [
"AIRFLOW__CORE__FERNET_KEY",
"AIRFLOW_HOME",
"AIRFLOW__CORE__SQL_ALCHEMY_CONN",
"AIRFLOW__DATABASE__SQL_ALCHEMY_CONN",
"AIRFLOW_CONN_AIRFLOW_DB",
"AIRFLOW__API__SECRET_KEY",
Expand Down
69 changes: 0 additions & 69 deletions helm-tests/tests/helm_tests/airflow_aux/test_remote_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,38 +130,6 @@ def test_env_should_add_elasticsearch_host_var_if_es_enabled(self):
"valueFrom": {"secretKeyRef": {"name": "test-elastic-secret", "key": "connection"}},
} in scheduler_env

def test_env_should_omit_elasticsearch_host_var_if_es_disabled_legacy(self):
"""AIRFLOW__ELASTICSEARCH__ELASTICSEARCH_HOST was the environment key prior to Airflow 1.10.4
(see https://github.com/apache/airflow/pull/5048), this test can be removed when the Helm chart
no longer supports Airflow 1.10.3"""
docs = render_chart(
values={},
show_only=[SCHEDULER_DEPLOYMENT_TEMPLATE],
)

scheduler_env_keys = jmespath.search("spec.template.spec.containers[0].env[*].name", docs[0])
assert "AIRFLOW__ELASTICSEARCH__ELASTICSEARCH_HOST" not in scheduler_env_keys

def test_env_should_add_elasticsearch_host_var_if_es_enabled_legacy(self):
"""AIRFLOW__ELASTICSEARCH__ELASTICSEARCH_HOST was the environment key prior to Airflow 1.10.4
(see https://github.com/apache/airflow/pull/5048), this test can be removed when the Helm chart
no longer supports Airflow 1.10.3"""
docs = render_chart(
values={
"elasticsearch": {
"enabled": True,
"secretName": "test-elastic-secret",
},
},
show_only=[SCHEDULER_DEPLOYMENT_TEMPLATE],
)

scheduler_env = jmespath.search("spec.template.spec.containers[0].env", docs[0])
assert {
"name": "AIRFLOW__ELASTICSEARCH__ELASTICSEARCH_HOST",
"valueFrom": {"secretKeyRef": {"name": "test-elastic-secret", "key": "connection"}},
} in scheduler_env

def test_airflow_cfg_should_set_remote_logging_false_if_es_disabled(self):
docs = render_chart(
values={},
Expand Down Expand Up @@ -189,37 +157,6 @@ def test_airflow_cfg_should_set_remote_logging_true_if_es_enabled(self):
logging_lines = LOGGING_CFG_REGEX.findall(airflow_cfg_text)[0].strip().splitlines()
assert "remote_logging = True" in logging_lines

def test_airflow_cfg_should_set_remote_logging_false_if_es_disabled_legacy(self):
"""core.remote_logging was the config location prior to Airflow 2.0.0, this test can be removed
when the Helm chart no longer supports Airflow 1.x"""
docs = render_chart(
values={},
show_only=[CONFIGMAP_TEMPLATE],
)

airflow_cfg_text = jmespath.search('data."airflow.cfg"', docs[0])

core_lines = CORE_CFG_REGEX.findall(airflow_cfg_text)[0].strip().splitlines()
assert "remote_logging = False" in core_lines

def test_airflow_cfg_should_set_remote_logging_true_if_es_enabled_legacy(self):
"""core.remote_logging was the config location prior to Airflow 2.0.0, this test can be removed
when the Helm chart no longer supports Airflow 1.x"""
docs = render_chart(
values={
"elasticsearch": {
"enabled": True,
"secretName": "test-elastic-secret",
},
},
show_only=[CONFIGMAP_TEMPLATE],
)

airflow_cfg_text = jmespath.search('data."airflow.cfg"', docs[0])

core_lines = CORE_CFG_REGEX.findall(airflow_cfg_text)[0].strip().splitlines()
assert "remote_logging = True" in core_lines


class TestOpenSearchConfig:
"""Tests opensearch configuration behaviors."""
Expand Down Expand Up @@ -326,9 +263,6 @@ def test_airflow_cfg_should_set_remote_logging_false_if_os_disabled(self):

airflow_cfg_text = jmespath.search('data."airflow.cfg"', docs[0])

core_lines = CORE_CFG_REGEX.findall(airflow_cfg_text)[0].strip().splitlines()
assert "remote_logging = False" in core_lines

logging_lines = LOGGING_CFG_REGEX.findall(airflow_cfg_text)[0].strip().splitlines()
assert "remote_logging = False" in logging_lines

Expand All @@ -345,9 +279,6 @@ def test_airflow_cfg_should_set_remote_logging_true_if_os_enabled(self):

airflow_cfg_text = jmespath.search('data."airflow.cfg"', docs[0])

core_lines = CORE_CFG_REGEX.findall(airflow_cfg_text)[0].strip().splitlines()
assert "remote_logging = True" in core_lines

logging_lines = LOGGING_CFG_REGEX.findall(airflow_cfg_text)[0].strip().splitlines()
assert "remote_logging = True" in logging_lines

Expand Down
Loading