Anuragp22 opened a new pull request, #67762:
URL: https://github.com/apache/airflow/pull/67762

   ## What does this PR do?
   
   The Helm chart renders the `executor` pipeline option into a Kubernetes 
`executor`
   label on the scheduler `Deployment`/`StatefulSet`
   (`chart/templates/scheduler/scheduler-deployment.yaml`). The label value was
   sanitized only for the comma separator used between multiple executors, but 
not for
   the colon used in [executor 
aliases](https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/index.html#aliases)
   (`name:ExecutorClass`).
   
   As a result, a configuration such as:
   
   ```
   executor: CeleryExecutor,harvest_exec:KubernetesExecutor
   ```
   
   rendered the label `CeleryExecutor-harvest_exec:KubernetesExecutor`, which 
contains
   an illegal `:` and caused the scheduler to fail to deploy:
   
   ```
   metadata.labels: Invalid value: 
"CeleryExecutor-harvest_exec:KubernetesExecutor":
   a valid label must be an empty string or consist of alphanumeric characters,
   '-', '_' or '.', and must start and end with an alphanumeric character
   ```
   
   ## Fix
   
   Add a `replace ":" "-"` step alongside the existing comma handling, so 
aliased and
   multi-executor values render a valid label. The `AIRFLOW__CORE__EXECUTOR` 
env-var
   value is unaffected and still receives the raw string, which Airflow itself 
parses.
   This is the only place the executor option is used as a Kubernetes label 
value.
   
   ## Tests
   
   Extended `test_labels_are_valid` with an aliased multi-executor case
   (`CeleryExecutor,harvest_exec:KubernetesExecutor`). The test renders the 
chart with
   `helm template` and validates the resulting objects against the Kubernetes 
schemas,
   so it reproduces the invalid label without the fix and passes with it. The 
full
   `test_basic_helm_chart.py` suite passes (45 passed) on Helm 3.19.0.
   
   closes: #67723
   
   ## Gen-AI disclosure
   
   This PR was prepared with the assistance of a generative AI tool (Claude). 
All
   changes were reviewed, tested locally, and are understood by the author, who 
takes
   final responsibility for the contribution, in line with the project's Gen-AI
   assisted contribution guidelines.
   


-- 
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