ousatov-ua edited a comment on issue #8564:
URL: https://github.com/apache/airflow/issues/8564#issuecomment-636815318


   Do you have it workable? Please help me...
   My config is next:
   
   `  AIRFLOW__KUBERNETES__GIT_REPO: "https://github.com/repo/airflow-dags.git";
       AIRFLOW__KUBERNETES__GIT_BRANCH: "master"
       AIRFLOW__KUBERNETES__GIT_SYNC_DEPTH: 1
       AIRFLOW__KUBERNETES__GIT_DAGS_FOLDER_MOUNT_POINT: "/opt/airflow/dags"
       AIRFLOW__KUBERNETES__GIT_SYNC_CONTAINER_REPOSITORY: "k8s.gcr.io/git-sync"
       AIRFLOW__KUBERNETES__GIT_SYNC_CONTAINER_TAG: "v3.1.2"
       AIRFLOW__KUBERNETES__GIT_SYNC_INIT_CONTAINER_NAME: "git-sync-clone"
       #AIRFLOW__KUBERNETES__GIT_SYNC_ONE_TIME: "True"
       AIRFLOW__KUBERNETES__DAGS_VOLUME_MOUNT_POINT: "/opt/airflow/dags"
       AIRFLOW__KUBERNETES__GIT_SYNC_RUN_AS_USER: 0`
   
   When I run dag I have executed git-sync container on worker pod, after that 
worker tries to load dag by path /opt/airflow/dags and cannot find it by id.... 
Everything work ok when I use loaded examples:
   `AIRFLOW__CORE__LOAD_EXAMPLES: "True"`
   
   I have 
   `AIRFLOW__KUBERNETES__DAGS_IN_IMAGE: 'False'`
   
   Here are logs of pod:
   
   git-sync container
   `I0601 12:06:42.798468 1 main.go:270] starting up: ["/git-sync"]
   I0601 12:06:43.069084 1 main.go:487] cloned 
https://github.com/repo/airflow-dags.git
   I0601 12:06:43.069969 1 main.go:407] syncing to HEAD 
(ef310c9d9bfc2f7730eac3d90a0fedb427b0020b)
   I0601 12:06:43.268166 1 main.go:431] added worktree 
/git/rev-ef310c9d9bfc2f7730eac3d90a0fedb427b0020b for origin/master
   I0601 12:06:43.269662 1 main.go:451] reset worktree 
/git/rev-ef310c9d9bfc2f7730eac3d90a0fedb427b0020b to 
ef310c9d9bfc2f7730eac3d90a0fedb427b0020b`
   
   base:
   `[2020-06-01 12:06:47,684] {__init__.py:51} INFO - Using executor 
LocalExecutor
   [2020-06-01 12:06:47,685] {dagbag.py:396} INFO - Filling up the DagBag from 
/opt/airflow/dags/hello_world.py
   Traceback (most recent call last):
    File "/home/airflow/.local/bin/airflow", line 37, in <module>
    args.func(args)
    File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/utils/cli.py", line 
75, in wrapper
    return f(*args, **kwargs)
    File "/home/airflow/.local/lib/python3.6/site-packages/airflow/bin/cli.py", 
line 523, in run
    dag = get_dag(args)
    File "/home/airflow/.local/lib/python3.6/site-packages/airflow/bin/cli.py", 
line 149, in get_dag
    'parse.'.format(args.dag_id))
   airflow.exceptions.AirflowException: dag_id could not be found: hello_world. 
Either the dag did not exist or it failed to parse.`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to