Show code of other files than DAG one #18551
Replies: 1 comment 3 replies
-
That is unlikely to happen soon IMHO. It's a dificult one to pull if you consider how Python code is parsed, it would be next-to-impossible to find out which files to include extra and specifying them manually misses the point. I also think Airflow is NOT good to show code other than DAG code - it's not "code browser" there is little value and high complexity to make a UI that would let you navigate between files etc. I think a much better approach would be to use another browser for your code and write a custom plugin in airflow to get the link to that browser. For example if you have the code in Git and use GitSync, you could add a plugin to have a view where you redirect tto GitHub or GitLab UI. Even now GitHub (and I believe GitLab too) have automated detection of the linked code even in Python, so if you keep the code in the same repo you will be able to even navigate between DAG and imported code. Let me convert this one to discussion , as I do not think we will ever want to make it a feature (but If others think otherwise we can always convert it back to a feature). |
Beta Was this translation helpful? Give feedback.
-
Description
Showing code for several files besides the DAG code in the Code view of a DAG
Use case/motivation
Sometimes I have python scripts and sql files in the same folder as the DAG file. I would like to be able to see their codes in the code view. It should be configurable with template_searchpath.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions