From c90d81b914b908a4124bb87471f3e2978deb342c Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Thu, 29 Nov 2018 15:47:19 -0500 Subject: [PATCH] resolve a nuanced traceback for JTs that run w/ a failed project related: https://github.com/ansible/awx/pull/2719 --- awx/main/tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 953e267cf7..5debb8b2fc 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1413,6 +1413,11 @@ class RunJob(BaseTask): def final_run_hook(self, job, status, **kwargs): super(RunJob, self).final_run_hook(job, status, **kwargs) + if 'private_data_dir' not in kwargs: + # If there's no private data dir, that means we didn't get into the + # actual `run()` call; this _usually_ means something failed in + # the pre_run_hook method + return if job.use_fact_cache: job.finish_job_fact_cache( kwargs['private_data_dir'],