Skip to content

Commit 0f52c40

Browse files
adwk67claude
andcommitted
refactor: shorten test role group names to fit 16-char limit
RoleGroupName has a max_length of 16 characters. Rename test role groups to fit within this limit: - resources-from-role (19) → from-role (9) - resources-from-role-group (25) → from-rg (7) - resources-from-pod-overrides (28) → from-overrides (14) - automatic-log-config (20) → auto-log-cfg (12) - custom-log-config (17) → custom-log-cfg (14) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8b97621 commit 0f52c40

7 files changed

Lines changed: 44 additions & 44 deletions

tests/templates/kuttl/logging/41-assert.yaml.j2

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ timeout: 1200
88
apiVersion: apps/v1
99
kind: StatefulSet
1010
metadata:
11-
name: airflow-webserver-automatic-log-config
11+
name: airflow-webserver-auto-log-cfg
1212
status:
1313
readyReplicas: 1
1414
replicas: 1
1515
---
1616
apiVersion: apps/v1
1717
kind: StatefulSet
1818
metadata:
19-
name: airflow-webserver-custom-log-config
19+
name: airflow-webserver-custom-log-cfg
2020
status:
2121
readyReplicas: 1
2222
replicas: 1
@@ -25,15 +25,15 @@ status:
2525
apiVersion: apps/v1
2626
kind: StatefulSet
2727
metadata:
28-
name: airflow-worker-automatic-log-config
28+
name: airflow-worker-auto-log-cfg
2929
status:
3030
readyReplicas: 1
3131
replicas: 1
3232
---
3333
apiVersion: apps/v1
3434
kind: StatefulSet
3535
metadata:
36-
name: airflow-worker-custom-log-config
36+
name: airflow-worker-custom-log-cfg
3737
status:
3838
readyReplicas: 1
3939
replicas: 1
@@ -42,15 +42,15 @@ status:
4242
apiVersion: apps/v1
4343
kind: StatefulSet
4444
metadata:
45-
name: airflow-scheduler-automatic-log-config
45+
name: airflow-scheduler-auto-log-cfg
4646
status:
4747
readyReplicas: 1
4848
replicas: 1
4949
---
5050
apiVersion: apps/v1
5151
kind: StatefulSet
5252
metadata:
53-
name: airflow-scheduler-custom-log-config
53+
name: airflow-scheduler-custom-log-cfg
5454
status:
5555
readyReplicas: 1
5656
replicas: 1

tests/templates/kuttl/logging/41-install-airflow-cluster.yaml.j2

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ spec:
121121
memory:
122122
limit: 3Gi
123123
roleGroups:
124-
automatic-log-config:
124+
auto-log-cfg:
125125
replicas: 1
126126
config:
127127
logging:
@@ -162,7 +162,7 @@ spec:
162162
- name: prepared-logs
163163
configMap:
164164
name: prepared-logs
165-
custom-log-config:
165+
custom-log-cfg:
166166
replicas: 1
167167
config:
168168
logging:
@@ -181,7 +181,7 @@ spec:
181181
memory:
182182
limit: 3Gi
183183
roleGroups:
184-
automatic-log-config:
184+
auto-log-cfg:
185185
replicas: 1
186186
config:
187187
logging:
@@ -215,7 +215,7 @@ spec:
215215
loggers:
216216
ROOT:
217217
level: INFO
218-
custom-log-config:
218+
custom-log-cfg:
219219
replicas: 1
220220
config:
221221
logging:
@@ -233,7 +233,7 @@ spec:
233233
max: 250m
234234
memory:
235235
limit: 512Mi
236-
# automatic-log-config
236+
# auto-log-cfg
237237
logging:
238238
enableVectorAgent: true
239239
containers:
@@ -261,7 +261,7 @@ spec:
261261
loggers:
262262
ROOT:
263263
level: INFO
264-
# custom-log-config is not tested for kubernetesExecutors because
264+
# custom-log-cfg is not tested for kubernetesExecutors because
265265
# there are no roleGroups to test both
266266
{% endif %}
267267
schedulers:
@@ -273,7 +273,7 @@ spec:
273273
memory:
274274
limit: 1Gi
275275
roleGroups:
276-
automatic-log-config:
276+
auto-log-cfg:
277277
replicas: 1
278278
config:
279279
logging:
@@ -303,7 +303,7 @@ spec:
303303
loggers:
304304
ROOT:
305305
level: INFO
306-
custom-log-config:
306+
custom-log-cfg:
307307
replicas: 1
308308
config:
309309
logging:

