Skip to content

Commit

Permalink
Make logs slightly quieter during scheduling
Browse files Browse the repository at this point in the history
Particularly in non-verbose mode.

Signed-off-by: Zack Cerza <zack@redhat.com>
  • Loading branch information
zmc committed Nov 22, 2023
1 parent cd8445f commit 9b9585d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 2 additions & 4 deletions teuthology/repo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'])
Expand Down Expand Up @@ -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:
Expand Down
11 changes: 5 additions & 6 deletions teuthology/suite/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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),
))
Expand Down

0 comments on commit 9b9585d

Please sign in to comment.