xchwan commented on code in PR #75945:
URL: https://github.com/apache/airflow/pull/75945#discussion_r4705539857


##########
chart/templates/NOTES.txt:
##########
@@ -150,3 +150,21 @@ 
https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#api-secr
 {{- if ne .Values.executor (tpl .Values.config.core.executor $) }}
    {{ fail "Please configure the executor with `executor`, not 
`config.core.executor`." }}
 {{- end }}
+
+{{- $bundleClaims := dict }}
+{{- if .Values.dagProcessor.enabled }}
+{{- range .Values.dagProcessor.sets | default list }}

Review Comment:
   The warning is now built from the merged values of every Dag processor 
(`dagProcessor.bundleOverlaps`).
   It covers the default processor next to sets, sets that inherit the parent 
`bundleNames`, and sets
   without `bundleNames` (which parse every bundle), and it de-duplicates a 
bundle repeated in one set.
   Since `helm template` does not render NOTES.txt, the helper is tested 
through a copy of the chart.
   
   ---
   Drafted-by: Claude Code (Opus 5.5); reviewed by `xchwan` before posting
   



##########
chart/templates/dag-processor/dag-processor-deployment.yaml:
##########
@@ -32,10 +63,27 @@
 {{- $containerSecurityContextWaitForMigrations := include 
"containerSecurityContext" (list .Values.dagProcessor.waitForMigrations 
.Values) }}
 {{- $containerLifecycleHooks := or 
.Values.dagProcessor.containerLifecycleHooks .Values.containerLifecycleHooks }}
 {{- $containerLifecycleHooksLogGroomerSidecar := or 
.Values.dagProcessor.logGroomerSidecar.containerLifecycleHooks 
.Values.containerLifecycleHooks }}
+{{- $args := .Values.dagProcessor.args }}
+{{- $dagProcessorContext := . }}
+{{- with .Values.dagProcessor.bundleNames }}
+  {{- $definedBundles := list }}
+  {{- range $.Values.dagProcessor.dagBundleConfigList }}
+    {{- $definedBundles = append $definedBundles .name }}
+  {{- end }}
+  {{- $renderedArgs := tpl (toYaml $args) $dagProcessorContext }}
+  {{- range . }}
+    {{- if not (has . $definedBundles) }}
+      {{- fail (printf "Bundle %q is not defined in 
`dagProcessor.dagBundleConfigList`" .) }}
+    {{- end }}
+    {{- if not (regexMatch (printf 
"--bundle-name(=|\\s+(-\\s+)?)['\"]*%s['\"]*(\\s|$)" (regexQuoteMeta .)) 
$renderedArgs) }}

Review Comment:
   `-B` is accepted now (`-B x`, `-Bx`, `-B=x`), and the check looks at 
`command` together with
   `args`, so `command: [bash, -c, "exec airflow dag-processor -B x"]` with 
`args: ~` renders.
   
   ---
   Drafted-by: Claude Code (Opus 5.5); reviewed by `xchwan` before posting
   



##########
chart/values.yaml:
##########
@@ -2153,7 +2189,11 @@ dagProcessor:
   command: ~
 
   # Args to use when running Airflow dag processor (templated).
-  args: ["bash", "-c", "exec airflow dag-processor"]
+  # The default adds a `--bundle-name` flag for each item of `bundleNames`.
+  args:
+    - "bash"
+    - "-c"
+    - "exec airflow dag-processor{{ range .Values.dagProcessor.bundleNames }} 
--bundle-name {{ . | squote }}{{ end }}"

Review Comment:
   The default `args` now take the flags from a helper that quotes each name 
for a POSIX shell
   (`'` → `'\''`). On kind, a bundle named `it's_c` started and was parsed with
   `--bundle-name 'it'\''s_c'`. Outside the chart: core rejects such a name for 
some metric names
   (`InvalidStatsNameException` in the Dag processor log), but parsing and 
serialization still work.
   
   ---
   Drafted-by: Claude Code (Opus 5.5); reviewed by `xchwan` before posting
   



##########
chart/values.yaml:
##########
@@ -2143,6 +2143,42 @@ dagProcessor:
   #     classpath: "airflow.dag_processing.bundles.local.LocalDagBundle"
   #     kwargs: {}
 
+  # Enable the default dag processor defined by the root `dagProcessor` 
configuration to be created.
+  # If false, only the dedicated dag processors defined in 'sets' will be 
created.
+  # When not set, the default dag processor is created only if 'sets' is empty.
+  # Set it to true explicitly to run the default dag processor next to the 
sets. It parses ALL bundles
+  # unless `bundleNames` is set, so bundles selected by a set would then be 
parsed twice.
+  enableDefault: ~
+
+  # Names of the bundles from `dagBundleConfigList` this dag processor parses

Review Comment:
   Documented in `values.yaml`, the schema and the docs: a set inherits the 
parent `bundleNames` when
   it does not set them or sets an empty list. The new text now says "Dag 
processor".
   
   ---
   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]

Reply via email to