From 1a946d51c13131103561c97c076f628589cdae69 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 24 Feb 2017 11:00:57 -0500 Subject: [PATCH] Fix an issue with sync vs run project updates We need to not remove the source tree on project update run which happens in the context of the job run to prevent the directory from being deleted out from under the job runners. Since those will inherently not block each other as the project update would --- awx/main/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index d205dc36c7..ce4c9bc5bd 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1218,7 +1218,7 @@ class RunProjectUpdate(BaseTask): 'scm_url': scm_url, 'scm_branch': scm_branch, 'scm_clean': project_update.scm_clean, - 'scm_delete_on_update': project_update.scm_delete_on_update, + 'scm_delete_on_update': project_update.scm_delete_on_update if project_update.job_type == 'sync' else False, 'scm_full_checkout': True if project_update.job_type == 'run' else False, 'scm_revision_output': self.revision_path })