From fd91f60659cf50225c772942f845b24d11806357 Mon Sep 17 00:00:00 2001 From: Shraddha Agrawal Date: Fri, 21 Aug 2020 21:44:46 +0530 Subject: [PATCH] don't try to delete job from server if first or last in suite This commit removes trying to delete job from server in case the job is first or last in suite. As first and last job are not reported to the server in the first place, we don't need to delete them. Signed-off-by: Shraddha Agrawal --- teuthology/dispatcher/supervisor.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/teuthology/dispatcher/supervisor.py b/teuthology/dispatcher/supervisor.py index 137754b31..4c71eeada 100644 --- a/teuthology/dispatcher/supervisor.py +++ b/teuthology/dispatcher/supervisor.py @@ -68,12 +68,6 @@ def main(args): def run_job(job_config, teuth_bin_path, archive_dir, verbose): safe_archive = safepath.munge(job_config['name']) if job_config.get('first_in_suite') or job_config.get('last_in_suite'): - if teuth_config.results_server: - try: - report.try_delete_jobs(job_config['name'], job_config['job_id']) - except Exception as e: - log.warning("Unable to delete job %s, exception occurred: %s", - job_config['job_id'], e) suite_archive_dir = os.path.join(archive_dir, safe_archive) args = [ os.path.join(teuth_bin_path, 'teuthology-results'), @@ -99,6 +93,7 @@ def run_job(job_config, teuth_bin_path, archive_dir, verbose): result_proc = subprocess.Popen(args=args, preexec_fn=os.setpgrp) log.info("teuthology-results PID: %s", result_proc.pid) # Remove unnecessary logs for first and last jobs in run + log.info('Deleting job\'s archive dir %s', job_config['archive_path']) for f in os.listdir(job_config['archive_path']): os.remove(os.path.join(job_config['archive_path'], f)) os.rmdir(job_config['archive_path']) -- 2.47.3