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 custom Dag bundle types, such as GitDagBundle and LocalDagBundle, is only supported in Remote Execution mode. To run multiple Dag bundles on a Hosted Deployment, see Dag bundles.

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
  • The Airflow UI shows the code for a Dag version only if the Dag processor sends Dag source code to Astro
  • GitDagBundle allows rerunning tasks with their original code version
See Airflow Dag versioning for detailed information about versioning behavior.

Show Dag code in the Airflow UI

By default, the Dag processor doesn’t send your Dag source code to Astro, so the code stays in your environment. The Code tab in the Airflow UI shows a placeholder message instead of your code. On Astro Runtime 3.4 (Airflow 3.4) and later, you can configure the Dag processor to send the source code of your Dag files to Astro. The Code tab then shows your Dag code.
When you turn on this setting, your Dag source code leaves your environment. Astro stores the code in the Deployment’s metadata database in the orchestration plane. Users with permission to view Dag code can see it in the Airflow UI and retrieve it with the Airflow REST API.
To show Dag code in the Airflow UI, you need:
  • An Astro Deployment on Astro Runtime 3.4 or later.
  • A Dag processor that runs Remote Execution Agent 1.9.0 or later, with an agent image based on Astro Runtime 3.4 or later.
If either the Deployment or the Dag processor image runs an Astro Runtime version earlier than 3.4, the Code tab shows the placeholder even when you turn on this setting.
1

Send Dag source code to Astro

Set dagProcessor.sendDagSourceCode to true in values.yaml:
values.yaml
The Helm chart sets the ASTRO_AGENT_CLIENT_DAG_PROCESSOR__SEND_DAG_SOURCE_CODE environment variable on the Dag processor. If the Dag processor image tag shows a Remote Execution Agent version earlier than 1.9.0, the Helm install or upgrade fails.
2

Update Helm release

Apply the configuration:
This setting only changes what the Code tab shows. Dag parsing, Dag hashing, and Dag versioning work the same way whether or not the Dag processor sends Dag source code.

Next steps

After configuring Dag sources: