My Airflow's Git repository has the following structure:
├── dags/
│ └── example-dag1.py
│ └── example-dag2.py
├── include/
│ ├── operators/
│ │ └── my_operator.py
│ └── sensors/
│ └── my_sensor.py
│ └── dag_utils.py
└── tests/
I know I can sync DAGs from a Git repository as described here in the following way:
dags:
gitSync:
enabled: true
repo: git@github.com/<username>/<private-repo-name>.git
branch: <branch-name>
subPath: ""
sshKeySecret: airflow-ssh-secret
extraSecrets:
airflow-ssh-secret:
data: |
gitSshKey: '<base64-converted-ssh-private-key>'
What if I also want to sync custom operators, sensors and generally any other custom, reusable code from the include folder? How can I do it? Seems to be impossible right now but that's hard to believe as writing custom operators is standard in Airflow.