VSCode Remote Container

Hello :slight_smile:
is there a way to work with the Visual Studio code extension “Remote - Containers” with an astronomer deployment (local development)?
I have come so far that my VSCode is connected to the container. But if I change a file now, I can’t save it, because the file system is read-only.
It would be fantastic if it works, because then I can use features like codec completion and so on.

Many greetings from Germany
Johnnes

1 Like

I use Pycharm and at the moment I don’t know of a way to have the IDE automatically connect to the containers spun up by astro airflow start. However, if you have airlfow installed on your local machine, you can still get code completion in your IDE while writing dags, hooks and operators. Additionally you can run airflow test dag_id task_id execution_date to run a specific task in a dag and drop break points in it to step through code. This is how i usually debug custom operators i’m building.

@Jonnyblacklabel I also wish to develop using devcontainers. As I understand it, the astro cli tool is expecting development of files in a local filsystem, and is then pushing changes into the container running airflow webserver. Therefore it will be necessary (I think) to develop in another container, and let the astro cli push changes as normal. So what is required is a devcontainer.json defining the development container, which will be based on the astronomerinc/ap-airflow:latest-onbuild image. Will post my progress here

1 Like