Fix Helm chart executor label to support executor aliases#67762
Conversation
The scheduler Deployment/StatefulSet renders the executor option into a Kubernetes label and only sanitized the comma separator used between multiple executors. Executor aliases (name:ExecutorClass) contain a colon, which is not a valid label character, so a value such as CeleryExecutor,harvest_exec:KubernetesExecutor produced an invalid label and the scheduler failed to deploy. Replace the colon with a hyphen alongside the existing comma handling so aliased and multi-executor configurations render a valid label.
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Backport failed to create: chart/v1-2x-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 62d60e4 chart/v1-2x-testThis should apply the commit to the chart/v1-2x-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
|
Manual backport in #67775 |
…aliases (#67762) (#67775) * Fix Helm chart executor label to support executor aliases The scheduler Deployment/StatefulSet renders the executor option into a Kubernetes label and only sanitized the comma separator used between multiple executors. Executor aliases (name:ExecutorClass) contain a colon, which is not a valid label character, so a value such as CeleryExecutor,harvest_exec:KubernetesExecutor produced an invalid label and the scheduler failed to deploy. Replace the colon with a hyphen alongside the existing comma handling so aliased and multi-executor configurations render a valid label. * Add newsfragment for executor alias label fix * Remove newsfragment; not needed for a bugfix per AGENTS.md (cherry picked from commit 62d60e4) Co-authored-by: Anurag Pappula <127645370+Anuragp22@users.noreply.github.com>
What does this PR do?
The chart renders the
executoroption into a Kubernetesexecutorlabel on the schedulerDeployment/StatefulSet(chart/templates/scheduler/scheduler-deployment.yaml). The value was sanitized for the comma separating multiple executors, but not for the colon used in executor aliases (name:ExecutorClass).So
executor: CeleryExecutor,harvest_exec:KubernetesExecutorrendered the labelCeleryExecutor-harvest_exec:KubernetesExecutor, whose embedded:is an invalid label character and made the scheduler fail to deploy:Fix
Add
replace ":" "-"next to the existing comma handling so aliased and multi-executor values render a valid label. This is the only place the executor option is used as a label value; theAIRFLOW__CORE__EXECUTORenv var still receives the raw string.Tests
Added an aliased multi-executor case to
test_labels_are_valid. It reproduces the invalid label without the fix and passes with it; the fulltest_basic_helm_chart.pysuite passes (45) on Helm 3.19.0.closes: #67723
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines