Skip to content

Commit 63804fd

Browse files
xeniapesbernauer
andauthored
chore!: Rename EXPERIMENTAL_FILE_HEADER / EXPERIMENTAL_FILE_FOOTER in webserver_config.py (#777)
* chore: Rename / in * adjust changelog entry * Update CHANGELOG.md Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de> --------- Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
1 parent 8dacb4c commit 63804fd

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Document Helm deployed RBAC permissions and remove unnecessary permissions ([#767], [#774]).
1313
- BREAKING: `configOverrides` now only accepts the known config file `webserver_config.py`. Previously, arbitrary file names were silently accepted and ignored ([#775]).
1414
- Bump `stackable-operator` to 0.110.1, kube to 3.1.0, and snafu to 0.9 ([#775]).
15+
- BREAKING: Rename `EXPERIMENTAL_FILE_HEADER` and `EXPERIMENTAL_FILE_FOOTER` in `webserver_config.py` for arbitrary python code to `FILE_HEADER` and `FILE_FOOTER` ([#775], [#777]).
1516

1617
### Fixed
1718

@@ -23,6 +24,7 @@
2324
[#770]: https://github.com/stackabletech/airflow-operator/pull/770
2425
[#774]: https://github.com/stackabletech/airflow-operator/pull/774
2526
[#775]: https://github.com/stackabletech/airflow-operator/pull/775
27+
[#777]: https://github.com/stackabletech/airflow-operator/pull/777
2628

2729
## [26.3.0] - 2026-03-16
2830

docs/modules/airflow/pages/usage-guide/overrides.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Not all roles use each setting, but some things -- such as external endpoints --
1414
Airflow exposes an environment variable for every Airflow configuration setting, a list of which can be found in the {airflow-config-docs}[Configuration Reference].
1515

1616
As Airflow can be configured with python code too, arbitrary code can be added to the `webserver_config.py`.
17-
You can use either `EXPERIMENTAL_FILE_HEADER` to add code to the top or `EXPERIMENTAL_FILE_FOOTER` to add to the bottom.
17+
You can use either `FILE_HEADER` to add code to the top or `FILE_FOOTER` to add to the bottom.
1818

1919
IMPORTANT: This is an experimental feature.
2020

@@ -24,9 +24,9 @@ webservers:
2424
configOverrides:
2525
webserver_config.py:
2626
CSV_EXPORT: "{'encoding': 'utf-8'}"
27-
EXPERIMENTAL_FILE_HEADER: |
27+
FILE_HEADER: |
2828
from modules.my_module import my_class
29-
EXPERIMENTAL_FILE_FOOTER: |
29+
FILE_FOOTER: |
3030
import logging
3131
from airflow.security import AirflowSecurityManager
3232

tests/templates/kuttl/smoke/40-install-airflow-cluster.yaml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ spec:
4848
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
4949
configOverrides:
5050
webserver_config.py:
51-
EXPERIMENTAL_FILE_HEADER: |
51+
FILE_HEADER: |
5252
COMMON_HEADER_VAR = "role-value"
5353
ROLE_HEADER_VAR = "role-value"
54-
EXPERIMENTAL_FILE_FOOTER: |
54+
FILE_FOOTER: |
5555
ROLE_FOOTER_VAR = "role-value"
5656
roleGroups:
5757
default:
5858
replicas: 1
5959
configOverrides:
6060
webserver_config.py:
61-
EXPERIMENTAL_FILE_HEADER: |
61+
FILE_HEADER: |
6262
COMMON_HEADER_VAR = "group-value"
6363
{% if test_scenario['values']['executor'] == 'celery' %}
6464
celeryExecutors:

tests/templates/kuttl/smoke/41-assert.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
apiVersion: kuttl.dev/v1beta1
33
kind: TestAssert
4-
timeout: 600
4+
timeout: 300
55
commands:
66
#
77
# Test envOverrides
@@ -16,6 +16,6 @@ commands:
1616
)
1717
1818
# Config Test Assertions
19-
echo "$AIRFLOW_CONFIG" | grep 'COMMON_HEADER_VAR = "group-value"'
20-
echo "$AIRFLOW_CONFIG" | grep 'ROLE_FOOTER_VAR = "role-value"'
21-
echo "$AIRFLOW_CONFIG" | grep -v 'ROLE_HEADER_VAR = "role-value"'
19+
echo "$AIRFLOW_CONFIG" | grep '^COMMON_HEADER_VAR = "group-value"'
20+
echo "$AIRFLOW_CONFIG" | grep '^ROLE_FOOTER_VAR = "role-value"'
21+
echo "$AIRFLOW_CONFIG" | grep -v '^ROLE_HEADER_VAR = "role-value"'

0 commit comments

Comments
 (0)