After I run astro airflow start, any changes I make to my-python-library are not reflected live, but rather requires me to restart everything for them to be updated. How can I make changes to the codebase update live?
So, once you’ve initialized a project via the Astronomer CLI, you’ll effectively have to run astro airflow start to start up a local instance of Airflow on your machine.
To make changes once you have Airflow up and running:
If you’re making changes to any of the following, you have to run astro airflow stop and then astro airflow start to re-build your image:
Dockerfile (FROM statement, Env Vars if needed)
packages.txt (OS-level packages)
requirements.txt (Python Packages)
If you make changes to your CODE (dags, include, plugins), you can:
This gives some clarification, but my case does not really fall into either of these categories. The code I want to be able to “update live” rather lives in a directory/package outside of the dags directory. This code is then imported by the dags.
But perhaps that directory structured is discouraged?
What’s in your my-python-library folder? I’d recommend you throw any python packages in requirements.txt, create a sub-folder within your dags directory if you want, throw plugins into plugins and anything else you want to call from Airflow into include.
On Astronomer v0.9+, you’ll be able to overwrite files + specify their own volume mounts. If you’re on Astronomer Cloud at the moment (v0.7.5) you won’t be able to do so just yet - but soon!