]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Revert "suite/run: Add a option to specify suite sha1"
authorAishwarya Mathuria <amathuri@redhat.com>
Thu, 12 Jun 2025 11:13:24 +0000 (16:43 +0530)
committerAishwarya Mathuria <amathuri@redhat.com>
Thu, 12 Jun 2025 11:13:24 +0000 (16:43 +0530)
This reverts commit 1324ae5e59263a00396cb1a85eee7c7e7c05bf3c.

scripts/suite.py
teuthology/suite/run.py
teuthology/suite/util.py

index 3cf858db67a34adf78e36adbe13512a20e538a01..c98a5cb89225772dee7123fa7d4554097e8d011a 100644 (file)
@@ -77,8 +77,6 @@ Standard arguments:
                               [default: qa]
   --suite-branch <suite_branch>
                               Use this suite branch instead of the ceph branch
-  --suite-sha1 <suite_sha1>   The suite sha1 to use for the tests (overrides
-                              --suite-branch)
   --suite-dir <suite_dir>     Use this alternative directory as-is when
                               assembling jobs from yaml fragments. This causes
                               <suite_branch> to be ignored for scheduling
index ba72a4334c4724ba8e43e7d61779bcad9daa3164..e348c294ceacdc69ca55f0aa6c95c421f6714b7d 100644 (file)
@@ -105,7 +105,7 @@ class Run(object):
             self.suite_repo_path = self.args.suite_dir
         else:
             self.suite_repo_path = util.fetch_repos(
-                suite_branch, test_name=self.name, dry_run=self.args.dry_run, commit=suite_hash)
+                suite_branch, test_name=self.name, dry_run=self.args.dry_run)
         teuthology_branch, teuthology_sha1 = self.choose_teuthology_branch()
 
 
@@ -367,27 +367,14 @@ class Run(object):
 
     def choose_suite_hash(self, suite_branch):
         suite_repo_name = self.suite_repo_name
-        suite_hash = None
-        if self.args.suite_sha1:
-            suite_hash = self.args.suite_sha1
-            if self.args.validate_sha1:
-                suite_hash = util.git_validate_sha1(suite_repo_name, suite_hash)
-            if not suite_hash:
-                exc = CommitNotFoundError(
-                    self.args.suite_sha1,
-                    '%s.git' % suite_repo_name
-                )
-                util.schedule_fail(message=str(exc), name=self.name, dry_run=self.args.dry_run)
-            log.info("suite sha1 explicitly supplied")
-        else:
-            suite_repo_project_or_url = self.args.suite_repo or 'ceph-qa-suite'
-            suite_hash = util.git_ls_remote(
-                suite_repo_project_or_url,
-                suite_branch
-            )
-            if not suite_hash:
-                exc = BranchNotFoundError(suite_branch, suite_repo_name)
-                util.schedule_fail(message=str(exc), name=self.name, dry_run=self.args.dry_run)
+        suite_repo_project_or_url = self.args.suite_repo or 'ceph-qa-suite'
+        suite_hash = util.git_ls_remote(
+            suite_repo_project_or_url,
+            suite_branch
+        )
+        if not suite_hash:
+            exc = BranchNotFoundError(suite_branch, suite_repo_name)
+            util.schedule_fail(message=str(exc), name=self.name, dry_run=self.args.dry_run)
         log.info("%s branch: %s %s", suite_repo_name, suite_branch, suite_hash)
         return suite_hash
 
index cc884ebf90341ee39784ce38148748eee551355e..db0cf11cb2af343ca55b44a470b416bce5ecaa2c 100644 (file)
@@ -29,7 +29,7 @@ CONTAINER_DISTRO = 'centos/9'       # the one to check for build_complete
 CONTAINER_FLAVOR = 'default'
 
 
-def fetch_repos(branch, test_name, dry_run, commit=None):
+def fetch_repos(branch, test_name, dry_run):
     """
     Fetch the suite repo (and also the teuthology repo) so that we can use it
     to build jobs. Repos are stored in ~/src/.
@@ -49,7 +49,7 @@ def fetch_repos(branch, test_name, dry_run, commit=None):
             # We use teuthology's main branch in all cases right now
             if config.teuthology_path is None:
                 fetch_teuthology('main')
-        suite_repo_path = fetch_qa_suite(branch, commit)
+        suite_repo_path = fetch_qa_suite(branch)
     except BranchNotFoundError as exc:
         schedule_fail(message=str(exc), name=test_name, dry_run=dry_run)
     return suite_repo_path