Skip to content

Chart: Implement deployPerBundle feature for DAG processor deployments - #61039

Closed
uplsh580 wants to merge 3 commits into
apache:mainfrom
uplsh580:chart/deployPerBundle
Closed

uplsh580 wants to merge 3 commits into
apache:mainfrom
uplsh580:chart/deployPerBundle

Conversation

@uplsh580

@uplsh580 uplsh580 commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor

Related Issue

Issue: #61037

Description

This PR implements per-bundle DAG Processor deployments feature, allowing users to create separate Kubernetes deployments for each DAG bundle defined in dagBundleConfigList. This enables independent resource isolation, scaling, and configuration per bundle.

Motivation

Currently, when multiple DAG bundles are configured, all bundles are processed by a single DAG processor deployment. This limits the ability to:

  • Scale bundles independently based on their workload
  • Apply bundle-specific resource configurations
  • Isolate bundle processing failures
  • Use bundle-specific node selectors, affinities, or tolerations

Changes

Configuration (values.yaml)

Added new dagProcessor.deployPerBundle section:

dagProcessor:
  deployPerBundle:
    enabled: false  # Enable per-bundle deployments
    args: ["bash", "-c", "exec airflow dag-processor --bundle-name {{ bundleName }}"]
    bundleOverrides: {}  # Per-bundle configuration overrides

Features

  1. Per-bundle Deployments: When deployPerBundle.enabled is true, creates a separate Deployment for each bundle in dagBundleConfigList
  2. Bundle-specific Args: Supports templated args with {{ bundleName }} placeholder that gets replaced with actual bundle name
  3. Bundle Overrides: Allows per-bundle configuration overrides via bundleOverrides map:
    • Resources (CPU, memory)
    • Replicas
    • Node selectors, affinities, tolerations
    • Environment variables
    • Pod disruption budgets
    • And other deployment settings
  4. Per-bundle PodDisruptionBudget: Creates separate PDBs for each bundle when enabled
  5. Backward Compatibility: When deployPerBundle.enabled is false, maintains existing single deployment behavior

Implementation Details

  • Refactored deployment logic into a reusable helper template dag-processor.deployment
  • Refactored PDB logic into a reusable helper template dag-processor.poddisruptionbudget
  • Supports per-bundle enable/disable via bundleOverrides[bundleName].enabled

Files Changed

  • chart/templates/dag-processor/dag-processor-deployment.yaml: Added per-bundle deployment logic
  • chart/templates/dag-processor/dag-processor-poddisruptionbudget.yaml: Added per-bundle PDB logic
  • chart/values.yaml: Added deployPerBundle configuration section
  • chart/values.schema.json: Added schema validation for deployPerBundle
  • helm-tests/tests/helm_tests/airflow_core/test_dag_processor_per_bundle.py: Added comprehensive test cases

Usage Example

dagProcessor:
  enabled: true

  dagBundleConfigList:
    - name: bundle1
      classpath: "airflow.providers.git.bundles.git.GitDagBundle"
      kwargs:
        git_conn_id: "GITHUB__SAMPLE"
        subdir: "dags"
        tracking_ref: "main"
        refresh_interval: 60
    - name: bundle2
      classpath: "airflow.providers.git.bundles.git.GitDagBundle"
      kwargs:
        git_conn_id: "GITHUB__SAMPLE2"
        subdir: "dags"
        tracking_ref: "main"
        refresh_interval: 60

  deployPerBundle:
    enabled: true
    bundleOverrides:
      bundle1:
        replicas: 3
        resources:
          requests:
            memory: "2Gi"
            cpu: "1000m"
          limits:
            memory: "4Gi"
            cpu: "2000m"
        podDisruptionBudget:
          config:
            minAvailable: 2
            maxUnavailable: ~
      bundle2:
        replicas: 1
        resources:
          requests:
            memory: "1Gi"
            cpu: "500m"
        podDisruptionBudget:
          config:
            minAvailable: 1
            maxUnavailable: ~

This will create:

  • {release-name}-dag-processor-bundle1 deployment with 3 replicas and production resources
  • {release-name}-dag-processor-bundle2 deployment with 1 replica and standard resources
  • Separate PodDisruptionBudgets for each bundle (if enabled)

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
  • cursor

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg Bot added the area:helm-chart Airflow Helm Chart label Jan 25, 2026
@uplsh580

uplsh580 commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Validation - deployPerBundle

image

bundle1

image

bundle2

image

poddisruptionbudgets

image

@uplsh580

uplsh580 commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Validation - ASIS (Single Deployments)

image

dag processor log

image

poddisruptionbudgets

image

@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch 3 times, most recently from 2531585 to 1241a7a Compare January 25, 2026 16:32
@uplsh580
uplsh580 marked this pull request as ready for review January 26, 2026 00:14
@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch from 9930581 to 1241a7a Compare January 26, 2026 00:14
@jscheffl jscheffl added this to the Airflow Helm Chart 1.20.0 milestone Jan 26, 2026
@choo121600

Copy link
Copy Markdown
Member

Great work!
It looks like there’s a merge conflict. Could you please take a look?

@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch from 1241a7a to 8f898af Compare February 27, 2026 12:23
@uplsh580
uplsh580 requested a review from bugraoz93 as a code owner February 27, 2026 12:23
@uplsh580
uplsh580 marked this pull request as draft February 27, 2026 12:40
@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch from 8f898af to 5195d85 Compare February 27, 2026 12:43
@uplsh580
uplsh580 marked this pull request as ready for review February 27, 2026 12:43
@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch 2 times, most recently from 372cbf5 to 59b62a1 Compare February 27, 2026 18:57

