Update following changes logging
A user pointed out that approving a parent change [0] did not enqueue a child change [1] that had all necessary votes. On inspection of the logs [2] it isn't clear why this happened as at least one other change was found. One thing I noticed is that 'Depends-on' instead of 'Depends-On' was used but both Gerrit and zuul seem to treat this string case insensitively so that shouldn't matter. Update our logging to aid in further debugging should this happen again. In particular log already known following changes which comes from our change cache and newly discovered following changes which comes from the code review system. Hopefully this will help identify where we're not finding the info we expect. Additionally record the number of possible depending changes found by Gerrit. This should give us an indication for whether or not Gerrit returning the information we expect. [0] https://review.opendev.org/c/openstack/devstack/+/860795 [1] https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/857031 [2] https://paste.opendev.org/show/b6P1Uy2VjAMZOqtBbwyz/ Change-Id: Iad7fbbc3476ef1ddfd366e93b8505ed0fbdc1dc0
This commit is contained in:
parent
2806a548b3
commit
35bc94147c
|
@ -121,6 +121,7 @@ class GerritSource(BaseSource):
|
|||
queries.add('message:{Depends-On: %s}' % uri)
|
||||
query = '(' + ' OR '.join(queries) + ')'
|
||||
results = self.connection.simpleQuery(query)
|
||||
self.log.debug('%s possible depending changes found', len(results))
|
||||
seen = set()
|
||||
for result in results:
|
||||
for match in find_dependency_headers(result.message):
|
||||
|
|
|
@ -91,6 +91,8 @@ class DependentPipelineManager(SharedQueuePipelineManager):
|
|||
|
||||
needed_by_changes = self.resolveChangeReferences(
|
||||
change.needed_by_changes)
|
||||
log.debug(" Previously known following changes: %s",
|
||||
needed_by_changes)
|
||||
seen = set(needed_by_changes)
|
||||
for source in sources:
|
||||
log.debug(" Checking source: %s", source)
|
||||
|
@ -101,7 +103,7 @@ class DependentPipelineManager(SharedQueuePipelineManager):
|
|||
seen.add(c)
|
||||
needed_by_changes.append(c)
|
||||
|
||||
log.debug(" Following changes: %s", needed_by_changes)
|
||||
log.debug(" Updated following changes: %s", needed_by_changes)
|
||||
|
||||
to_enqueue = []
|
||||
change_dependencies = dependency_graph.get(change, [])
|
||||
|
|
Loading…
Reference in New Issue