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/controllers.py
by Luke Macken
bodhi/controllers.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 4d27a16a19ed34684c2592739425ff57a6a32565
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Sep 24 11:38:11 2010 -0400
Mask our database connection limit exceptions
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 1994950..2128d3c 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -647,7 +647,10 @@ class Root(controllers.RootController):
raise InvalidUpdateException(params)
except Exception, e:
log.exception(e)
- flash_log(str(e))
+ if 'dbname' in str(e):
+ flash_log('Error: database connection limit reached. Please try again later')
+ else:
+ flash_log(str(e))
raise InvalidUpdateException(params)
# Verify that the user is either in the committers list, or is
13 years, 7 months
bodhi/masher.py
by Luke Macken
bodhi/masher.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
New commits:
commit 29bb7c5db6097ce8c8a977984cd4afeed1e98e81
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 22 15:31:12 2010 -0400
Fix a bug in the formatting of the security/critpath updates in the testing digest
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 744d7a9..13bb769 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -793,15 +793,19 @@ class MashTask(Thread):
log.debug("Sending digest for updates-testing %s" % prefix)
maildata = u''
try:
- maildata += u'The following %s Security updates need testing:\n\n' % prefix
- for update in self.get_security_updates(prefix):
- maildata += u' %s\n' % config.get('base_address') + url(update.get_url())
- maildata += '\n\n'
-
- maildata += u'The following %s Critical Path updates have yet to be approved:\n\n' % prefix
- for update in self.get_unapproved_critpath_updates(prefix):
- maildata += u' %s\n' % config.get('base_address') + url(update.get_url())
- maildata += '\n\n'
+ security_updates = self.get_security_updates(prefix)
+ if security_updates:
+ maildata += u'The following %s Security updates need testing:\n\n' % prefix
+ for update in security_updates:
+ maildata += u' %s\n' % (config.get('base_address') + url(update.get_url()))
+ maildata += '\n\n'
+
+ critpath_updates = self.get_unapproved_critpath_updates(prefix)
+ if critpath_updates:
+ maildata += u'The following %s Critical Path updates have yet to be approved:\n\n' % prefix
+ for update in self.get_unapproved_critpath_updates(prefix):
+ maildata += u' %s\n' % (config.get('base_address') + url(update.get_url()))
+ maildata += '\n\n'
except Exception, e:
log.exception(e)
13 years, 7 months
bodhi/templates
by Luke Macken
bodhi/templates/master.kid | 2 +-
bodhi/templates/welcome.kid | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 15edfba566088639f8c4387646b28f2935c8f866
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri May 21 05:38:38 2010 -0400
Force https on our links to bodhi's fedorahosted (#430)
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index 930fc9b..5b6c789 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -142,7 +142,7 @@ $(document).ready(function() {
Copyright © 2007-2010 Red Hat, Inc. and others. All Rights Reserved.<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="http://fedoraproject.org/wiki/Legal">Legal</a>, <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a>, <a href="http://bodhi.fedorahosted.org">Source Code</a> ]
+ [ <a href="http://fedoraproject.org/wiki/Legal">Legal</a>, <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a>, <a href="https://fedorahosted.org/bodhi">Source Code</a> ]
</div>
<!-- footer END -->
diff --git a/bodhi/templates/welcome.kid b/bodhi/templates/welcome.kid
index 62c602a..474d870 100644
--- a/bodhi/templates/welcome.kid
+++ b/bodhi/templates/welcome.kid
@@ -32,7 +32,7 @@
<tr>
<td>
<span id="bodhitip" title="Bodhi Project Homepage">
- <a href="http://fedorahosted.org/bodhi"><img src="${tg.url('/static/images/bodhi-icon-36.png')}" border="0" height="36" width="36"/></a>
+ <a href="https://fedorahosted.org/bodhi"><img src="${tg.url('/static/images/bodhi-icon-36.png')}" border="0" height="36" width="36"/></a>
</span>
</td>
<td>
13 years, 7 months
bodhi/model.py
by Luke Macken
bodhi/model.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 34725ef7428466ad565256440395de9c62303846
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 22 13:41:10 2010 -0400
Don't append the csrf url to the obsoletion comment
diff --git a/bodhi/model.py b/bodhi/model.py
index ded1058..a01b148 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -900,7 +900,7 @@ class PackageUpdate(SQLObject):
self.request = None
if newer:
self.comment("This update has been obsoleted by %s" %
- config.get('base_address') + url('/%s' % newer),
+ config.get('base_address') + tg_url('/%s' % newer),
author='bodhi')
elif msg:
self.comment(msg, author='bodhi')
13 years, 7 months
2 commits - bodhi/masher.py bodhi/metadata.py
by Luke Macken
bodhi/masher.py | 2 +-
bodhi/metadata.py | 15 ++++++++-------
2 files changed, 9 insertions(+), 8 deletions(-)
New commits:
commit 399097f14118341ac0068770d4d1c927ffe6d570
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 20 15:57:57 2010 -0400
Fix a bug in the new code to insert security/critpath updates in the testing digest
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 2fbde75..744d7a9 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -778,7 +778,7 @@ class MashTask(Thread):
return updates
def get_security_updates(self, release):
- release = Release.select(Release.q.long_name==release)
+ release = Release.select(Release.q.long_name==release)[0]
return PackageUpdate.select(
AND(PackageUpdate.q.releaseID == release.id,
PackageUpdate.q.type == 'security',
commit 93464014852529f0f4d43eec6ec8934ca86bc880
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 20 15:57:02 2010 -0400
Fix a bug in our new pkgtags metadata insertion code
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index af415bd..11dbda0 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -287,20 +287,21 @@ class ExtendedMetadata(object):
if arch == 'SRPMS':
continue
filename = ''
- if self.repo.startswith('f'):
- release = self.repo[1:].split('-')[0]
+ reponame = os.path.basename(self.repo)
+ if reponame.startswith('f'):
+ release = reponame[1:].split('-')[0]
filename = 'F-%s-%s-' % (release, arch)
- if 'testing' in self.repo:
+ if 'testing' in reponame:
filename += 'tu'
else:
filename += 'u'
- elif self.repo.startswith('el'):
- release = self.repo[2:].split('-')[0]
+ elif reponame.startswith('el'):
+ release = reponame[2:].split('-')[0]
filename = 'E-%s-%s' % (release, arch)
- if 'testing' in self.repo:
+ if 'testing' in reponame:
filename += '-t'
else:
- log.error('Unknown repo %s' % self.repo)
+ log.error('Unknown repo %s' % reponame)
return
tags_url = config.get('pkgtags_url') + filename
13 years, 7 months
Build failed in Hudson: bodhi-py2.4 #74
by Luke Macken
See <http://ci.csh.rit.edu/job/bodhi-py2.4/74/changes>
Changes:
[Luke Macken] Link to submitter page in testing updates list
[Luke Macken] link to submitter and release on home page
[Luke Macken] print query results to stdout instead of stderr
[Luke Macken] Add a unit test to ensure we don't allow updates with
------------------------------------------
Started by an SCM change
Checkout:workspace / <http://ci.csh.rit.edu/job/bodhi-py2.4/ws/> - hudson.remoting.LocalChannel@15bf0c5
Last Built Revision: Revision 0eb028d58b1e9d2ccac509c90f92c4255e01964e (origin/master)
Checkout:workspace / <http://ci.csh.rit.edu/job/bodhi-py2.4/ws/> - hudson.remoting.LocalChannel@15bf0c5
GitAPI created
Env: _=/usr/bin/java
Env: BUILD_ID=2010-07-13_18-01-34
Env: BUILD_NUMBER=74
Env: BUILD_TAG=hudson-bodhi-py2.4-74
Env: BUILD_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/74/
Env: CLASSPATH=
Env: EXECUTOR_NUMBER=0
Env: G_BROKEN_FILENAMES=1
Env: HISTSIZE=1000
Env: HOME=/home/hudson
Env: HOSTNAME=ci
Env: HUDSON_HOME=/home/hudson/.hudson
Env: HUDSON_URL=http://ci.csh.rit.edu/
Env: INPUTRC=/etc/inputrc
Env: JOB_NAME=bodhi-py2.4
Env: JOB_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/
Env: LANG=en_US.UTF-8
Env: LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386
Env: LESSOPEN=|/usr/bin/lesspipe.sh %s
Env: LOGNAME=hudson
Env: LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
Env: MAIL=/var/spool/mail/hudson
Env: NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
Env: NODE_NAME=
Env: PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/hudson/bin
Env: PWD=/home/hudson
Env: SHELL=/bin/bash
Env: SHLVL=1
Env: TERM=screen
Env: USER=hudson
Env: WORKSPACE=<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/>
Env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
Fetching changes from the remote Git repository
Fetching upstream changes from git://git.fedorahosted.org/git/bodhi
[workspace] $ git fetch -t git://git.fedorahosted.org/git/bodhi +refs/heads/*:refs/remotes/origin/*
[workspace] $ git ls-tree HEAD
[workspace] $ git tag -l master
[workspace] $ git rev-parse origin/master
Commencing build of Revision 3c6d2b61d714dc158286d70e01b6e1518310613b (origin/master)
GitAPI created
Env: _=/usr/bin/java
Env: BUILD_ID=2010-07-13_18-01-34
Env: BUILD_NUMBER=74
Env: BUILD_TAG=hudson-bodhi-py2.4-74
Env: BUILD_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/74/
Env: CLASSPATH=
Env: EXECUTOR_NUMBER=0
Env: G_BROKEN_FILENAMES=1
Env: HISTSIZE=1000
Env: HOME=/home/hudson
Env: HOSTNAME=ci
Env: HUDSON_HOME=/home/hudson/.hudson
Env: HUDSON_URL=http://ci.csh.rit.edu/
Env: INPUTRC=/etc/inputrc
Env: JOB_NAME=bodhi-py2.4
Env: JOB_URL=http://ci.csh.rit.edu/job/bodhi-py2.4/
Env: LANG=en_US.UTF-8
Env: LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386
Env: LESSOPEN=|/usr/bin/lesspipe.sh %s
Env: LOGNAME=hudson
Env: LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
Env: MAIL=/var/spool/mail/hudson
Env: NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
Env: NODE_NAME=
Env: PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/hudson/bin
Env: PWD=/home/hudson
Env: SHELL=/bin/bash
Env: SHLVL=1
Env: TERM=screen
Env: USER=hudson
Env: WORKSPACE=<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/>
Env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
Checking out Revision 3c6d2b61d714dc158286d70e01b6e1518310613b (origin/master)
[workspace] $ git checkout -f 3c6d2b61d714dc158286d70e01b6e1518310613b
[workspace] $ git tag -a -f -m "Hudson Build #74" hudson-bodhi-py2.4-74
Recording changes in branch origin/master
[workspace] $ git log --pretty=format:%H 0eb028d58b1e9d2ccac509c90f92c4255e01964e..3c6d2b61d714dc158286d70e01b6e1518310613b
[workspace] $ git log -M --summary --pretty=raw -n 1 3c6d2b61d714dc158286d70e01b6e1518310613b
[workspace] $ git diff-tree -M -r 3c6d2b61d714dc158286d70e01b6e1518310613b
[workspace] $ git log -M --summary --pretty=raw -n 1 44f5d5a0ab0e6a638ac0b9722d773f388057a8e8
[workspace] $ git diff-tree -M -r 44f5d5a0ab0e6a638ac0b9722d773f388057a8e8
[workspace] $ git log -M --summary --pretty=raw -n 1 902da8129903a0390a8f591e1ab7b3dedf10a776
[workspace] $ git diff-tree -M -r 902da8129903a0390a8f591e1ab7b3dedf10a776
[workspace] $ git log -M --summary --pretty=raw -n 1 0dc7352d1b67d1545a61912ec0c5e6dea365501f
[workspace] $ git diff-tree -M -r 0dc7352d1b67d1545a61912ec0c5e6dea365501f
[workspace] $ /bin/sh -xe /tmp/hudson1717225346754875356.sh
+ python setup.py egg_info
running egg_info
writing requirements to bodhi.egg-info/requires.txt
writing bodhi.egg-info/PKG-INFO
writing top-level names to bodhi.egg-info/top_level.txt
writing dependency_links to bodhi.egg-info/dependency_links.txt
writing entry points to bodhi.egg-info/entry_points.txt
reading manifest file 'bodhi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'start-bodhi'
warning: no files found matching 'ChangeLog'
writing manifest file 'bodhi.egg-info/SOURCES.txt'
+ nosetests
........................................F.........................Exception in thread VisitManager:
Traceback (most recent call last):
File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
self.run()
File "/usr/lib/python2.4/site-packages/turbogears/visit/api.py", line 352, in run
self.update_queued_visits(queue)
File "/usr/lib/python2.4/site-packages/turbogears/visit/sovisit.py", line 86, in update_queued_visits
conn.query(conn.sqlrepr(u))
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py", line 846, in query
return self._dbConnection._query(self._connection, s)
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py", line 349, in _query
self._executeRetry(conn, conn.cursor(), s)
File "/usr/lib/python2.4/site-packages/sqlobject/sqlite/sqliteconnection.py", line 178, in _executeRetry
raise OperationalError(ErrorMessage(e))
OperationalError: no such table: visit
.......................................................
======================================================================
FAIL: Ensure that bodhi disallows submitting an update with two versions
----------------------------------------------------------------------
Traceback (most recent call last):
File "<http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/tests/test_controllers.py",> line 2241, in test_duplicate_packages
assert "You cannot submit an update containing multiple versions of TurboGears" in log, log
AssertionError: [u'TurboGears-1.0.8-1.fc7,TurboGears-1.0.8-2.fc7 has been submitted for stable. ', 'Update successfully created']
-------------------- >> begin captured stdout << ---------------------
/updates/save?stable_karma=5&builds=TurboGears-1.0.8-1.fc7%2CTurboGears-1.0.8-2.fc7&autokarma=True&suggest_reboot=True¬es=foobar&request=Stable&bugs=&unstable_karma=-5&type_=bugfix&release=Fedora+7
Got record: <LogRecord: bodhi.util, 20, <http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/util.py,> 204, "TurboGears-1.0.8-1.fc7,TurboGears-1.0.8-2.fc7 has been submitted for stable. ">
formatted as: TurboGears-1.0.8-1.fc7,TurboGears-1.0.8-2.fc7 has been submitted for stable.
Got record: <LogRecord: bodhi.util, 20, <http://ci.csh.rit.edu/job/bodhi-py2.4/ws/bodhi/util.py,> 204, "Update successfully created">
formatted as: Update successfully created
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 121 tests in 248.892s
FAILED (failures=1)
13 years, 7 months
bodhi/config
by Luke Macken
bodhi/config/app.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit aa59f3edc5e494c70d75a1f0ee3aa4a7828cea07
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 20 11:18:49 2010 -0400
Fix a tpyo
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 1a8e8fc..9bdc7ce 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -182,7 +182,7 @@ fedora_epel.mandatory_days_in_testing = 14
testing_approval_msg = "This update has reached %d days in testing and can be pushed to stable now if the maintainer wishes"
-not_yet_tested_msg = 'his update has not yet met the minimum testing requirements defined in the <a href="https://fedoraproject.org/wiki/Package_update_acceptance_criteria">Package Update Acceptance Criteria</a>'
+not_yet_tested_msg = 'This update has not yet met the minimum testing requirements defined in the <a href="https://fedoraproject.org/wiki/Package_update_acceptance_criteria">Package Update Acceptance Criteria</a>'
# The number of days worth of updates/comments to display
feeds.num_days_to_show = 7
13 years, 7 months
3 commits - bodhi/config bodhi/model.py bodhi/tests
by Luke Macken
bodhi/config/app.cfg | 2 +
bodhi/model.py | 11 ++++++----
bodhi/tests/test_controllers.py | 43 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 4 deletions(-)
New commits:
commit 233806c72ebc19d9eb2a3ce1a8b159dadc814114
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 20 10:38:58 2010 -0400
Add a new unit test to ensure we handle EPEL time-in-testing properly
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 5d2276e..0865933 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -2590,3 +2590,46 @@ class TestControllers(testutil.DBTest):
# Make sure it doesn't obsolete the older one
assert PackageUpdate.byTitle(new_params['builds']).status == 'pending'
assert PackageUpdate.byTitle(params['builds']).status == 'testing'
+
+ def test_push_EPEL_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' : 'TurboGears-2.0.9-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
commit f3ee317f77ee5f95aaf7ddffda0dcac6c9646b65
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 20 10:38:38 2010 -0400
When we are calculating the days_in_testing, only take into account bodhi comments
diff --git a/bodhi/model.py b/bodhi/model.py
index 12f9679..ded1058 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -1050,7 +1050,8 @@ class PackageUpdate(SQLObject):
""" Return the number of days that this update has been in testing """
timestamp = None
for comment in self.comments[::-1]:
- if comment.text == 'This update has been pushed to testing':
+ if comment.text == 'This update has been pushed to testing' and \
+ comment.author == 'bodhi':
timestamp = comment.timestamp
if self.status == 'testing':
return (datetime.utcnow() - timestamp).days
@@ -1059,7 +1060,8 @@ class PackageUpdate(SQLObject):
if not timestamp:
return
for comment in self.comments:
- if comment.text == 'This update has been pushed to stable':
+ if comment.text == 'This update has been pushed to stable' and \
+ comment.author == 'bodhi':
return (comment.timestamp - timestamp).days
return (datetime.utcnow() - timestamp).days
commit 6638991c67d5fa5bdbb9a7c0949350e098d91a5b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 20 10:37:13 2010 -0400
When a request is being processed, not only should we check to see if we have
*met* the time-in-testing requirements, but also check if we currently *meet*
them.
This allows developers to push their updates to stable even before bodhi's
approve_testing_updates job runs.
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index c7320d6..1a8e8fc 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -182,6 +182,8 @@ fedora_epel.mandatory_days_in_testing = 14
testing_approval_msg = "This update has reached %d days in testing and can be pushed to stable now if the maintainer wishes"
+not_yet_tested_msg = 'his update has not yet met the minimum testing requirements defined in the <a href="https://fedoraproject.org/wiki/Package_update_acceptance_criteria">Package Update Acceptance Criteria</a>'
+
# The number of days worth of updates/comments to display
feeds.num_days_to_show = 7
feeds.max_entries = 20
diff --git a/bodhi/model.py b/bodhi/model.py
index af8c138..12f9679 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -474,8 +474,9 @@ class PackageUpdate(SQLObject):
# If we haven't met the stable karma requirements, check if it has met
# the mandatory time-in-testing requirements
if self.release.mandatory_days_in_testing:
- if not self.met_testing_requirements:
- flash_notes = 'This update has not yet met the minimum testing requirements defined in the <a href="https://fedoraproject.org/wiki/Package_update_acceptance_criteria">Package Update Acceptance Criteria</a>'
+ if not self.met_testing_requirements and \
+ not self.meets_testing_requirements:
+ flash_notes = config.get('not_yet_tested_msg')
if self.status == 'testing':
self.request = None
flash_log(flash_notes)
13 years, 7 months