LabsThis feature is in Labs.
astro dev commands, so a project you start in the view is the same one that astro dev ps reports in a terminal, and the other way around.
Prerequisites
- Astro for VS Code. See Get started with Astro for VS Code.
- An Astro project open in your window. An Astro project is a folder that contains
.astro/config.yaml. To create one, runastro dev init. - For Docker mode, a running container runtime, such as Docker Desktop.
Read a project’s status
Each project row shows the project name and its state:- running on
<port>, with Docker mode when it runs in Docker - stopped
- starting… or stopping… while a command runs
Start Airflow
Hover over a stopped project and click one of the following options, or right-click the project:- Start Local Airflow (Standalone) (play icon): Runs
astro dev start --standalone. Airflow runs as local processes, without containers. - Start Local Airflow (Docker) (whale icon): Runs
astro dev start --docker.
astro dev start.
Stop or kill Airflow
To stop a running project, hover over it and click the stop icon, or right-click it and choose Stop Local Airflow. Stopping keeps the project’s local metadata database and logs, so the next start continues where the project left off. To remove the local environment, right-click the project and choose Kill Local Airflow and Delete Its Data, then confirm. Both actions use the mode the project runs in, or the mode you last started it in. Seeastro dev stop and astro dev kill.
Open the Airflow UI
Hover over a running project and click the Airflow icon, or right-click it and choose Open Local Airflow UI.See import errors and failed runs
Expand a running project to see the following groups:- Import errors (N): Dag files that Airflow can’t import. Click one to open the file at the line that failed.
- Failed runs (N) · last 1d: Dag runs that failed in the last 24 hours. Click one to open its task logs in an editor tab.
Read component logs
Expand Logs (N) under a project and click a row to open that log in a read-only editor tab.- Standalone mode
- Docker mode
- All components: The full standalone log. Each line shows the component that wrote it.
- One row for each component, such as scheduler, api-server, triggerer, and dag-processor.
- Dag parsing: The Dag processor’s log for each Dag file.
.astro/standalone/ folder. A long log opens at its most recent part.Use the project’s Python environment
When you start a project in standalone mode, the Astro CLI creates a virtual environment in the project’s.venv folder and installs Airflow in it. To resolve imports such as from airflow.sdk import … in your editor, right-click the project and choose Use This Project’s Airflow Environment for Python.
This command sets the Python interpreter for the project folder with Microsoft’s Python extension. If the Python extension isn’t installed, or the project doesn’t have a .venv folder yet, the extension tells you what to do.
Upgrade to Airflow 3
A project on Airflow 2 shows its Airflow version and when its support ends. To start an upgrade with Otto, expand the project and click Upgrade to Airflow 3.x.y, or right-click the project and choose Upgrade to Airflow 3 with Otto. For a local project, the extension also tells Otto whether the project’s Python version must change for the new Astro Runtime image, and whether the project is running and in which mode. Otto also checksrequirements.txt for outdated providers. Otto verifies the upgrade by restarting the project in the same mode.
After the project’s Dockerfile names an Airflow 3 image, the row no longer offers the upgrade. For more about upgrades, see Upgrade to Airflow 3.