bodhi/masher.py
by Luke Macken
bodhi/masher.py | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 9a5250dac1a0ee6abb9bdd85590b77655e5bda3a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Oct 29 18:30:31 2010 -0400
Don't show obsolete critpath updates in our testing digest
diff --git a/bodhi/masher.py b/bodhi/masher.py
index fbe9161..ee03f3d 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -772,6 +772,7 @@ class MashTask(Thread):
for update in PackageUpdate.select(
AND(PackageUpdate.q.releaseID == release.id,
PackageUpdate.q.status != 'stable',
+ PackageUpdate.q.status != 'obsolete',
PackageUpdate.q.request == None),
orderBy=PackageUpdate.q.date_submitted).reversed():
if update.critpath and not update.critpath_approved:
13 years, 5 months
2 commits - bodhi/masher.py
by Luke Macken
bodhi/masher.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 892aa8819a827e1f774dc4201b792694b6115909
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 28 13:28:47 2010 -0400
Don't update security bug titles when we resume pushes
diff --git a/bodhi/masher.py b/bodhi/masher.py
index b47b8ed..fbe9161 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -653,11 +653,12 @@ class MashTask(Thread):
log.debug("Builds look OK to me")
# Update all bug titles for security updates
- log.info('Updating bug titles for security updates')
- for update in self.updates:
- if update.type == 'security':
- for bug in update.bugs:
- bug.fetch_details()
+ if not self.resume:
+ log.info('Updating bug titles for security updates')
+ for update in self.updates:
+ if update.type == 'security':
+ for bug in update.bugs:
+ bug.fetch_details()
# Move koji build tags
if not self.resume and len(self.updates):
commit ebbb3f9a5ab9941cde1da0a2fc49f4f91642651e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 28 13:28:24 2010 -0400
Don't try and remove the pending koji tags when we resume pushes
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 4cea59b..b47b8ed 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -667,7 +667,8 @@ class MashTask(Thread):
# TODO: Once AutoQA is Good To Go, then we'll want to prevent
# updates from being pushed if they have not gotten the appropriate
# karma from AutoQA. For now, bodhi is simply handling the pending tags.
- self.remove_pending_tags()
+ if not self.resume:
+ self.remove_pending_tags()
# Mash our repositories
self.mash()
13 years, 5 months
2 commits - bodhi/templates bodhi/tests
by Luke Macken
bodhi/templates/master.kid | 2 -
bodhi/tests/test_controllers.py | 45 +++++++++++++++++++++++++++++++++++++++-
2 files changed, 45 insertions(+), 2 deletions(-)
New commits:
commit 7d185dad2e5e0050a06d5f1696883f818897a5f3
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Oct 27 15:01:53 2010 -0400
Remove 'All rights reserved' from our copyright notice
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index 1c29c22..09cee33 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -139,7 +139,7 @@ $(document).ready(function() {
<!-- footer BEGIN -->
<div id="fedora-footer">
Bodhi Version: ${version} -- Server: ${hostname}<br/>
- Copyright © 2007-2010 Red Hat, Inc. and others. All Rights Reserved.<br/>
+ Copyright © 2007-2010 Red Hat, Inc. and others.<br/>
Licensed under the GNU Public License v2 or later.<br />
The Fedora Project is maintained and driven by the community and sponsored by Red Hat.<br/>This is a community maintained site. Red Hat is not responsible for content.<br/>
[ <a href="https://fedoraproject.org/wiki/Legal">Legal</a>, <a href="https://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a>, <a href="https://fedorahosted.org/bodhi">Source Code</a> ]
commit bf13258dfe03baf28fdd1c0f03aa15c61c092b62
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Oct 27 15:01:02 2010 -0400
Add a couple more unit tests
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 0eaec14..f4fbc43 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -2176,7 +2176,8 @@ class TestControllers(testutil.DBTest):
testutil.create_request('/updates/metrics/?tg_format=json', method='GET')
response = simplejson.loads(cherrypy.response.body[0])
assert 'F7' in response
- assert response['F7']['TopTestersMetric']['data'] == []
+ print response
+ assert response['F7']['TopTestersMetric']['data'] == [], response
def test_metrics_html(self):
release = create_release()
@@ -2676,3 +2677,45 @@ class TestControllers(testutil.DBTest):
except SQLObjectNotFound:
pass
+ def test_push_EPEL_critpath_before_tested(self):
+ """
+ Try pushing an epel package to stable after 13 days in testing, which
+ will fail, and then try after 14 days.
+ """
+ session = login()
+ rel = Release(name='EL5', long_name='Fedora EPEL 5',
+ id_prefix='FEDORA-EPEL', dist_tag='dist-5E-epel')
+ params = {
+ 'builds' : 'kernel-2.6.31-1.el5',
+ 'release' : 'Fedora EPEL 5',
+ 'type_' : 'bugfix',
+ 'bugs' : '',
+ 'notes' : '',
+ 'autokarma': True,
+ 'stable_karma' : 1,
+ 'request': 'stable',
+ 'unstable_karma' : -1,
+ }
+ self.save_update(params, session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request == 'testing', update.request
+
+ update.comment('This update has been pushed to testing', author='bodhi')
+ update.comments[-1].timestamp -= timedelta(days=13)
+
+ assert update.days_in_testing == 13
+
+ testutil.create_request('/updates/request/stable/%s' % params['builds'],
+ method='POST', headers=session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request == 'testing', update.request
+
+ update.comments[-2].timestamp -= timedelta(days=1)
+ assert update.days_in_testing == 14, update.days_in_testing
+
+ testutil.capture_log(['bodhi.controllers', 'bodhi.util', 'bodhi.model'])
+ testutil.create_request('/updates/request/stable/%s' % params['builds'],
+ method='POST', headers=session)
+ log = testutil.get_log()
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request == 'stable', log
13 years, 5 months
2 commits - bodhi/masher.py
by Luke Macken
bodhi/masher.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 9944ba09b0913f6912e524c367864a871c089dd5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Oct 27 12:06:55 2010 -0400
Don't wipe out the masher lock when safe_to_resume fails
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 4f7e7d5..4cea59b 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -641,7 +641,6 @@ class MashTask(Thread):
if self.resume:
if not self.safe_to_resume():
log.error("safe_to_resume failed! -- aborting")
- self._unlock()
masher.done(self)
return
else:
commit 349a691ca5c7b061617b5514c71e37d48cddeeed
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Oct 12 18:35:03 2010 -0400
Fix a bug in the get_unapproved_critpath_updates in the masher
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 13bb769..4f7e7d5 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -766,7 +766,7 @@ class MashTask(Thread):
self.testing_digest[prefix][update.builds[i].nvr] = subbody[1]
def get_unapproved_critpath_updates(self, release):
- release = Release.select(Release.q.long_name==release)
+ release = Release.select(Release.q.long_name==release)[0]
updates = []
for update in PackageUpdate.select(
AND(PackageUpdate.q.releaseID == release.id,
13 years, 5 months
wsgi tg_url import error
by Brian_Kosick@McAfee.com
Hi Luke,
I'm trying to get bodhi setup again and am running into this error (httpd 500 ISE) when attempting to go to http://myserv.er/updates.
[Mon Oct 04 10:58:25 2010] [error] [client 10.30.0.156] mod_wsgi (pid=16253): Target WSGI script '/usr/share/bodhi/bodhi.wsgi' cannot be loaded as Python module.
[Mon Oct 04 10:58:25 2010] [error] [client 10.30.0.156] mod_wsgi (pid=16253): Exception occurred processing WSGI script '/usr/share/bodhi/bodhi.wsgi'.
[Mon Oct 04 10:58:25 2010] [error] [client 10.30.0.156] Traceback (most recent call last):
[Mon Oct 04 10:58:25 2010] [error] [client 10.30.0.156] File "/usr/share/bodhi/bodhi.wsgi", line 18, in ?
[Mon Oct 04 10:58:25 2010] [error] [client 10.30.0.156] from bodhi.util import load_config
[Mon Oct 04 10:58:25 2010] [error] [client 10.30.0.156] File "/usr/lib/python2.4/site-packages/bodhi/util.py", line 43, in ?
[Mon Oct 04 10:58:25 2010] [error] [client 10.30.0.156] from fedora.tg.util import url as csrf_url, tg_url, request_format
[Mon Oct 04 10:58:25 2010] [error] [client 10.30.0.156] ImportError: cannot import name tg_url
I'm running RH 5.5 w/EPEL and rebuilt the bodhi 0.7.9-2 (fc14) from the src rpm on koji.fedoraproject.org. Can you point me in the correct direction to resolve this?
Thanks,
Brian
13 years, 5 months
bodhi-client query issues
by Roberto Sassu
Hi all
i'm using Fedora 12 and i have bodhi-client-0.7.4-1 installed.
I'm trying to execute this query:
bodhi -t bugfix -r F12 --status stable
to obtain the complete list of bugfix updates since release.
The problem is that i cannot disable the limit option and i'm only able
to receive the first 1000 records. Specifying the option -l 5000 doesn't
work for me.
Further i have another issue when executing:
bodhi kdenetwork -r F12
The program displays not only the history of the requested package but it includes
some other packages. I report a small output:
kdeaccessibility-4.4.2-1.fc12 security stable 2010-04-09
kdeadmin-4.4.2-1.fc12
kdeartwork-4.4.2-1.fc12
kdebase-4.4.2-1.fc12
kdebase-runtime-4.4.2-1.fc12
kdebindings-4.4.2-1.fc12
.....
konq-plugins-4.4.0-3.fc12
kdebase-workspace-4.4.2-5.fc12
kdelibs-4.4.2-2.fc12
kde-l10n-4.4.1-2.fc12 bugfix stable 2010-03-09
kdeaccessibility-4.4.1-1.fc12
kdeadmin-4.4.1-1.fc12
kdeartwork-4.4.1-1.fc12
.....
Thanks in advance for replies.
13 years, 6 months
bodhi/config bodhi/model.py bodhi/tests
by Luke Macken
bodhi/config/app.cfg | 2 ++
bodhi/model.py | 3 +++
bodhi/tests/test_controllers.py | 10 ++++++----
3 files changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 1afc02a269d3f118e17d1a030c997cf95b22e014
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Oct 19 11:08:58 2010 -0400
Comment on updates upon reaching the stable karma threshold (#489)
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 9bdc7ce..ad99f39 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -16,6 +16,8 @@ frontpage_notice = ''
# A notice to flash on the New Update page
newupdate_notice = ''
+stablekarma_comment = 'This update has reached the stable karma threshold and will be pushed to the stable updates repository'
+
##
## Mash settings
##
diff --git a/bodhi/model.py b/bodhi/model.py
index a01b148..768b003 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -808,6 +808,7 @@ class PackageUpdate(SQLObject):
if (self.stable_karma < min_karma and self.critpath_approved and
self.karma >= min_karma and self.pushable):
self.request = 'stable'
+ self.comment(config.get('stablekarma_comment'), author='bodhi')
mail.send(self.submitter, 'stablekarma', self)
mail.send_admin('stablekarma', self)
# If we're approved and meet the minimum requirements, then
@@ -816,6 +817,7 @@ class PackageUpdate(SQLObject):
self.karma >= self.stable_karma and
self.karma >= min_karma):
self.request = 'stable'
+ self.comment(config.get('stablekarma_comment'), author='bodhi')
mail.send(self.submitter, 'stablekarma', self)
mail.send_admin('stablekarma', self)
@@ -825,6 +827,7 @@ class PackageUpdate(SQLObject):
self.request = 'stable'
self.pushed = False
#self.date_pushed = None
+ self.comment(config.get('stablekarma_comment'), author='bodhi')
mail.send(self.submitter, 'stablekarma', self)
mail.send_admin('stablekarma', self)
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index fb69a6d..0eaec14 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -1969,10 +1969,12 @@ class TestControllers(testutil.DBTest):
assert update.critpath
assert update.critpath_approved
#assert False, testutil.get_log()
- assert len(update.comments) == 3, update.comments
- assert update.comments[1].author == 'bob', update.comments
- assert update.comments[2].author == 'bodhi', update.comments
- assert update.comments[2].text == 'Critical path update approved'
+ assert len(update.comments) == 4, update.comments
+ assert update.comments[1].author == 'bodhi', update.comments
+ assert update.comments[1].text == config.get('stablekarma_comment')
+ assert update.comments[2].author == 'bob', update.comments
+ assert update.comments[-1].author == 'bodhi', update.comments
+ assert update.comments[-1].text == 'Critical path update approved'
def test_critpath_request_complete(self):
"""
13 years, 6 months
bodhi/controllers.py bodhi/tests
by Luke Macken
bodhi/controllers.py | 7 ++++++
bodhi/tests/test_controllers.py | 41 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
New commits:
commit 17c90317fe39749bb800fb451086ee373e756444
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Oct 8 17:35:50 2010 -0400
Fix a bug with editing updates and replacing builds with newer versions.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 2128d3c..88bde43 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -718,6 +718,13 @@ class Root(controllers.RootController):
# and bring the update back to a pending state
edited.unpush()
+ # Remove the appropriate builds
+ for build in removed_builds:
+ b = PackageBuild.byNvr(build)
+ edited.removePackageBuild(b)
+ if len(b.updates) == 0:
+ b.destroySelf()
+
# Refresh the tags for these builds
for build in edited.builds:
if build.nvr in buildinfo:
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 0865933..fb69a6d 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -2633,3 +2633,44 @@ class TestControllers(testutil.DBTest):
log = testutil.get_log()
update = PackageUpdate.byTitle(params['builds'])
assert update.request == 'stable', log
+
+ def test_replace_build_with_newer(self):
+ session = login()
+ create_release()
+ params = {
+ 'builds' : 'TurboGears-1.0.8-1.fc7',
+ 'release' : 'Fedora 7',
+ 'type_' : 'security',
+ 'bugs' : '',
+ 'notes' : 'foobar',
+ 'request' : 'Stable',
+ 'autokarma' : True,
+ 'stable_karma' : 5,
+ 'unstable_karma' : -5
+ }
+ self.save_update(params, session)
+
+ # Add another build, for a different release
+ params = {
+ 'builds' : 'TurboGears-1.0.8-1.fc7.1',
+ 'release' : 'Fedora 7',
+ 'type_' : 'bugfix',
+ 'cves' : '',
+ 'bugs' : '',
+ 'notes' : '',
+ 'edited' : 'TurboGears-1.0.8-1.fc7',
+ }
+
+ testutil.capture_log(['bodhi.controllers', 'bodhi.util', 'bodhi.model'])
+ self.save_update(params, session)
+ logs = testutil.get_log()
+
+ up = PackageUpdate.byTitle('TurboGears-1.0.8-1.fc7.1')
+ assert up.comments[-1].text == 'guest has edited this update. New build(s): TurboGears-1.0.8-1.fc7.1. Removed build(s): TurboGears-1.0.8-1.fc7.'
+ assert len(up.builds) == 1, logs
+ try:
+ PackageBuild.byNvr('TurboGears-1.0.8-1.fc7')
+ assert False, "Removed build not deleted from database!"
+ except SQLObjectNotFound:
+ pass
+
13 years, 6 months