Detecting Dags directory and files from branch name
$ airflow-devenv create --branch akhatun/edit-type-dag --changes-only
Airflow development environment provisioning parameters:
- instance name: dev-atsuko
- pulled git branch: akhatun/edit-type-dag
- airflow-dags folder: research
- Dag files to render: ['dags/edit_types_dag.py']
$ airflow-devenv create --branch T317210_airflow_deb_creation --changes-only
Usage: airflow-devenv create [OPTIONS]
Error: Invalid value for '-c' / '--changes-only': Can not detect dags_folder: more than 1 directory with dags changed, {'analytics', 'research', 'analytics_test', 'platform_eng'}
$ airflow-devenv create --branch T317210_airflow_deb_creation --dags-folder analytics --changes-only
debug: dag folder analytics wasn't found in branch main, re-checking with branch T317210_airflow_deb_creation
debug: filtering only analytics
Airflow development environment provisioning parameters:
- instance name: dev-atsuko
- pulled git branch: T317210_airflow_deb_creation
- airflow-dags folder: analytics
- Dag files to render: ['dags/anomaly_detection/anomaly_detection_dag_factory.py', ...]
- Cleaning up and typing code
-
__main__.pyto test with:~/airflow-devenv$ python3 -m airflow_devenv - removed
debugchaining - list -> list_cmd
- logs to click
- black/mypy
-
- Resolving branch name and checking dags folders
- setting
--branch-nametodev-{unix-name}in manager since click is so bad - re-validating dags-folder in against specified branch
- setting
- Pass the files to filter on
- Get
dags_folderand files from the branch - Validate files against the file list if not validated yet
- Get
Bug T420730