odracci commented on a change in pull request #3770: [AIRFLOW-3281] Fix 
Kubernetes operator with git-sync
URL: https://github.com/apache/incubator-airflow/pull/3770#discussion_r244057766
 
 

 ##########
 File path: airflow/contrib/kubernetes/worker_configuration.py
 ##########
 @@ -50,13 +55,13 @@ def _get_init_containers(self, volume_mounts):
             'value': self.kube_config.git_branch
         }, {
             'name': 'GIT_SYNC_ROOT',
-            'value': os.path.join(
-                self.worker_airflow_dags,
-                self.kube_config.git_subpath
-            )
+            'value': self.kube_config.git_sync_root
         }, {
             'name': 'GIT_SYNC_DEST',
-            'value': 'dags'
+            'value': self.kube_config.git_sync_dest
+        }, {
+            'name': 'GIT_SYNC_DEPTH',
 
 Review comment:
   I'm sorry, I haven't seen that comment.
   `GIT_SYNC_DEPTH` just clone the repo with the last commit instead of 
downloading the whole repo history, it speeds up the deployment.
   The revision being in the path directory is how git-sync works and is not 
possible to remove it.
   I solved the problem with `kube_config.git_sync_root` which includes the 
dags_folder + revision + git_sub_path
   /cc @jzucker2 @dimberman 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to