Skip to content

Commit 9ee4faf

Browse files
committed
adjust cot logging for less verbosity and more clarity
We can likely make more improvements here, but this is a start.
1 parent cee8b2e commit 9ee4faf

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

scriptworker/cot/verify.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,9 +1302,6 @@ async def populate_jsone_context(chain, parent_link, decision_link, tasks_for):
13021302
else:
13031303
raise CoTError("Unknown tasks_for {}!".format(tasks_for))
13041304

1305-
log.debug("{} json-e context:".format(parent_link.name))
1306-
# format_json() breaks on lambda values; use pprint.pformat here.
1307-
log.debug(pprint.pformat(jsone_context))
13081305
return jsone_context
13091306

13101307

@@ -2011,14 +2008,13 @@ def get_source_url(obj):
20112008
"""
20122009
source_env_prefix = obj.context.config['source_env_prefix']
20132010
task = obj.task
2014-
log.debug("Getting source url for {} {}...".format(obj.name, obj.task_id))
20152011
repo = get_repo(obj.task, source_env_prefix=source_env_prefix)
20162012
source = task['metadata']['source']
20172013
if repo and not verify_repo_matches_url(repo, source):
20182014
raise CoTError("{name} {task_id}: {source_env_prefix} {repo} doesn't match source {source}!".format(
20192015
name=obj.name, task_id=obj.task_id, source_env_prefix=source_env_prefix, repo=repo, source=source
20202016
))
2021-
log.info("{} {}: found {}".format(obj.name, obj.task_id, source))
2017+
log.info("%s %s source url %s", obj.name, obj.task_id, source)
20222018
return source
20232019

20242020

@@ -2144,7 +2140,7 @@ async def verify_chain_of_trust(chain):
21442140
raise
21452141
else:
21462142
raise CoTError(str(exc))
2147-
log.info("Good.")
2143+
log.info("taskId %s passes chain of trust verification.", chain.task_id)
21482144

21492145

21502146
# verify_cot_cmdln {{{1
@@ -2166,10 +2162,6 @@ async def _async_verify_cot_cmdln(opts, tmp):
21662162
context.config = apply_product_config(context.config)
21672163
cot = ChainOfTrust(context, opts.task_type, task_id=opts.task_id)
21682164
await verify_chain_of_trust(cot)
2169-
log.info(format_json(cot.dependent_task_ids()))
2170-
log.info("{} : {}".format(cot.name, cot.task_id))
2171-
for link in cot.links:
2172-
log.info("{} : {}".format(link.name, link.task_id))
21732165

21742166

21752167
def verify_cot_cmdln(args=None, event_loop=None):

scriptworker/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,6 @@ async def download_file(context, url, abs_filename, session=None, chunk_size=128
566566
if not chunk:
567567
break
568568
fd.write(chunk)
569-
log.info("Done")
570569

571570

572571
# get_loggable_url {{{1

0 commit comments

Comments
 (0)