@jscheffl jscheffl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the feature very much - mainly that different dag processors can be spawned - but am not sure if I really like the parallel structure of parameters for the deployment. I feel like it would be better in the bundle definition directly. But would like to have other opinions as well.

As we are currently discussing a structural change to a version 2.0 of the helm chart it might be we are hesitant to add this short term as a feature as if we in general re-structure (potentially) then it might be also very good suited in a 2.0 version.

Comment thread chart/values.yaml Resolved
Comment thread chart/values.yaml Resolved
@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch 2 times, most recently from 04172b7 to 9e6ca24 Compare March 2, 2026 23:36
@uplsh580

uplsh580 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor Author

As we are currently discussing a structural change to a version 2.0 of the helm chart it might be we are hesitant to add this short term as a feature as if we in general re-structure (potentially) then it might be also very good suited in a 2.0 version.

That’s a fair point. While I’d personally love to see this feature implemented, I agree that structural consistency in version 2.0 is just as important. I’m happy to go with whatever the maintainers feel is best for the long-term roadmap, whether it's added now or as part of the 2.0 restructuring.

@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch from 9e6ca24 to 7670886 Compare March 2, 2026 23:42
@uplsh580

uplsh580 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor Author

@jscheffl
I’ve updated the code based on your comments. I’d appreciate any further feedback.

@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch from 7670886 to e5136d4 Compare March 3, 2026 00:51
@jscheffl jscheffl removed this from the Airflow Helm Chart 1.20.0 milestone Mar 15, 2026
@jscheffl jscheffl added this to the Airflow Helm Chart 2.0.0 milestone Mar 15, 2026
@potiuk

potiuk commented Apr 2, 2026 •

Copy link
Copy Markdown
Member

@uplsh580 A few things need addressing before review — see our Pull Request quality criteria.

  • ❌ Merge conflicts: This PR has merge conflicts with the main branch. Your branch is 957 commits behind main. Please rebase your branch (git fetch origin && git rebase origin/main), resolve the conflicts, and push again. See contributing quick start.
  • ⚠️ Unresolved review comments: This PR has 2 unresolved review threads from maintainers: @jscheffl (MEMBER): 2 unresolved threads. Please review and resolve all inline review comments before requesting another review. You can resolve a conversation by clicking 'Resolve conversation' on each thread after addressing the feedback. See pull request guidelines.

Note: Your branch is 957 commits behind main. Please rebase and push again to get up-to-date CI results.

No rush.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch from 381d9b8 to b98a77c Compare April 19, 2026 07:29
@uplsh580
uplsh580 force-pushed the chart/deployPerBundle branch from b98a77c to 09870fe Compare April 19, 2026 08:38
@potiuk

potiuk commented Apr 22, 2026

Copy link
Copy Markdown
Member

@jscheffl — Could you please check whether your review feedback on this PR has been addressed? @uplsh580 appears to have responded to your comments. @uplsh580, do you believe the reviewer's concerns have been resolved?

If the concerns are resolved, please resolve the conversation threads. Thank you!

@potiuk
potiuk marked this pull request as draft April 22, 2026 19:55
@potiuk

potiuk commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

@uplsh580 This PR was triaged on 2026-04-02 and has had no reply since. Converting to draft — this PR doesn't yet meet our Pull Request quality criteria.

  • ❌ Unresolved review comments (1 thread from a maintainer): please walk through each unresolved review thread. Even if a suggestion looks incorrect or irrelevant — and some of them will be, especially any comments left by automated reviewers like GitHub Copilot — it is still the author's responsibility to respond: apply the fix, reply in-thread with a brief explanation of why the suggestion does not apply, or resolve the thread if the feedback is no longer relevant. Leaving threads unaddressed for weeks blocks the PR from moving forward.

See the linked criteria for how to fix each item, then mark the PR "Ready for review". This is not a rejection — just an invitation to bring the PR up to standard. No rush.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@potiuk

potiuk commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

Quick follow-up to the triage comment above — one clarification on the "Unresolved review comments" item:

Once you believe a thread has been addressed — whether by pushing a fix, or by replying in-thread with an explanation of why the suggestion doesn't apply — please mark the thread as resolved yourself by clicking the "Resolve conversation" button at the bottom of each thread. Reviewers don't auto-close their own threads, so an addressed-but-unresolved thread reads as "still waiting on the author" and keeps the PR from moving forward. The author doing the resolve-click is the expected convention on this project.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@potiuk

potiuk commented May 6, 2026

Copy link
Copy Markdown
Member

@uplsh580 This draft PR has been inactive for 13 days since the last triage comment and no response from the author. Closing to keep the queue clean.

You are welcome to reopen this PR when you resume work, or to open a new one addressing the issues previously raised. There is no rush — take your time.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@potiuk potiuk closed this May 6, 2026
@Miretpl

Miretpl commented May 6, 2026

Copy link
Copy Markdown
Contributor

@potiuk, not sure if that one should be closed as it was basically waiting for feedback and direction on which chart will be heading. Maybe we should add a label for PRs which should be skipped during the triage automated process 🤔

@potiuk

potiuk commented May 18, 2026

Copy link
Copy Markdown
Member

@uplsh580 This draft PR has been inactive for 25 days since the last triage comment and no response from the author. Closing to keep the queue clean.

You are welcome to reopen this PR when you resume work, or to open a new one addressing the issues previously raised. There is no rush — take your time.

Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@potiuk potiuk closed this May 18, 2026
@Miretpl

Miretpl commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

@potiuk I think #61039 (comment) is still valid. Closing it again and again, IMO, just introduces noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants