From 9b9585d59bab5d857f601d6e1e047cefc76d9090 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 21 Nov 2023 18:50:01 -0700 Subject: [PATCH] Make logs slightly quieter during scheduling Particularly in non-verbose mode. Signed-off-by: Zack Cerza --- teuthology/repo_utils.py | 6 ++---- teuthology/suite/util.py | 11 +++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index 983572f81..57580f206 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -121,8 +121,6 @@ def enforce_repo_state(repo_url, dest_path, branch, commit=None, remove_on_error set_remote(dest_path, repo_url) fetch_branch(dest_path, branch) touch_file(sentinel) - else: - log.info("%s was just updated or references a specific commit; assuming it is current", dest_path) if commit and os.path.exists(repo_reset): return @@ -277,7 +275,7 @@ def fetch_branch(repo_path, branch, shallow=True): GitError for other errors """ validate_branch(branch) - log.info("Fetching %s from origin", branch) + log.info("Fetching %s from origin", repo_path.split("/")[-1]) args = ['git', 'fetch'] if shallow: args.extend(['--depth', '1']) @@ -314,7 +312,7 @@ def reset_repo(repo_url, dest_path, branch, commit=None): else: reset_branch = 'origin/%s' % branch reset_ref = commit or reset_branch - log.info('Resetting repo at %s to %s', dest_path, reset_ref) + log.debug('Resetting repo at %s to %s', dest_path, reset_ref) # This try/except block will notice if the requested branch doesn't # exist, whether it was cloned or fetched. try: diff --git a/teuthology/suite/util.py b/teuthology/suite/util.py index a8723f0bc..713940c94 100644 --- a/teuthology/suite/util.py +++ b/teuthology/suite/util.py @@ -245,11 +245,10 @@ def package_version_for_hash(hash, flavor='default', distro='rhel', ), ) - if bp.distro == CONTAINER_DISTRO and bp.flavor == CONTAINER_FLAVOR: - log.info('container build %s, checking for build_complete' % bp.distro) - if not bp.build_complete: - log.info('build not complete') - return None + if (bp.distro == CONTAINER_DISTRO and bp.flavor == CONTAINER_FLAVOR and + not bp.build_complete): + log.info("Container build incomplete") + return None return bp.version @@ -326,7 +325,7 @@ def teuthology_schedule(args, verbose, dry_run, log_prefix='', stdin=None): printable_args.append("'%s'" % item) else: printable_args.append(item) - log.info('{0}{1}'.format( + log.debug('command: {0}{1}'.format( log_prefix, ' '.join(printable_args), ))