uplsh580 opened a new issue, #60630:
URL: https://github.com/apache/airflow/issues/60630

   ### Description
   
   Currently, the `dag_bundle_config_list` configuration in the Airflow Helm 
chart requires users to provide a JSON string directly in the values file. This 
approach has several drawbacks:
   
   1. **Poor Readability**: Long JSON strings in YAML files are difficult to 
read and maintain, especially when configuring multiple DAG bundles.
   
   2. **Error-Prone**: Manual JSON string construction is prone to syntax 
errors (missing quotes, commas, brackets, etc.).
   
   3. **Limited IDE Support**: IDEs cannot provide proper syntax highlighting, 
validation, or autocomplete for JSON strings embedded in YAML.
   
   4. **Maintenance Burden**: Adding, removing, or modifying bundle 
configurations requires careful string manipulation.
   
   ### Current Approach
   
   ```yaml
   config:
     dag_processor:
       dag_bundle_config_list: '[{"name": "bundle1", "classpath": 
"airflow.providers.git.bundles.git.GitDagBundle", "kwargs": {"git_conn_id": 
"GITHUB__repo1", "subdir": "dags", "tracking_ref": "main", "refresh_interval": 
60}}, {"name": "bundle2", "classpath": 
"airflow.providers.git.bundles.git.GitDagBundle", "kwargs": {"git_conn_id": 
"GITHUB__repo2", "subdir": "dags", "tracking_ref": "develop", 
"refresh_interval": 120}}]'
   ```
   
   As you can see, this becomes unwieldy even with just two bundles, and it 
gets significantly worse with more configurations.
   
   ## Proposed Solution
   
   Allow users to define DAG bundle configurations in a structured YAML format, 
and use a Helm template helper function to automatically convert it to the 
required JSON string format.
   
   ### Proposed Structure
   ```yaml
   dag_bundles:
     - name: bundle1
       classpath: "airflow.providers.git.bundles.git.GitDagBundle"
       kwargs:
         git_conn_id: "GITHUB__repo1"
         subdir: "dags"
         tracking_ref: "main"
         refresh_interval: 60
     - name: bundle2
       classpath: "airflow.providers.git.bundles.git.GitDagBundle"
       kwargs:
         git_conn_id: "GITHUB__repo2"
         subdir: "dags"
         tracking_ref: "develop"
         refresh_interval: 120
     - name: localbundle
       classpath: "airflow.dag_processing.bundles.local.LocalDagBundle"
   
   config:
     dag_processor:
       dag_bundle_config_list: {{ .Values.dag_bundles }}
   ```
   
   ### Use case/motivation
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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