The Astro IDE enables you to quickly test, validate, and iterate on Airflow dags without needing a local Airflow or Docker environment. Use ephemeral test Deployments to see how your code runs in a real environment, adjust Deployment settings, and troubleshoot using built-in interfaces.
Ephemeral test Deployments offer a temporary environment to run and validate your Airflow dag changes before merging or deploying to production.
Using ephemeral Deployments in the Astro IDE consumes some of your Workspace AI credits. See the Preview FAQs for more details.
Ephemeral test Deployments in the Astro IDE inherit default settings from your Workspace-level Astro IDE test Deployment configuration. You can adjust session-specific settings per Deployment, such as environment variables and connections, as needed within the IDE. To make connections, Airflow variables, or environment variables available to a project’s ephemeral test Deployments, link them to the Astro IDE project from the Workspace Environment Manager. See Make connections, Airflow variables, and environment variables available.
You can control default resource behavior for ephemeral test Deployments in your Workspace under Workspace Settings > General > Astro IDE:
These workspace-level settings apply to all ephemeral test Deployments in the Astro IDE and you can tailor them to your Organization’s needs.
Ephemeral test Deployments have some preset configurations optimized for testing. For example, AIRFLOW__SCHEDULER__USE_JOB_SCHEDULE=false disables automatic task scheduling, so tasks run only when manually triggered in the Test tab. This is by design for better test control.
Ephemeral test Deployments need access to the same connections, Airflow variables, and environment variables your Dags use against external systems, databases, and cloud services. Linking these objects to your Astro IDE project from the Workspace Environment Manager lets you validate code, integrations, and data dependencies in a realistic environment without sharing those values with your production Deployments.
Astronomer recommends linking environment objects to the specific Astro IDE project that needs them. Project-linked objects only affect that project’s ephemeral test Deployments. See:
If you want a value to be available to every Astro IDE project in the Workspace, configure project sharing on the object so that it auto-links to all projects. See Configure project sharing for a Workspace.
If you already define connections or Airflow variables in a Deployment’s Airflow metadata database, you can move them into the Environment Manager and then link them to your Astro IDE projects. See Migrate existing objects to the Environment Manager.
.env file for ephemeral test DeploymentsWhen you start an ephemeral test Deployment, the Astro IDE automatically imports environment variables from a .env file in your project root. This lets you configure environment variables for testing without adding them through the Environment Manager.
.env file formatAdd a .env file to your project root with one variable per line:
System environment variables always take precedence. If a variable in your .env file has the same name as a system variable, such as an Airflow or scheduler setting, the system variable overrides the .env value.
The Deployment does not store variables from your .env file as secrets. Use the Environment Manager for sensitive credentials.
If the .env file is missing or invalid, the Deployment starts normally without importing variables.
While testing, open the Airflow UI for your ephemeral Deployment to inspect dags, tasks, and metadata using Airflow-native tools.