Skip to content

Commit

Permalink
fixup! suite: Improve package query caching
Browse files Browse the repository at this point in the history
  • Loading branch information
zmc committed Nov 28, 2023
1 parent 9b9585d commit a8ba597
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions teuthology/suite/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,14 @@ def collect_jobs(self, arch, configs, newest=False, limit=0):
full_job_config = copy.deepcopy(self.base_config.to_dict())
deep_merge(full_job_config, parsed_yaml)
flavor = util.get_install_task_flavor(full_job_config)
if not util.package_version_for_hash(sha1, flavor, os_type,
os_version, self.args.machine_type):
try:
version = util.package_version_for_hash(sha1, flavor, os_type,
os_version, self.args.machine_type)
log.debug(f"Found {version} for {os_type} {os_version} {flavor}")
except VersionNotFoundError:
jobs_missing_packages.append(job)
log.error(f"Packages for os_type '{os_type}', flavor {flavor} and "
f"ceph hash '{sha1}' not found")
jobs_missing_packages.append(job)
# optimization: one missing package causes backtrack in newest mode;
# no point in continuing the search
if newest:
Expand Down

0 comments on commit a8ba597

Please sign in to comment.