tests/templates/kuttl/logging/52-assert.yaml.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ timeout: 600
77
commands:
88
{% if test_scenario['values']['airflow'].find(",") > 0 %}
99
- script: |
10-
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/metrics.py --role-group automatic-log-config --airflow-version "{{ test_scenario['values']['airflow'].split(',')[0] }}"
11-
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/metrics.py --role-group custom-log-config --airflow-version "{{ test_scenario['values']['airflow'].split(',')[0] }}"
10+
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/metrics.py --role-group auto-log-cfg --airflow-version "{{ test_scenario['values']['airflow'].split(',')[0] }}"
11+
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/metrics.py --role-group custom-log-cfg --airflow-version "{{ test_scenario['values']['airflow'].split(',')[0] }}"
1212
{% else %}
1313
- script: |
14-
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/metrics.py --role-group automatic-log-config --airflow-version "{{ test_scenario['values']['airflow'] }}"
15-
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/metrics.py --role-group custom-log-config --airflow-version "{{ test_scenario['values']['airflow'] }}"
14+
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/metrics.py --role-group auto-log-cfg --airflow-version "{{ test_scenario['values']['airflow'] }}"
15+
kubectl exec -n $NAMESPACE test-airflow-python-0 -- python /tmp/metrics.py --role-group custom-log-cfg --airflow-version "{{ test_scenario['values']['airflow'] }}"
1616
{% endif %}

tests/templates/kuttl/logging/70-assert.yaml.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ commands:
1919
# has to be declared.
2020
# See https://github.com/apache/airflow/pull/52581.
2121

22-
# Rolegroup custom-log-config
22+
# Rolegroup custom-log-cfg
2323
CURL_RESPONSE_CUSTOM=$(
24-
kubectl -n $NAMESPACE exec airflow-webserver-custom-log-config-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-custom-log-config-headless:8793/log 2>/dev/null || true);echo "$CODE"'
24+
kubectl -n $NAMESPACE exec airflow-webserver-custom-log-cfg-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-custom-log-cfg-headless:8793/log 2>/dev/null || true);echo "$CODE"'
2525
)
2626

2727
# Log-Endpoint Test Assertions:
2828
echo "The HTTP Code is $CURL_RESPONSE_CUSTOM (an internal JWT token is needed for full access)"
2929

30-
# Rolegroup automatic-log-config
30+
# Rolegroup auto-log-cfg
3131
CURL_RESPONSE_AUTO=$(
32-
kubectl -n $NAMESPACE exec airflow-webserver-automatic-log-config-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-automatic-log-config-headless:8793/log 2>/dev/null || true);echo "$CODE"'
32+
kubectl -n $NAMESPACE exec airflow-webserver-auto-log-cfg-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-auto-log-cfg-headless:8793/log 2>/dev/null || true);echo "$CODE"'
3333
)
3434
echo "The HTTP Code is $CURL_RESPONSE_AUTO (an internal JWT token is needed for full access)"
3535
[ "$CURL_RESPONSE_CUSTOM" -eq 403 ] && [ "$CURL_RESPONSE_AUTO" -eq 403 ]

