xchwan commented on code in PR #75945:
URL: https://github.com/apache/airflow/pull/75945#discussion_r4705538104
##########
chart/templates/dag-processor/dag-processor-poddisruptionbudget.yaml:
##########
@@ -40,5 +62,17 @@ spec:
tier: airflow
component: dag-processor
release: {{ .Release.Name }}
+ {{- if ne .Values.dagProcessor.name "default" }}
+ dag-processor-set: {{ .Values.dagProcessor.name }}
+ {{- end }}
+ {{- if and (eq .Values.dagProcessor.name "default") $setsWithPdb }}
+ matchExpressions:
Review Comment:
Done: when `sets` is not empty, the default PDB uses `dag-processor-set
DoesNotExist`. The
selector is unchanged without sets. On kind with `enableDefault: true` and
`set-b` opting out, the
default, `set-a` and `set-b` Pods all ran. The default PDB and `set-a`'s PDB
each reported
`expectedPods: 1`, and `set-b` had no PDB, so no PDB counts the `set-b` Pod.
---
Drafted-by: Claude Code (Opus 5.5); reviewed by `xchwan` before posting
##########
chart/templates/dag-processor/dag-processor-deployment.yaml:
##########
@@ -58,6 +106,9 @@ spec:
tier: airflow
component: dag-processor
release: {{ .Release.Name }}
+ {{- if ne .Values.dagProcessor.name "default" }}
+ dag-processor-set: {{ .Values.dagProcessor.name }}
Review Comment:
Quoted in the Deployment selector, the Pod labels and the PDB selector. A
set named `123` renders
`dag-processor-set: "123"`, and the Deployment was accepted and ran on kind.
---
Drafted-by: Claude Code (Opus 5.5); reviewed by `xchwan` before posting
##########
chart/templates/dag-processor/dag-processor-deployment.yaml:
##########
@@ -21,6 +21,37 @@
## Airflow Dag Processor Deployment
#################################
{{- if .Values.dagProcessor.enabled }}
+{{- $globals := deepCopy . -}}
+{{- $dagProcessorSets := .Values.dagProcessor.sets | default list -}}
+{{- $seenSetNames := dict -}}
+{{- range $dagProcessorSets -}}
+ {{- $setName := .name | default "" | toString -}}
+ {{- if eq $setName "default" -}}
+ {{- fail "`dagProcessor.sets` items cannot be named `default`; that name
is used by the default Dag processor" -}}
+ {{- end -}}
+ {{- if not (and (regexMatch "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" $setName) (le
(len $setName) 63)) -}}
+ {{- fail (printf "`dagProcessor.sets` item name %q is not a valid DNS-1123
label (lowercase alphanumerics and '-', starting and ending with an
alphanumeric, at most 63 characters)" $setName) -}}
+ {{- end -}}
+ {{- if hasKey $seenSetNames $setName -}}
+ {{- fail (printf "`dagProcessor.sets` contains the name %q more than once"
$setName) -}}
+ {{- end -}}
+ {{- $_ := set $seenSetNames $setName true -}}
+{{- end -}}
+{{- $enableDefault := .Values.dagProcessor.enableDefault -}}
+{{- if kindIs "invalid" $enableDefault -}}
+ {{- $enableDefault = not .Values.dagProcessor.sets -}}
Review Comment:
This now fails at render time: "`dagProcessor.enableDefault` is false and
`dagProcessor.sets` is
empty, so no Dag processor would run; …".
---
Drafted-by: Claude Code (Opus 5.5); reviewed by `xchwan` before posting
##########
chart/templates/dag-processor/dag-processor-deployment.yaml:
##########
@@ -58,6 +106,9 @@ spec:
tier: airflow
component: dag-processor
release: {{ .Release.Name }}
+ {{- if ne .Values.dagProcessor.name "default" }}
+ dag-processor-set: {{ .Values.dagProcessor.name }}
+ {{- end }}
{{- if .Values.dagProcessor.strategy }}
Review Comment:
A set's `strategy` now replaces the parent's as a whole, which is
documented. On kind, a set with
`strategy: {type: Recreate}` renders `{"type":"Recreate"}` and is accepted.
---
Drafted-by: Claude Code (Opus 5.5); reviewed by `xchwan` before posting
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]