]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
worker: handle CommitNotFoundErrors
authorJosh Durgin <jdurgin@redhat.com>
Tue, 2 Feb 2021 19:19:07 +0000 (14:19 -0500)
committerJosh Durgin <jdurgin@redhat.com>
Tue, 2 Feb 2021 19:54:41 +0000 (14:54 -0500)
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
teuthology/worker.py

index 317745d7a2c710396910bcc32c82fba0562f57c4..1437083e60353c3b2d2b4b6ab7d09c55c0c94c81 100644 (file)
@@ -14,7 +14,7 @@ from teuthology import report
 from teuthology import safepath
 from teuthology.config import config as teuth_config
 from teuthology.config import set_config_attr
-from teuthology.exceptions import BranchNotFoundError, SkipJob, MaxWhileTries
+from teuthology.exceptions import BranchNotFoundError, CommitNotFoundError, SkipJob, MaxWhileTries
 from teuthology.kill import kill_job
 from teuthology.repo_utils import fetch_qa_suite, fetch_teuthology, ls_remote, build_git_url
 
@@ -181,8 +181,8 @@ def prep_job(job_config, log_file_path, archive_dir):
             fetch_qa_suite(suite_branch, suite_sha1),
             job_config.get('suite_relpath', ''),
         ))
-    except BranchNotFoundError as exc:
-        log.exception("Branch not found; marking job as dead")
+    except (BranchNotFoundError, CommitNotFoundError) as exc:
+        log.exception("Requested version not found; marking job as dead")
         report.try_push_job_info(
             job_config,
             dict(status='dead', failure_reason=str(exc))