Merge lp:~abentley/ci-director/reduce-verbosity into lp:ci-director

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 183
Proposed branch: lp:~abentley/ci-director/reduce-verbosity
Merge into: lp:ci-director
Diff against target: 74 lines (+9/-7)
2 files modified
cidirector/start_builds.py (+4/-4)
cidirector/update_outcome.py (+5/-3)
To merge this branch: bzr merge lp:~abentley/ci-director/reduce-verbosity
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+304264@code.launchpad.net

Commit message

Reduce the verbosity of start-builds and update-outcome.

Description of the change

Reduce verbosity of update-outcome and start-builds

This branch reduces the verbosity of update-outcome and start-builds at the INFO level. It moves most of the notifications to the DEBUG level.

Since individual scans will no longer be visible at the INFO level, it introduces "Scanning for new and updated builds." at the beginning and "Scan complete." at the end.

To post a comment you must log in.
183. By Aaron Bentley

Reduce the verbosity of start-builds and update-outcome.

Revision history for this message
Aaron Bentley (abentley) wrote :

Committed and pushed.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cidirector/start_builds.py'
2--- cidirector/start_builds.py 2016-08-26 19:02:14 +0000
3+++ cidirector/start_builds.py 2016-08-29 15:47:06 +0000
4@@ -53,10 +53,10 @@
5 unsatisfied_prerequisites = {}
6 for job in pending:
7 if job.test_id in active_jobs:
8- logging.info('{} already active.'.format(job.test_id))
9+ logging.debug('{} already active.'.format(job.test_id))
10 continue
11 if job.test_id not in enabled_jobs:
12- logging.info('{} not enabled.'.format(job.test_id))
13+ logging.debug('{} not enabled.'.format(job.test_id))
14 continue
15 blockers = [p for p in job.prerequisite_jobs
16 if jobs[p].status != SUCCEEDED]
17@@ -68,12 +68,12 @@
18 active_buildable = active_jobs.union(buildable)
19 active_conflicts = active_buildable.intersection(job.conflicts)
20 if len(active_conflicts) > 0:
21- logging.info('{} conflicts: ({})'.format(job.test_id, ', '.join(
22+ logging.debug('{} conflicts: ({})'.format(job.test_id, ', '.join(
23 active_conflicts)))
24 continue
25 buildable.add(job.test_id)
26 for blocker, blocked in sorted(unsatisfied_prerequisites.items()):
27- logging.info('Prereq "{}" prevents: {}'.format(
28+ logging.debug('Prereq "{}" prevents: {}'.format(
29 blocker, ', '.join(sorted(blocked))))
30 return buildable, {p.test_id for p in pending}
31
32
33=== modified file 'cidirector/update_outcome.py'
34--- cidirector/update_outcome.py 2016-08-29 15:09:47 +0000
35+++ cidirector/update_outcome.py 2016-08-29 15:47:06 +0000
36@@ -85,13 +85,13 @@
37 info = jenkins.get_info()
38 for job in info['jobs']:
39 job_name = job['name']
40- logging.info('Scanning {}'.format(job_name))
41+ logging.debug('Scanning {}'.format(job_name))
42 job_last = last_completed.get(job_name)
43 job_info = jenkins.get_job_info(job_name)
44 config = get_cid_config(job_info)
45 if job_name != BUILD_REVISION and config is None:
46 if get_cid_config(job_info, cloud_health=True) is None:
47- logging.info('Skipping {}; no ci-director config'.format(
48+ logging.debug('Skipping {}; no ci-director config'.format(
49 job_name))
50 continue
51 builds = sorted(b['number'] for b in job_info['builds'])
52@@ -101,7 +101,7 @@
53
54 def iter_build_info(jenkins, job_name, builds):
55 for build in builds:
56- logging.info('Scanning {} #{}'.format(job_name, build))
57+ logging.debug('Scanning {} #{}'.format(job_name, build))
58 yield jenkins.get_build_info(job_name, build)
59
60
61@@ -167,6 +167,7 @@
62 new_last_completed = {}
63 revision_build_jobs = {}
64 cloud_jobs = {}
65+ logging.info('Scanning for new and updated builds.')
66 for job_info, builds in iter_job_builds(jenkins, last_completed):
67 is_cloud = bool(get_cid_config(job_info, cloud_health=True) is not
68 None)
69@@ -201,6 +202,7 @@
70 builds[str(build_info['number'])] = build_info
71 update_job_configs(revision_build_jobs, by_revision_build)
72 update_job_configs(cloud_jobs, cloud_health)
73+ logging.info('Scan complete.')
74 return by_revision_build, cloud_health, new_last_completed
75
76

Subscribers

People subscribed via source and target branches