Skip to main content
Remote Execution Agents require configuration to access your DAG code. This guide covers configuring DAG bundles, which are collections of DAG files and supporting code introduced in Airflow 3.
This feature requires Airflow 3.x Deployments. Configuring multiple DAG bundles in a single Deployment is only supported in Remote Execution mode.

DAG bundle types

Choose between two types of DAG bundles:
  • GitDagBundle: Dags stored in a Git repository (recommended for production)
  • LocalDagBundle: Dags stored in the container image or persistent volume (default)

When to use each bundle type

Use GitDagBundle when:
  • Running production deployments
  • Tracking DAG versions with full rerun capabilities
  • Storing dags in version control systems
  • Managing multiple teams or DAG repositories
Use LocalDagBundle when:
  • Running development or testing environments
  • Building dags into container images
  • Using existing PVC-based DAG management
  • Preferring simpler configuration
See GitDagBundle compared to LocalDagBundle for functional differences.

Dag hashing

The Dag processor computes a hash of each Dag and caches it. On each processing cycle, the Dag processor compares the current hash of a Dag against the cached value:
  • If the hash matches, the Dag is unchanged, so the Dag processor skips it instead of re-sending it to the Astro orchestration plane.
  • If the Dag is new, changed, or not yet in the cache, the Dag processor processes it and updates the cache.
Because the Dag processor skips unchanged Dags, Dag hashing lowers memory utilization and network bandwidth, and speeds up Dag updates in Deployments with many Dags. To monitor cache behavior, use the dag_processor_cache_hits_total, dag_processor_cache_misses_total, and dag_processor_cache_size metrics. See Dag processor metrics.
Dag hashing functionality is enabled by default, starting on Astro Agent client release 1.8.0 and later. You can disable that feature at any time with the following environment variable: ASTRO_AGENT_CLIENT_DAG_PROCESSOR__ENABLE_DAG_CACHING=False.

Configure GitDagBundle

GitDagBundle fetches dags from Git repositories and provides automatic versioning capabilities.
GitDagBundle is recommended for production Remote Execution deployments.

Supported authentication methods

GitDagBundle supports the following authentication methods:
  • Access tokens (personal access tokens, OAuth tokens)
  • SSH keys
  • SSH agent
Choose the method that aligns with your security requirements and infrastructure.

Required token permissions by provider

When you create an access token, grant the minimum permissions required to read repository contents:

Configure public repository

For public repositories, no authentication configuration is required. Configure only the repository URL and tracking reference:
values.yaml

Configure private repository

For private repositories, configure both the DAG bundle and an Airflow connection for authentication.
1

Create Git connection

Add an Airflow connection environment variable in values.yaml. The connection name suffix must match the git_conn_id value in your DAG bundle configuration.
Use this method with a Personal Access Token (PAT) or OAuth token. Set login to your Git username and password to the token value.
values.yaml
See Required token permissions by provider for the minimum permissions each provider requires.
The connection name AIRFLOW_CONN_GIT_REPO creates a connection with ID git_repo. This ID must match the git_conn_id value in your DAG bundle configuration.
For production environments, store connection credentials in a secrets backend instead of values.yaml. See Use a secrets backend for Git credentials for an example using Azure Key Vault.
2

Configure DAG bundle

Configure the DAG bundle with matching git_conn_id:
values.yaml
Note that git_conn_id: "git_repo" matches the connection ID from the AIRFLOW_CONN_GIT_REPO environment variable.
3

Update Helm release

Apply the configuration:

Configure refresh interval

Control how frequently agents check for repository updates using the refresh_interval parameter:
values.yaml
The default refresh interval is 300 seconds. Reducing this value across many bundles may increase the risk of hitting Git provider rate limits.

Use a secrets backend for Git credentials

For production environments, use a secrets backend to store Git connection credentials instead of hardcoding them in values.yaml. The following example shows how to configure Azure Key Vault with workload identity authentication on Azure AKS.
1

Configure Azure Key Vault as secrets backend

Add the secrets backend configuration to your values.yaml:
values.yaml
This configuration uses Azure workload identity for authentication, which is the recommended approach for Azure AKS environments. For other authentication methods, see Azure Key Vault secrets backend.
2

Store Git connections in Azure Key Vault

Create secrets in Azure Key Vault for each Git connection. The secret name must follow the pattern <connections_prefix>-<connection-id>. For example, to create a connection with ID git-repo1-conn:
  1. In Azure Key Vault, create a secret named airflow-connection-git-repo1-conn.
  2. Set the secret value to a JSON connection string:
Repeat this process for each Git repository connection you need.
3

Configure DAG bundles with connection references

Configure your DAG bundles to reference the connections stored in Azure Key Vault:
values.yaml
The git_conn_id values must match the connection IDs you created in Azure Key Vault (without the airflow-connection- prefix).
4

Update Helm release

Apply the configuration:

Configure LocalDagBundle

LocalDagBundle reads dags from the local filesystem. This is the default dag bundle type.

DAG storage options

Choose one of two methods to provide dags to agents: Option 1: Include dags in container image Build a custom agent image that includes your DAG files. Copy dags into the /dags folder during image build. Option 2: Mount Persistent Volume Claim Create a PVC containing your dags and mount it into all agent components (Dag Processor, Worker, and Triggerer) at the same path.

Configure DAG path

LocalDagBundle looks for dags in /dags by default. Specify a different path using the path parameter:
values.yaml

Configure with container image

1

Build custom image

Create a Dockerfile extending the base agent image:
Dockerfile
2

Update values file

Reference your custom image in values.yaml:
values.yaml
3

Update Helm release

Apply the configuration:

Configure with Persistent Volume Claim

1

Create PVC

Create a PersistentVolumeClaim in your Kubernetes namespace:
pvc.yaml
Apply the PVC:
2

Configure volume mounts

Update values.yaml to mount the PVC into all components:
values.yaml
3

Update Helm release

Apply the configuration:

GitDagBundle compared to LocalDagBundle

Both bundle types support DAG versioning in the Airflow UI, but GitDagBundle provides additional capabilities:

DAG versioning

Airflow 3 automatically tracks DAG versions when you use DAG bundles. Each DAG run associates with a specific DAG version visible in the Airflow UI. Key behaviors:
  • New versions are created for structural changes (tasks, dependencies, schedules)
  • The scheduler uses the latest DAG version to create new runs
  • You can view code for any previous DAG version in the UI
  • GitDagBundle allows rerunning tasks with their original code version
See Airflow DAG versioning for detailed information about versioning behavior.

Next steps

After configuring DAG sources: