bodhi/buildsys.py | 20 ++++++++++++--------
bodhi/masher.py | 19 ++++++++++++++++---
bodhi/metadata.py | 2 --
3 files changed, 28 insertions(+), 13 deletions(-)
New commits:
commit e23a1bfc9d3a2381126d3b36ba65514e9906acfb
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Mar 20 20:19:35 2009 -0400
Make our post-mash actions a bit more robust.
At one point or another, each one of these post-mash actions has exploded
somehow. This change makes it so that one bad update doesn't ruin things
for the rest of them. This will make various race-conditions less fatal.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index dad5e38..492d059 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -606,10 +606,23 @@ class MashTask(Thread):
# Send out our notices/digest, update all bugs, and add comments
log.debug("Sending stable update notices and closing bugs")
for update in self.updates:
- update.modify_bugs()
- update.status_comment()
+ try:
+ update.modify_bugs()
+ except Exception, e:
+ log.error("There was a problem modifying the bugs for %s" %
update.title)
+ log.exception(e)
+ try:
+ update.status_comment()
+ except Exception, e:
+ log.error("There was a problem updating the comment for %s"
% update.title)
+ log.exception(e)
if update.status == 'stable':
- update.send_update_notice()
+ try:
+ update.send_update_notice()
+ except Exception, e:
+ log.error("There was a problem sending the notice for
%s" % update.title)
+ log.exception(e)
+
log.debug("Sending updates-testing digests")
self.send_digest_mail()
commit 7f0ec1f875f881be172077d61fc36b9b74a52e92
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Mar 20 20:17:46 2009 -0400
Hack around some weird issue that I can't figure out at the moment.
I really don't want to make this change, but for some reason the certs
are all ending up as None, even though the config.get should default to
the cert in the users home directory... Yet, this change made it work.
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py
index 6d365af..cc2d750 100644
--- a/bodhi/buildsys.py
+++ b/bodhi/buildsys.py
@@ -159,14 +159,17 @@ def koji_login(client=None, clientca=None, serverca=None):
Login to Koji and return the session
"""
if not client:
- client = config.get('client_cert',
- join(expanduser('~'), '.fedora.cert'))
+ client = config.get('client_cert')
+ if not client:
+ client = join(expanduser('~'), '.fedora.cert')
if not clientca:
- clientca = config.get('clientca_cert',
- join(expanduser('~'), '.fedora-upload-ca.cert'))
+ clientca = config.get('clientca_cert')
+ if not clientca:
+ clientca = join(expanduser('~'), '.fedora-upload-ca.cert')
if not serverca:
- serverca = config.get('serverca_cert',
- join(expanduser('~'), '.fedora-server-ca.cert'))
+ serverca = config.get('serverca_cert')
+ if not serverca:
+ serverca = join(expanduser('~'), '.fedora-server-ca.cert')
koji_session = koji.ClientSession(config.get('koji_hub'), {})
koji_session.ssl_login(client, clientca, serverca)
commit 1b4bbce4377bd53070831eb5510eafc8cf93cc89
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Mar 20 20:13:10 2009 -0400
Don't be so verbose when adding updates to the updateinfo
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index d048a81..8eef7f8 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -172,8 +172,6 @@ class ExtendedMetadata:
log.debug("Update %s already in updateinfo" % update.title)
return
- log.debug("Generating extended metadata for %s" % update.title)
-
root = self._insert(self.doc.firstChild, 'update', attrs={
'type' : update.type,
'status' : update.status,
commit 9b405f38ec522e47f6aaa7bc08f6458a9ee69d4d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Mar 20 20:11:28 2009 -0400
Detect all failed tasks in our wait_for_tasks method
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py
index b1b8f78..6d365af 100644
--- a/bodhi/buildsys.py
+++ b/bodhi/buildsys.py
@@ -194,12 +194,13 @@ def wait_for_tasks(tasks, sleep=300):
to fail, otherwise zero.
"""
log.debug("Waiting for %d tasks to complete: %s" % (len(tasks), tasks))
+ failed_tasks = []
for task in tasks:
while not session.taskFinished(task):
time.sleep(sleep)
task_info = session.getTaskInfo(task)
if task_info['state'] != koji.TASK_STATES['CLOSED']:
log.error("Koji task %d failed" % task)
- return task
+ failed_tasks.append(task)
log.debug("Tasks completed successfully!")
- return 0
+ return failed_tasks
Show replies by date