tests/templates/kuttl/logging/airflow-vector-aggregator-values.yaml.j2

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,98 +28,98 @@ customConfig:
2828
type: filter
2929
inputs: [validEvents]
3030
condition: >-
31-
.pod == "airflow-webserver-automatic-log-config-0" &&
31+
.pod == "airflow-webserver-auto-log-cfg-0" &&
3232
.container == "airflow"
3333
filteredAutomaticLogConfigWebserverGitSync:
3434
type: filter
3535
inputs: [validEvents]
3636
condition: >-
37-
.pod == "airflow-webserver-automatic-log-config-0" &&
37+
.pod == "airflow-webserver-auto-log-cfg-0" &&
3838
.container == "git-sync-0"
3939
filteredAutomaticLogConfigWebserverVector:
4040
type: filter
4141
inputs: [validEvents]
4242
condition: >-
43-
.pod == "airflow-webserver-automatic-log-config-0" &&
43+
.pod == "airflow-webserver-auto-log-cfg-0" &&
4444
.container == "vector"
4545
filteredCustomLogConfigWebserverAirflow:
4646
type: filter
4747
inputs: [validEvents]
4848
condition: >-
49-
.pod == "airflow-webserver-custom-log-config-0" &&
49+
.pod == "airflow-webserver-custom-log-cfg-0" &&
5050
.container == "airflow"
5151
filteredCustomLogConfigWebserverVector:
5252
type: filter
5353
inputs: [validEvents]
5454
condition: >-
55-
.pod == "airflow-webserver-custom-log-config-0" &&
55+
.pod == "airflow-webserver-custom-log-cfg-0" &&
5656
.container == "vector"
5757
filteredAutomaticLogConfigSchedulerAirflow:
5858
type: filter
5959
inputs: [validEvents]
6060
condition: >-
61-
.pod == "airflow-scheduler-automatic-log-config-0" &&
61+
.pod == "airflow-scheduler-auto-log-cfg-0" &&
6262
.container == "airflow"
6363
filteredAutomaticLogConfigSchedulerGitSync:
6464
type: filter
6565
inputs: [validEvents]
6666
condition: >-
67-
.pod == "airflow-scheduler-automatic-log-config-0" &&
67+
.pod == "airflow-scheduler-auto-log-cfg-0" &&
6868
.container == "git-sync-0"
6969
filteredAutomaticLogConfigSchedulerVector:
7070
type: filter
7171
inputs: [validEvents]
7272
condition: >-
73-
.pod == "airflow-scheduler-automatic-log-config-0" &&
73+
.pod == "airflow-scheduler-auto-log-cfg-0" &&
7474
.container == "vector"
7575
filteredCustomLogConfigSchedulerAirflow:
7676
type: filter
7777
inputs: [validEvents]
7878
condition: >-
79-
.pod == "airflow-scheduler-custom-log-config-0" &&
79+
.pod == "airflow-scheduler-custom-log-cfg-0" &&
8080
.container == "airflow"
8181
filteredCustomLogConfigSchedulerVector:
8282
type: filter
8383
inputs: [validEvents]
8484
condition: >-
85-
.pod == "airflow-scheduler-custom-log-config-0" &&
85+
.pod == "airflow-scheduler-custom-log-cfg-0" &&
8686
.container == "vector"
8787
{% if test_scenario['values']['executor'] == 'celery' %}
8888
filteredAutomaticLogConfigWorkerAirflow:
8989
type: filter
9090
inputs: [validEvents]
9191
condition: >-
92-
.pod == "airflow-worker-automatic-log-config-0" &&
92+
.pod == "airflow-worker-auto-log-cfg-0" &&
9393
.container == "airflow"
9494
filteredAutomaticLogConfigWorkerGitSync:
9595
type: filter
9696
inputs: [validEvents]
9797
condition: >-
98-
.pod == "airflow-worker-automatic-log-config-0" &&
98+
.pod == "airflow-worker-auto-log-cfg-0" &&
9999
.container == "git-sync-0"
100100
filteredAutomaticLogConfigWorkerGitSyncInit:
101101
type: filter
102102
inputs: [validEvents]
103103
condition: >-
104-
.pod == "airflow-worker-automatic-log-config-0" &&
104+
.pod == "airflow-worker-auto-log-cfg-0" &&
105105
.container == "git-sync-0-init"
106106
filteredAutomaticLogConfigWorkerVector:
107107
type: filter
108108
inputs: [validEvents]
109109
condition: >-
110-
.pod == "airflow-worker-automatic-log-config-0" &&
110+
.pod == "airflow-worker-auto-log-cfg-0" &&
111111
.container == "vector"
112112
filteredCustomLogConfigWorkerAirflow:
113113
type: filter
114114
inputs: [validEvents]
115115
condition: >-
116-
.pod == "airflow-worker-custom-log-config-0" &&
116+
.pod == "airflow-worker-custom-log-cfg-0" &&
117117
.container == "airflow"
118118
filteredCustomLogConfigWorkerVector:
119119
type: filter
120120
inputs: [validEvents]
121121
condition: >-
122-
.pod == "airflow-worker-custom-log-config-0" &&
122+
.pod == "airflow-worker-custom-log-cfg-0" &&
123123
.container == "vector"
124124
{% elif test_scenario['values']['executor'] == 'kubernetes' %}
125125
filteredExampleTriggerTargetDagBashTaskBase:

tests/templates/kuttl/resources/30-assert.yaml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ status:
1616
apiVersion: apps/v1
1717
kind: StatefulSet
1818
metadata:
19-
name: airflow-worker-resources-from-role
19+
name: airflow-worker-from-role
2020
spec:
2121
template:
2222
spec:
@@ -40,7 +40,7 @@ status:
4040
apiVersion: apps/v1
4141
kind: StatefulSet
4242
metadata:
43-
name: airflow-worker-resources-from-role-group
43+
name: airflow-worker-from-rg
4444
spec:
4545
template:
4646
spec:
@@ -64,7 +64,7 @@ status:
6464
apiVersion: apps/v1
6565
kind: StatefulSet
6666
metadata:
67-
name: airflow-worker-resources-from-pod-overrides
67+
name: airflow-worker-from-overrides
6868
spec:
6969
template:
7070
spec:

tests/templates/kuttl/resources/30-install-airflow-cluster.yaml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ spec:
8484
memory:
8585
limit: 3001Mi
8686
roleGroups:
87-
resources-from-role:
87+
from-role:
8888
replicas: 1
89-
resources-from-role-group:
89+
from-rg:
9090
config:
9191
resources:
9292
cpu:
@@ -95,7 +95,7 @@ spec:
9595
memory:
9696
limit: 3002Mi
9797
replicas: 1
98-
resources-from-pod-overrides:
98+
from-overrides:
9999
podOverrides:
100100
spec:
101101
containers:

0 commit comments

Comments
 (0)