-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hi team.
This is more of a question for my own understanding, but why is Blueprint trying to support Python 3.8 and 3.9? With them being end of life (or about to be) and Airflow having dropped support for them, I'm curious.
For context, I've been working through options for how to extend this to have the option for dynamically generating DAG files on build instead of at runtime. Unsure if this is a desired feature for this project, but the factory pattern can make support/debugging more complex. Therefore, my shop has a requirement to be able to see the fully rendered DAG code in the Airflow UI code view, and finding this project seemed fortuitous timing.
There appear to be two options for this:
- Store the DAG blueprint as a
*.py.j2file and have that accessible by bothrender()and a newrender_to_file()method, or have the DAG definition that's currently inrender()be a Jinja2-compatible text block. Simplest approach but may require more care when developing new blueprints. - Have
render()return the DAG object as it does now, but add functionality incore.pyto write that out to file. Cleaner on the blueprint side, but much more complex to implement and maintain.
They're both doable, but the lower Python compatibility requirements add more complexity for what may be little gain, thus my original question. Of course, if the rendering to file is not an intended feature, then it's likely a moot point 😄
Cheers
Rory