Branch 'refs/tags/0.7.2' - 3 commits - bodhi/controllers.py bodhi.egg-info/SOURCES.txt bodhi/release.py bodhi/templates
by Luke Macken
Rebased ref, commits from common ancestor:
commit ff7fbaf7a8f0e1ecd833a97079cf2ac402d197ac
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 17:29:20 2010 -0500
0.7.2
diff --git a/bodhi.egg-info/SOURCES.txt b/bodhi.egg-info/SOURCES.txt
index fe7e4d8..30292b4 100644
--- a/bodhi.egg-info/SOURCES.txt
+++ b/bodhi.egg-info/SOURCES.txt
@@ -138,6 +138,7 @@ bodhi/templates/captchacommentform.kid
bodhi/templates/commentform.kid
bodhi/templates/comments.kid
bodhi/templates/confirmation.kid
+bodhi/templates/critpath.kid
bodhi/templates/form.kid
bodhi/templates/list.kid
bodhi/templates/login.html
@@ -175,6 +176,7 @@ bodhi/tools/__init__.py
bodhi/tools/clean-testing.py
bodhi/tools/client.py
bodhi/tools/dev_init.py
+bodhi/tools/fix_dupe_ids.py
bodhi/tools/init.py
bodhi/tools/metrics.py
bodhi/tools/pickledb.py
diff --git a/bodhi/release.py b/bodhi/release.py
index b2d74f7..ff3e76c 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.7.1'
+VERSION = '0.7.2'
NAME = 'bodhi'
DESCRIPTION = 'Bodhi is a modular web-system that facilitates the process of publishing updates for a Fedora-based software distribution'
AUTHOR = 'Luke Macken'
commit b8b6db964c79c119aedd306e82abd97ced8d6fa8
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 17:26:45 2010 -0500
Create a custom critpath template
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index f5b1d5f..cabc879 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1262,7 +1262,7 @@ class Root(controllers.RootController):
builds[tag] = build['nvr']
return builds
- @expose(template='bodhi.templates.pending', allow_json=True)
+ @expose(template='bodhi.templates.critpath', allow_json=True)
@paginate('updates', limit=1000, max_limit=1000)
def critpath(self, *args, **kw):
updates = []
diff --git a/bodhi/templates/critpath.kid b/bodhi/templates/critpath.kid
new file mode 100644
index 0000000..51525ca
--- /dev/null
+++ b/bodhi/templates/critpath.kid
@@ -0,0 +1,84 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Fedora Updates</title>
+</head>
+
+<body>
+ <b>${num_items} Pending Updates</b>
+ <div class="list">
+ <span py:for="page in tg.paginate.pages">
+ <a py:if="page != tg.paginate.current_page"
+ href="${tg.paginate.get_href(page)}">${page}</a>
+ <b py:if="page == tg.paginate.current_page">${page}</b>
+ </span>
+ <a href="?tg_paginate_limit=${num_items}">all</a>
+ </div>
+
+ <table class="list">
+ <tr class="list">
+ <th class="list">
+ <b>Update</b>
+ </th>
+ <th class="list">
+ <b>Release</b>
+ </th>
+ <th class="list">
+ <b>Type</b>
+ </th>
+ <th class="list">
+ <b>Status</b>
+ </th>
+ <th class="list">
+ <center><b>Karma</b></center>
+ </th>
+ <th class="list">
+ <b>Request</b>
+ </th>
+ <th class="list">
+ <b>Submitter</b>
+ </th>
+ <th class="list">
+ <b>Created</b>
+ </th>
+ </tr>
+ <?python row_color = "#FFFFFF" ?>
+ <tr class="list" bgcolor="${row_color}" py:for="update in updates">
+ <td class="list" width="35%">
+ <a class="list" href="${tg.url(update.get_url())}">${update.title.replace(',', ', ')}</a>
+ </td>
+ <td class="list">
+ <a class="list" href="${tg.url('/%s' % update.release.name)}">${update.release.long_name}</a>
+ </td>
+ <td class="list">
+ <img src="${tg.url('/static/images/%s.png' % update.type)}" title="${update.type}" /> ${update.type}
+ </td>
+ <td class="list">
+ ${update.status}
+ </td>
+ <?python
+ if update.karma < 0: karma = -1
+ elif update.karma > 0: karma = 1
+ else: karma = 0
+ ?>
+ <td class="list" align="center">
+ <img src="${tg.url('/static/images/karma%d.png' % karma)}" align="top"/> <b>${update.karma}</b>
+ </td>
+ <td class="list">
+ <img src="${tg.url('/static/images/%s-large.png' % update.request)}" title="${update.request}"/> ${update.request}
+ </td>
+ <td class="list">
+ <a href="${tg.url('/user/' + update.submitter)}">${update.submitter}</a>
+ </td>
+ <td class="list">
+ ${update.date_submitted}
+ </td>
+ <?python row_color = (row_color == "#f1f1f1") and "#FFFFFF" or "#f1f1f1" ?>
+ </tr>
+ </table>
+
+</body>
+</html>
commit dc39bf842afbeb4b412a04bda0481b474bc5862b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 17:13:23 2010 -0500
Update the title for critical path updates
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 11fe04b..5c2f65a 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -33,6 +33,8 @@ else:
title += "<a href=\"" + util.url('/%s' % nvr[0]) + "\">" + nvr[0] + "</a>-" + '-'.join(nvr[-2:]) + ", "
title = title[:-2]
+critpath = update.critpath and 'critical path ' or ''
+
release = util.link(update.release.long_name, '/' + update.release.name)
submitter = util.link(update.submitter, '/user/' + update.submitter)
@@ -50,7 +52,7 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
<table width="97%">
<tr>
<td>
- <div class="show"><img align="absmiddle" src="${tg.url('/static/images/%s.png' % update.type)}" alt="${update.type}"/> ${XML(title)} ${update.type} update</div>
+ <div class="show"><img align="absmiddle" src="${tg.url('/static/images/%s.png' % update.type)}" alt="${update.type}"/> ${XML(title)} ${critpath}${update.type} update</div>
</td>
<!-- update options -->
14 years, 2 months
bodhi/controllers.py bodhi/templates
by Luke Macken
bodhi/controllers.py | 2 -
bodhi/templates/critpath.kid | 84 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+), 1 deletion(-)
New commits:
commit b8b6db964c79c119aedd306e82abd97ced8d6fa8
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 17:26:45 2010 -0500
Create a custom critpath template
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index f5b1d5f..cabc879 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1262,7 +1262,7 @@ class Root(controllers.RootController):
builds[tag] = build['nvr']
return builds
- @expose(template='bodhi.templates.pending', allow_json=True)
+ @expose(template='bodhi.templates.critpath', allow_json=True)
@paginate('updates', limit=1000, max_limit=1000)
def critpath(self, *args, **kw):
updates = []
diff --git a/bodhi/templates/critpath.kid b/bodhi/templates/critpath.kid
new file mode 100644
index 0000000..51525ca
--- /dev/null
+++ b/bodhi/templates/critpath.kid
@@ -0,0 +1,84 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Fedora Updates</title>
+</head>
+
+<body>
+ <b>${num_items} Pending Updates</b>
+ <div class="list">
+ <span py:for="page in tg.paginate.pages">
+ <a py:if="page != tg.paginate.current_page"
+ href="${tg.paginate.get_href(page)}">${page}</a>
+ <b py:if="page == tg.paginate.current_page">${page}</b>
+ </span>
+ <a href="?tg_paginate_limit=${num_items}">all</a>
+ </div>
+
+ <table class="list">
+ <tr class="list">
+ <th class="list">
+ <b>Update</b>
+ </th>
+ <th class="list">
+ <b>Release</b>
+ </th>
+ <th class="list">
+ <b>Type</b>
+ </th>
+ <th class="list">
+ <b>Status</b>
+ </th>
+ <th class="list">
+ <center><b>Karma</b></center>
+ </th>
+ <th class="list">
+ <b>Request</b>
+ </th>
+ <th class="list">
+ <b>Submitter</b>
+ </th>
+ <th class="list">
+ <b>Created</b>
+ </th>
+ </tr>
+ <?python row_color = "#FFFFFF" ?>
+ <tr class="list" bgcolor="${row_color}" py:for="update in updates">
+ <td class="list" width="35%">
+ <a class="list" href="${tg.url(update.get_url())}">${update.title.replace(',', ', ')}</a>
+ </td>
+ <td class="list">
+ <a class="list" href="${tg.url('/%s' % update.release.name)}">${update.release.long_name}</a>
+ </td>
+ <td class="list">
+ <img src="${tg.url('/static/images/%s.png' % update.type)}" title="${update.type}" /> ${update.type}
+ </td>
+ <td class="list">
+ ${update.status}
+ </td>
+ <?python
+ if update.karma < 0: karma = -1
+ elif update.karma > 0: karma = 1
+ else: karma = 0
+ ?>
+ <td class="list" align="center">
+ <img src="${tg.url('/static/images/karma%d.png' % karma)}" align="top"/> <b>${update.karma}</b>
+ </td>
+ <td class="list">
+ <img src="${tg.url('/static/images/%s-large.png' % update.request)}" title="${update.request}"/> ${update.request}
+ </td>
+ <td class="list">
+ <a href="${tg.url('/user/' + update.submitter)}">${update.submitter}</a>
+ </td>
+ <td class="list">
+ ${update.date_submitted}
+ </td>
+ <?python row_color = (row_color == "#f1f1f1") and "#FFFFFF" or "#f1f1f1" ?>
+ </tr>
+ </table>
+
+</body>
+</html>
14 years, 2 months
bodhi/templates
by Luke Macken
bodhi/templates/show.kid | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit dc39bf842afbeb4b412a04bda0481b474bc5862b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 17:13:23 2010 -0500
Update the title for critical path updates
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 11fe04b..5c2f65a 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -33,6 +33,8 @@ else:
title += "<a href=\"" + util.url('/%s' % nvr[0]) + "\">" + nvr[0] + "</a>-" + '-'.join(nvr[-2:]) + ", "
title = title[:-2]
+critpath = update.critpath and 'critical path ' or ''
+
release = util.link(update.release.long_name, '/' + update.release.name)
submitter = util.link(update.submitter, '/user/' + update.submitter)
@@ -50,7 +52,7 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
<table width="97%">
<tr>
<td>
- <div class="show"><img align="absmiddle" src="${tg.url('/static/images/%s.png' % update.type)}" alt="${update.type}"/> ${XML(title)} ${update.type} update</div>
+ <div class="show"><img align="absmiddle" src="${tg.url('/static/images/%s.png' % update.type)}" alt="${update.type}"/> ${XML(title)} ${critpath}${update.type} update</div>
</td>
<!-- update options -->
14 years, 2 months
Changes to 'refs/tags/0.7.2'
by Luke Macken
Tag '0.7.2' created by Luke Macken <lmacken(a)redhat.com> at 2010-03-03 21:40 +0000
0.7.2
Changes since 0.7.0:
Jesse Keating (1):
Add a config for f13-updates-testing
Josh Boyer (1):
Only filter Stable updates via --push-type
Josh Kayse (2):
show the actual author instead of comment.author for package nvr update showing
do not show a push to testing link if an update is in testing
Luke Macken (77):
Require one admin +1, and a minimum karma of +2 before pushing critical path
Strip off our group name from the comment author in a few places
Only remove the masher thread if it exists
Support passing update titles instead of PackageUpdate instances to the MashTask thread
Minor test case tweak
Use our configurable admin_groups, instea of hardcoding it
Mark emails to admins as [CRITPATH] when necessary
Send an email to releng once critical path updates get approved
Some critpath workflow changes and test improvements.
Update our comps CVS root
Use subprocess.call(..., cwd=path) instead of os.chdir
Use the tg_url method when injecting URLs in PackageUpdate.__str__
Apply a patch from Till Maas to s/http/https/ some of our URLs (#256)
Update some unit tests for the new URLs
Add the [all] link back to the pending updats list (#322)
Add a 'request' argument to our list API (#224)
Show the anonymous testers email address if we are logged in (#234)
Disallow the ability to edit an update, and add a build from a different release (#251)
Apply a patch from Toshio to use fedora.tg.util.tg_url
Detect conflicting builds when editing updates (#385)
Update newly added bugs when editing an update (#386)
Close bugs with FIXEDIN `name-version-release`, instead of just `version-release`
Create /metrics JSON API method, and a unit test
I like one liners
Apply a patch from David Timms to fix comment formatting (#290)
Float our comment image to ensure it's on the same line as the author
Have our flash_log method log to INFO instead of DEBUG
Update our critpath package list
Improve some of the output of the bodhi client, as well as code readability
More bodhi client output improvements
Don't complain about pushing critpath to stable if it's already approved
Minor rewording
Be a bit more verbose with regard to the requirements of the critpath
Some minor refactoring of our PackageUpdate.comment method
Display the critpath note to everyone, not just admins
Remove a lot of unnecessary logic for critical path in PackageUpdate.set_request
Fix a broken unit test
Spec bump, hopefully the last
Bump spec
Bump our spec file for 0.7.1 (again)
Fix a regression in our MetricsController, and add a JSON API
0.7.1
Fix our metrics JSON unit test, and add one for our flot widgets too
Update our critpath list
Only mash stable repos for releases that are not locked
Bump our spec/release
Support adding bug aliases to existing updates.
Fix another bug related to bug aliases, and adding duplicate comments
Revert "Reset the PackageUpdate.date_pushed when a testing update hits stable"
Make PackageUpdate.comment work outside of a request (eg: during a push)
Don't use mutable keyword arguments.
Fix some python-fedora deprecation warnings
Fix some more python-fedora deprecation warnings
Don't jump the gun on python-fedora tg1utils.
Fix a tpyo
More python-fedora compatibility
It's too early to be coding...
Write a unit test that reproduces our duplicate ID issue...
Add a nasty script to fix updates with duplicate IDs.
Get our test suite working again
Merge branch 'master' of git+ssh://git.fedoraproject.org/git/bodhi
Have PackageUpdate.get_url use titles, until our updateids are reliable
Get our test suite running again
Tweak our PackageUpdate.{stable,testing}_tag properties to work with pending releases
Add a bunch of unit tests to validate our release tag properties
Have our save() method handle empty build lists.
Encode to utf-8 before we pass anything to SQLObject...
Handle the edge case where no updates are created in our save() method
Add a couple of utf-8/unicode related tests
Make our AutoCompleteValidator handle getting a list of builds
Remove a FIXME that I figured it out already...
Only automatically mark as stable if it's not stable already...
Add a unit test to ensure PackageUpdate.request_complete() works on critpath
Add a critpath method to our RootController
Add a --critpath option to the bodhi CLI
Minor /critpath API improvements
0.7.2
Mathieu Bridon (2):
Repel a French invasion in the code.
Merge branch 'master' of ssh://git.fedorahosted.org/git/bodhi
Till Maas (3):
- allow update selection for rss feeds by submitter
- add RSS feed URLs to html metadata - add update feeds for a certain user to the user page
rss: allow feed selection by build
---
bodhi.egg-info/PKG-INFO | 2
bodhi.egg-info/SOURCES.txt | 1
bodhi.spec | 9
bodhi/admin.py | 6
bodhi/config/app.cfg | 12 -
bodhi/config/f13-updates-testing.mash | 19 ++
bodhi/controllers.py | 91 ++++++++-
bodhi/mail.py | 24 ++
bodhi/masher.py | 23 +-
bodhi/metrics.py | 21 +-
bodhi/model.py | 131 ++++++++++---
bodhi/release.py | 2
bodhi/rss.py | 10 -
bodhi/static/css/layout.css | 8
bodhi/templates/master.kid | 8
bodhi/templates/pending.kid | 1
bodhi/templates/show.kid | 35 ++-
bodhi/templates/user.kid | 11 +
bodhi/tests/test_controllers.py | 322 +++++++++++++++++++++++++++++++---
bodhi/tests/test_model.py | 87 ++++++++-
bodhi/tools/client.py | 47 ++++
bodhi/tools/fix_dupe_ids.py | 116 ++++++++++++
bodhi/util.py | 11 -
bodhi/validators.py | 6
bodhi/widgets.py | 2
comps/CVS/Root | 2
26 files changed, 881 insertions(+), 126 deletions(-)
---
14 years, 2 months
Changes to 'refs/tags/0.7.1'
by Luke Macken
Tag '0.7.1' created by Luke Macken <lmacken(a)redhat.com> at 2010-02-16 23:15 +0000
0.7.1
Changes since 0.7.0:
Jesse Keating (1):
Add a config for f13-updates-testing
Josh Kayse (1):
show the actual author instead of comment.author for package nvr update showing
Luke Macken (42):
Require one admin +1, and a minimum karma of +2 before pushing critical path
Strip off our group name from the comment author in a few places
Only remove the masher thread if it exists
Support passing update titles instead of PackageUpdate instances to the MashTask thread
Minor test case tweak
Use our configurable admin_groups, instea of hardcoding it
Mark emails to admins as [CRITPATH] when necessary
Send an email to releng once critical path updates get approved
Some critpath workflow changes and test improvements.
Update our comps CVS root
Use subprocess.call(..., cwd=path) instead of os.chdir
Use the tg_url method when injecting URLs in PackageUpdate.__str__
Apply a patch from Till Maas to s/http/https/ some of our URLs (#256)
Update some unit tests for the new URLs
Add the [all] link back to the pending updats list (#322)
Add a 'request' argument to our list API (#224)
Show the anonymous testers email address if we are logged in (#234)
Disallow the ability to edit an update, and add a build from a different release (#251)
Apply a patch from Toshio to use fedora.tg.util.tg_url
Detect conflicting builds when editing updates (#385)
Update newly added bugs when editing an update (#386)
Close bugs with FIXEDIN `name-version-release`, instead of just `version-release`
Create /metrics JSON API method, and a unit test
I like one liners
Apply a patch from David Timms to fix comment formatting (#290)
Float our comment image to ensure it's on the same line as the author
Have our flash_log method log to INFO instead of DEBUG
Update our critpath package list
Improve some of the output of the bodhi client, as well as code readability
More bodhi client output improvements
Don't complain about pushing critpath to stable if it's already approved
Minor rewording
Be a bit more verbose with regard to the requirements of the critpath
Some minor refactoring of our PackageUpdate.comment method
Display the critpath note to everyone, not just admins
Remove a lot of unnecessary logic for critical path in PackageUpdate.set_request
Fix a broken unit test
Spec bump, hopefully the last
0.7.1 release to fix a metrics regression
Fix a regression in our MetricsController, and add a JSON API
0.7.1
Fix our metrics JSON unit test, and add one for our flot widgets too
Till Maas (3):
- allow update selection for rss feeds by submitter
- add RSS feed URLs to html metadata - add update feeds for a certain user to the user page
rss: allow feed selection by build
---
bodhi.spec | 6
bodhi/config/app.cfg | 12 +
bodhi/config/f13-updates-testing.mash | 19 ++
bodhi/controllers.py | 47 +++++
bodhi/mail.py | 24 ++-
bodhi/masher.py | 15 -
bodhi/metrics.py | 18 +-
bodhi/model.py | 95 +++++++++---
bodhi/release.py | 2
bodhi/rss.py | 10 +
bodhi/static/css/layout.css | 8 +
bodhi/templates/master.kid | 8 -
bodhi/templates/pending.kid | 1
bodhi/templates/show.kid | 21 ++
bodhi/templates/user.kid | 11 +
bodhi/tests/test_controllers.py | 268 ++++++++++++++++++++++++++++++----
bodhi/tests/test_model.py | 6
bodhi/tools/client.py | 25 ++-
bodhi/util.py | 5
comps/CVS/Root | 2
20 files changed, 510 insertions(+), 93 deletions(-)
---
14 years, 2 months
2 commits - bodhi/controllers.py bodhi.spec
by Luke Macken
bodhi.spec | 7 +++++--
bodhi/controllers.py | 7 ++++---
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit b9c276308c7f7a708567aa2b55f06a356aff0ca5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 16:40:39 2010 -0500
0.7.2
diff --git a/bodhi.spec b/bodhi.spec
index 76893da..9c77731 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -2,8 +2,8 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: bodhi
-Version: 0.7.1
-Release: 2%{?dist}
+Version: 0.7.2
+Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
License: GPLv2+
@@ -116,6 +116,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Wed Mar 03 2010 Luke Macken <lmacken(a)redhat.com> - 0.7.2-1
+- 0.7.2 bugfix release
+
* Tue Feb 16 2010 Luke Macken <lmacken(a)redhat.com> - 0.7.1-1
- Fix a regression in our metrics controller, and unvail a new
metrics JSON API
commit 8eead0f1dae341b91ba39c62e984dabfcbc44928
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 16:40:23 2010 -0500
Minor /critpath API improvements
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 92cdc19..f5b1d5f 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1262,7 +1262,7 @@ class Root(controllers.RootController):
builds[tag] = build['nvr']
return builds
- @expose(template='bodhi.templates.list', allow_json=True)
+ @expose(template='bodhi.templates.pending', allow_json=True)
@paginate('updates', limit=1000, max_limit=1000)
def critpath(self, *args, **kw):
updates = []
@@ -1273,5 +1273,6 @@ class Root(controllers.RootController):
for release in releases]))):
if update.critpath:
updates.append(update)
- return dict(updates=updates, num_items=len(updates),
- title='Critical Path Updates')
+ num_items = len(updates)
+ return dict(updates=updates, num_items=num_items,
+ title='%d Critical Path Updates' % num_items)
14 years, 2 months
2 commits - bodhi/controllers.py bodhi/tools
by Luke Macken
bodhi/controllers.py | 14 ++++++++++++++
bodhi/tools/client.py | 15 +++++++++++++++
2 files changed, 29 insertions(+)
New commits:
commit 258aff7c899de01c863a3e03c52b39d0c0294b20
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 11:13:18 2010 -0500
Add a --critpath option to the bodhi CLI
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index d4b3677..fe1d8bf 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -86,6 +86,10 @@ def get_parser():
parser.add_option("-D", "--download", action="store", dest="download",
metavar="UPDATE", help="Download an update")
+ parser.add_option("", "--critpath", action="store_true",
+ help="Display a list of pending critical path updates",
+ dest="critpath")
+
## Details
parser.add_option("-s", "--status", action="store", type="string",
dest="status", help="List [pending|testing|stable|"
@@ -106,6 +110,7 @@ def get_parser():
parser.add_option("-L", "--latest", action="store", type="string",
dest="latest", help="List the latest builds of a "
"specific package across all releases")
+
## Output
parser.add_option("-v", "--verbose", action="store_true", dest="verbose",
help="Show debugging messages")
@@ -303,6 +308,16 @@ def main():
for dist, build in data:
log.info('%26s %s' % (dist, build))
+ elif opts.critpath:
+ log.info("Getting a list of critical path updates...")
+ data = bodhi.send_request('critpath')
+ if data['tg_flash']:
+ log.info(data['tg_flash'])
+ for update in data['updates']:
+ log.info(bodhi.update_str(update, minimal=not opts.verbose))
+ log.info("%d pending critical path updates found" % (
+ len(data['updates'])))
+
elif opts.mine and not args:
data = bodhi.query(mine=opts.mine)
for update in data['updates']:
commit eb88da77bb7f67fa5aaa596abeb055b5017f0b9d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 11:12:45 2010 -0500
Add a critpath method to our RootController
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 85f2a29..92cdc19 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1261,3 +1261,17 @@ class Root(controllers.RootController):
for build in koji.getLatestBuilds(tag, package=package):
builds[tag] = build['nvr']
return builds
+
+ @expose(template='bodhi.templates.list', allow_json=True)
+ @paginate('updates', limit=1000, max_limit=1000)
+ def critpath(self, *args, **kw):
+ updates = []
+ releases = Release.select(Release.q.locked==True)
+ for update in PackageUpdate.select(
+ AND(PackageUpdate.q.status != 'stable',
+ OR(*[PackageUpdate.q.releaseID == release.id
+ for release in releases]))):
+ if update.critpath:
+ updates.append(update)
+ return dict(updates=updates, num_items=len(updates),
+ title='Critical Path Updates')
14 years, 2 months
2 commits - bodhi/model.py bodhi/tests
by Luke Macken
bodhi/model.py | 13 +++++++------
bodhi/tests/test_controllers.py | 24 ++++++++++++++++++++++++
bodhi/tests/test_model.py | 2 +-
3 files changed, 32 insertions(+), 7 deletions(-)
New commits:
commit ab94952884f83d1f3ea8733eb079749ad8c88e47
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 13:09:42 2010 -0500
Add a unit test to ensure PackageUpdate.request_complete() works on critpath
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index d4ba4a8..7bae57a 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -1683,6 +1683,30 @@ class TestControllers(testutil.DBTest):
assert update.comments[2].author == 'bodhi', update.comments
assert update.comments[2].text == 'Critical path update approved'
+ def test_critpath_request_complete(self):
+ """
+ Ensure devs can *not* push critpath updates directly to stable
+ for pending releases
+ """
+ session = login()
+ create_release(locked=True)
+ params = {
+ 'builds' : 'kernel-2.6.31-1.fc7',
+ 'release' : 'Fedora 7',
+ 'type_' : 'bugfix',
+ 'bugs' : '',
+ 'notes' : 'foobar',
+ 'stable_karma' : 1,
+ 'request': 'stable',
+ 'unstable_karma' : -1,
+ }
+ self.save_update(params, session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.critpath
+
+ update.request_complete()
+ assert not update.request
+
def test_created_since(self):
session = login()
create_release()
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index 56f5775..6e60bcb 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -440,7 +440,7 @@ class TestPackageUpdate(testutil.DBTest):
up.status = 'testing'
up.status_comment()
assert len(up.comments) == 1
- assert up.comments[0].author == 'bodhi', up.comments[0]
+ assert 'bodhi' in up.comments[0].author, up.comments[0]
assert up.comments[0].text == 'This update has been pushed to testing'
up.status = 'stable'
up.status_comment()
commit 29573c67403483e35dec2cf12a91acf7538c2765
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 13:09:20 2010 -0500
Only automatically mark as stable if it's not stable already...
diff --git a/bodhi/model.py b/bodhi/model.py
index 014a1f5..7b36eaa 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -738,12 +738,13 @@ class PackageUpdate(SQLObject):
not self.critpath_approved):
pass
else:
- log.info("Automatically marking %s as stable" % self.title)
- self.request = 'stable'
- self.pushed = False
- #self.date_pushed = None
- mail.send(self.submitter, 'stablekarma', self)
- mail.send_admin('stablekarma', self)
+ if self.status != 'stable':
+ log.info("Automatically marking %s as stable" % self.title)
+ self.request = 'stable'
+ self.pushed = False
+ #self.date_pushed = None
+ mail.send(self.submitter, 'stablekarma', self)
+ mail.send_admin('stablekarma', self)
if self.status == 'testing' and self.unstable_karma != 0 and \
self.karma == self.unstable_karma:
14 years, 2 months
Fwd: Fight bugs, not FESCo
by Mathieu Bridon
In case some people on this list missed the thread on Fedora-Devel,
there are some rather nice ideas (or not :) for Bodhi below.
Original email:
http://lists.fedoraproject.org/pipermail/devel/2010-March/131723.html
---------- Forwarded message ----------
From: Aaron Faanes <dafrito(a)gmail.com>
Date: Mon, Mar 1, 2010 at 15:22
Subject: Fight bugs, not FESCo
To: devel(a)lists.fedoraproject.org
<snip>
Look at it this way: In a perfect scenario, every user of a package
runs every test the moment it hits updates-testing. That means that a
package only needs to stay in updates-testing for however long the
package tests take. Barely any time at all! We don't live in an ideal
world, though, but I think the formula looks something like this:
Quality of Product = Quality of Testing
Quality of Testing = Test Coverage * Number of Configurations
Configurations are your users, and coverage is depth. Coverage is also
accuracy: If I spend 30 minutes testing every preference even though
you didn't change any preferences, then I just wasted my time on your
package. The goal is to make tests easy and specific for the tester,
and you'll find more testers and better test coverage.
* Increase coverage through Bodhi
As a tester, I love Bodhi. It shows me new things to test. If I have a
list of bugs that were fixed in this build, they're all test-cases. If
I have a changelog that shows features that were added, each change is
a test-case. Unfortunately, if I have neither, then I can only really
do a smoke test. Here's a few concrete ideas to encourage better
coverage through Bodhi:
- Allow test cases to be added to Bodhi. These already exist for the
RCs, they could optionally be written by maintainers too. It doesn't
have to be formal, though. "Test the printing stuff" is sufficient.
- Integrate changelogs where available. Since these show what changed,
testers can use them to be more efficient and thorough with their
tests, increasing coverage.
- Further integrate Bugzilla and Bodhi. If I'm able to see what bugs
are open for a package through Bodhi, I can check if those bugs were
affected by the build I'm testing. I could also see if a bug is
already open for this build without having to search through Bugzilla,
increasing my efficiency.
- Tweak karma. I feel bad leaving negative karma and I shouldn't! Bug
reports are healthy. Also, positive karma is rare and subjective. I
think they should either be plain comments, or a per-user checkbox for
a given test-case.
Test cases don't have to be formal. We want maintainers and testers to
use these features, not hate them. They shouldn't get in the way. But,
if a maintainer wants users to test an area, it should be easy for him
to let users know and focus their feedback towards that area. Empower
maintainers and testers to figure out what works best.
<snip>
-- Aaron Faanes
--
----------
Mathieu Bridon
14 years, 2 months