bodhi/model.py
by Luke Macken
bodhi/model.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8e159695356bb284d4f18d6f06b9a0d7956c7f3f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Jan 26 15:18:56 2010 -0500
Use our configurable admin_groups, instea of hardcoding it
diff --git a/bodhi/model.py b/bodhi/model.py
index 3570630..9a0ecbb 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -861,7 +861,7 @@ class PackageUpdate(SQLObject):
# Hack, to get this working for F13 w/o changing the DB
if comment.author.endswith(')'):
group = comment.author[:-1].split('(')[-1]
- if group in ('qa', 'releng'):
+ if group in config.get('admin_groups', 'qa releng').split():
approvals += 1
return approvals
14 years, 3 months
Branch 'tg2' - bodhi/bodhi
by Luke Macken
bodhi/bodhi/model/model.py | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 6b1c74ea59e351827e51063ede5c1da01b028534
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Jan 26 10:19:51 2010 -0500
Add a timestamp column to our Comment model
diff --git a/bodhi/bodhi/model/model.py b/bodhi/bodhi/model/model.py
index 3012f8d..b89ffdd 100644
--- a/bodhi/bodhi/model/model.py
+++ b/bodhi/bodhi/model/model.py
@@ -771,6 +771,7 @@ class Comment(DeclarativeBase):
text = Column(UnicodeText)
anonymous = Column(Boolean, default=False)
update_id = Column('update_id', Integer, ForeignKey('updates.id'))
+ timestamp = Column(DateTime, default=datetime.utcnow)
def __str__(self):
karma = '0'
14 years, 3 months
[TG2] Release announce list
by Josh Kayse
I noticed that in development.ini there are variables for
fedora_announce_list etc, why not move those to be a field of the
release rather than a variable? That way it is more easily tweaked.
Thoughts?
PS: I hope to get some coding for the TG2 branch this weekend.
-josh
--
A: No.
Q: Should I include quotations after my reply?
Don't top post: see http://www.caliburn.nl/topposting.html for more.
14 years, 3 months
3 commits - bodhi/masher.py bodhi/tests
by Luke Macken
bodhi/masher.py | 5 ++++-
bodhi/tests/test_model.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 8bc40b239e5525dce21d60b528c250a306538738
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 22 09:26:21 2010 -0500
Minor test case tweak
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index f2c802f..c84fcaa 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -420,7 +420,7 @@ class TestPackageUpdate(testutil.DBTest):
up.status = 'testing'
up.status_comment()
assert len(up.comments) == 1
- assert up.comments[0].author == 'bodhi'
+ assert up.comments[0].author == 'bodhi', up.comments[0]
assert up.comments[0].text == 'This update has been pushed to testing'
up.status = 'stable'
up.status_comment()
commit 49a464593f20cb29ecc44251cc3d6e520548a7a4
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 22 09:25:55 2010 -0500
Support passing update titles instead of PackageUpdate instances to the MashTask thread
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 9b3edf0..97ccacb 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -167,6 +167,8 @@ class MashTask(Thread):
self.id = id
self.tag = None
self.updates = set()
+ if isinstance(updates[0], basestring):
+ updates = map(PackageUpdate.byTitle, updates)
map(self.updates.add, updates)
if self.updates:
up = self.updates.pop()
commit 40b27aff2202bcb0443a56a5f7ad2c11b37baa0c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 22 09:25:37 2010 -0500
Only remove the masher thread if it exists
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 6ae1ee6..9b3edf0 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -91,7 +91,8 @@ class Masher(object):
self.last_log = thread.log
mail.send_releng('Bodhi Masher Report %s' %
time.strftime("%y%m%d.%H%M"), thread.report())
- self._threads.remove(thread)
+ if thread in self._threads:
+ self._threads.remove(thread)
del thread
if len(self._threads) == 0:
if len(self._queue):
14 years, 3 months
Branch 'tg2' - bodhi/bodhi
by Luke Macken
bodhi/bodhi/mail.py | 2 +-
bodhi/bodhi/model/model.py | 31 +++++++++++++++++--------------
bodhi/bodhi/tests/models/test_model.py | 11 ++++++-----
3 files changed, 24 insertions(+), 20 deletions(-)
New commits:
commit 64a46c38cd8b20b8a021d5939528f7ecda76cfbe
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 22 09:15:58 2010 -0500
Fix a bug with our Bug model
diff --git a/bodhi/bodhi/mail.py b/bodhi/bodhi/mail.py
index 470bd92..1468165 100644
--- a/bodhi/bodhi/mail.py
+++ b/bodhi/bodhi/mail.py
@@ -354,7 +354,7 @@ def get_template(update, use_template='fedora_errata_template'):
bug.title != 'Invalid bug number') and \
' - %s' % bug.title or ''
info['references'] += u" [ %d ] Bug #%d%s\n %s\n" % \
- (i, bug.bz_id, title, bug.get_url())
+ (i, bug.bug_id, title, bug.get_url())
i += 1
for cve in update.cves:
info['references'] += u" [ %d ] %s\n %s\n" % \
diff --git a/bodhi/bodhi/model/model.py b/bodhi/bodhi/model/model.py
index 9aaf4f3..3012f8d 100644
--- a/bodhi/bodhi/model/model.py
+++ b/bodhi/bodhi/model/model.py
@@ -580,16 +580,19 @@ class Update(DeclarativeBase):
if not config.get('bodhi_email'):
log.warning("No bodhi_email defined; not fetching bug details")
fetchdetails = False
+ to_remove = []
for bug in self.bugs:
if bug.bug_id not in bugs:
+ to_remove.append(bug)
+ if to_remove:
+ for bug in to_remove:
self.bugs.remove(bug)
if len(bug.updates) == 0:
log.debug("Destroying stray Bugzilla #%d" % bug.bug_id)
DBSession.delete(bug)
for bug in bugs:
- try:
- bz = Bug.query.filter_by(bug_id=bug).one()
- except: # TODO: Catch sqlalchemy's not found exception
+ bz = DBSession.query(Bug).filter_by(bug_id=bug).first()
+ if not bz:
if fetchdetails:
bugzilla = Bug.get_bz()
newbug = bugzilla.getbug(bug)
@@ -600,7 +603,7 @@ class Update(DeclarativeBase):
if bz not in self.bugs:
self.bugs.append(bz)
DBSession.save(bz)
- DBSession.flush()
+ DBSession.flush()
def update_cves(self, cves):
"""
@@ -838,7 +841,7 @@ class Bug(DeclarativeBase):
if not bug:
bz = Bugzilla.get_bz()
try:
- bug = bz.getbug(self.bz_id)
+ bug = bz.getbug(self.bug_id)
except xmlrpclib.Fault, f:
self.title = 'Invalid bug number'
log.warning("Got fault from Bugzilla: %s" % str(f))
@@ -870,12 +873,12 @@ class Bug(DeclarativeBase):
bz = Bugzilla.get_bz()
if not comment:
comment = self._default_message(update)
- log.debug("Adding comment to Bug #%d: %s" % (self.bz_id, comment))
+ log.debug("Adding comment to Bug #%d: %s" % (self.bug_id, comment))
try:
- bug = bz.getbug(self.bz_id)
+ bug = bz.getbug(self.bug_id)
bug.addcomment(comment)
except Exception, e:
- log.error("Unable to add comment to bug #%d\n%s" % (self.bz_id,
+ log.error("Unable to add comment to bug #%d\n%s" % (self.bug_id,
str(e)))
def testing(self, update):
@@ -885,25 +888,25 @@ class Bug(DeclarativeBase):
"""
bz = Bugzilla.get_bz()
comment = self._default_message(update)
- log.debug("Setting Bug #%d to ON_QA" % self.bz_id)
+ log.debug("Setting Bug #%d to ON_QA" % self.bug_id)
try:
- bug = bz.getbug(self.bz_id)
+ bug = bz.getbug(self.bug_id)
bug.setstatus('ON_QA', comment=comment)
except Exception, e:
- log.error("Unable to alter bug #%d\n%s" % (self.bz_id, str(e)))
+ log.error("Unable to alter bug #%d\n%s" % (self.bug_id, str(e)))
def close_bug(self, update):
bz = Bugzilla.get_bz()
try:
ver = '-'.join(get_nvr(update.builds[0].nvr)[-2:])
- bug = bz.getbug(self.bz_id)
+ bug = bz.getbug(self.bug_id)
bug.close('NEXTRELEASE', fixedin=ver)
except xmlrpclib.Fault, f:
- log.error("Unable to close bug #%d: %s" % (self.bz_id, str(f)))
+ log.error("Unable to close bug #%d: %s" % (self.bug_id, str(f)))
# TODO: remove this
def get_url(self):
- return "https://bugzilla.redhat.com/show_bug.cgi?id=%s" % self.bz_id
+ return "https://bugzilla.redhat.com/show_bug.cgi?id=%s" % self.bug_id
# TODO; put this somewhere else!
diff --git a/bodhi/bodhi/tests/models/test_model.py b/bodhi/bodhi/tests/models/test_model.py
index b82ecb7..1a0476f 100644
--- a/bodhi/bodhi/tests/models/test_model.py
+++ b/bodhi/bodhi/tests/models/test_model.py
@@ -252,18 +252,19 @@ class TestUpdate(ModelTest):
def test_update_bugs(self):
update = self.obj
+ eq_(len(update.bugs), 2)
# try just adding bugs
bugs = ['1234']
update.update_bugs(bugs)
eq_(len(update.bugs), 1)
- eq_(update.bugs[0].bz_id, 1234)
+ eq_(update.bugs[0].bug_id, 1234)
# try just removing
bugs = []
update.update_bugs(bugs)
- assert len(update.bugs) == 0
- eq_(model.DBSession.query(model.Bugzilla).filter_by(bz_id=1234).first(), None)
+ eq_(len(update.bugs), 0)
+ eq_(model.DBSession.query(model.Bug).filter_by(bug_id=1234).first(), None)
# Test new duplicate bugs
bugs = ['1234', '1234']
@@ -274,7 +275,7 @@ class TestUpdate(ModelTest):
bugs = ['4321']
update.update_bugs(bugs)
assert len(update.bugs) == 1
- assert update.bugs[0].bz_id == 4321
- eq_(model.DBSession.query(model.Bugzilla).filter_by(bz_id=1234).first(), None)
+ assert update.bugs[0].bug_id == 4321
+ eq_(model.DBSession.query(model.Bug).filter_by(bug_id=1234).first(), None)
# test multibuild update
14 years, 3 months
Changes to 'tg2'
by Luke Macken
New branch 'tg2' available with the following commits:
commit c50bcbc125c5b1c6e2bd2d5bd1f5efd6b357382e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 22 08:40:14 2010 -0500
Add the old mail module
commit e0f7f93c2a92ea882671634e001983e1962a9000
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 22 08:39:56 2010 -0500
More model improvements & test cases
commit 8720feafaed8a2031b129fc3762ddbdf1f4265cf
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 22 08:37:51 2010 -0500
Enable the new TurboMail in our globals
commit 2f03d4b402d1878d29b9bee48cd899d143fa6aff
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 22 08:37:36 2010 -0500
Remove some irrelevant test cases
commit 557452d8b1c17b3521f840244a87c9ab16102f43
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Nov 5 10:23:59 2009 -0500
Get the Update.assign_id method ported to SQLAlchemy, and get the tests working
commit c05d247cbdfe03d21c81f072400ac43b9884357d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Nov 5 10:23:46 2009 -0500
Have bodhi.util.header return a unicode string
commit 9719c477069bdc9dfe404136c9749b188fa86122
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Nov 5 10:23:31 2009 -0500
s/type/type_/
commit 4532a6809ff4e2c1fec05a97f89a61b05f114223
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Nov 5 10:23:17 2009 -0500
More model tweaks
commit 2471e8245f20139ae7499c1762445e34f5aba73c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Nov 5 10:22:50 2009 -0500
Get the Update.__str__ working
commit 003ebc9de5d1880a1f98970c5d54dd433d886828
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 19 07:17:55 2009 -0400
More model improvements & tests
commit bccd089e74a6a4e130f7a0b8be70cc8815cf734b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Oct 16 17:46:28 2009 -0400
Initial commit of bodhi v2.0 TG2 quickstart, SQLAlchemy model, and tests
commit 51e05d9b2d2a97c616f479c2f7a37567eafe2974
Merge: b64602eb55e22b45658c858d8de03c208dc0556c 11630abc65822c1e75ad5ee1dc30ed8fc77fd7dc
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 15 05:21:10 2009 -0400
Merge branch 'master' into tg2
commit b64602eb55e22b45658c858d8de03c208dc0556c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 12 10:57:29 2009 -0400
Remove the egg info
commit 49321550ad7ac4a0f3c16e9a2c9cd46823df6e61
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 12 10:56:18 2009 -0400
Move the old bodhi code out of the way
14 years, 3 months
bodhi/metrics.py bodhi/model.py
by Luke Macken
bodhi/metrics.py | 6 +++---
bodhi/model.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 9dfa6f594a6e643ab8a267238c025d9f43cdad8d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Jan 20 10:45:44 2010 -0500
Strip off our group name from the comment author in a few places
diff --git a/bodhi/metrics.py b/bodhi/metrics.py
index 0c0c529..a7e504f 100644
--- a/bodhi/metrics.py
+++ b/bodhi/metrics.py
@@ -290,9 +290,9 @@ class TopTestersMetric(Metric):
for comment in update.comments:
if comment.author == 'bodhi' or comment.karma == 0:
continue
- if not self.data.has_key(comment.author):
- self.data[comment.author] = 0
- self.data[comment.author] += 1
+ if not self.data.has_key(comment.author.split()[0]):
+ self.data[comment.author.split()[0]] = 0
+ self.data[comment.author.split()[0]] += 1
def done(self):
items = self.data.items()
diff --git a/bodhi/model.py b/bodhi/model.py
index e25ab34..3570630 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -731,7 +731,7 @@ class PackageUpdate(SQLObject):
for comment in self.comments:
if comment.anonymous or comment.author == 'bodhi':
continue
- people.add(comment.author)
+ people.add(comment.author.split()[0])
mail.send(people, 'comment', self)
def unpush(self):
14 years, 3 months
bodhi/config bodhi/model.py bodhi/templates bodhi/tests
by Luke Macken
bodhi/config/app.cfg | 6 ++
bodhi/model.py | 42 +++++++++++++++++--
bodhi/templates/show.kid | 6 +-
bodhi/tests/test_controllers.py | 85 ++++++++++++++++++++++++++++++++++++----
4 files changed, 124 insertions(+), 15 deletions(-)
New commits:
commit 4a9336f4b911d52843b6e6ee3f86b4fc31c39a75
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Jan 20 10:37:51 2010 -0500
Require one admin +1, and a minimum karma of +2 before pushing critical path
packages to pending releases.
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 2c94f87..317d7b5 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -74,7 +74,7 @@ release_team_address = None
security_team = None
# Superuser groups
-admin_groups = 'releng security_respons cvsadmin'
+admin_groups = 'releng security_respons cvsadmin qa'
# Where do we send update announcements to ?
# These variables should be named per: Release.prefix_id.lower()_announce_list
@@ -155,6 +155,10 @@ tgcaptcha.key = 'Y`h`f&s}TZz'
## http://kojipkgs.fedoraproject.org/mash/rawhide-20100107/logs/critpath.txt
critpath = "ConsoleKit ConsoleKit-libs ConsoleKit-x11 DeviceKit-power GConf2 GConf2-gtk MAKEDEV ModemManager NetworkManager NetworkManager-glib ORBit2 acl alsa-lib anaconda anaconda-yum-plugins at-spi atk attr audit audit-libs authconfig authconfig-gtk avahi avahi-autoipd avahi-glib basesystem bash binutils bluecurve-cursor-theme bzip2 bzip2-libs c-ares ca-certificates cairo checkpolicy chkconfig cloog-ppl compat-db47 comps-extras constantine-backgrounds constantine-backgrounds-single control-center control-center-filesystem coreutils coreutils-libs cpio cpp cracklib cracklib-dicts cracklib-python createrepo cronie cronie-anacron crontabs cryptsetup-luks cryptsetup-luks-libs cups-libs curl cyrus-sasl cyrus-sasl-lib dash db4 db4-utils dbus dbus-glib dbus-libs dbus-python dbus-x11 deltarpm desktop-backgrounds-basic desktop-file-utils device-mapper device-mapper-event device-mapper-event-libs device-mapper-libs dhclient diffutils dmidecode dmraid dmraid-events dnsmasq dosfstools dracut e2fsprogs e2fsprogs-libs efibootmgr eggdbus elfutils elfutils-libelf elfutils-libs ethtool evolution-data-server expat fedora-gnome-theme fedora-icon-theme fedora-logos fedora-release fedora-setup-keyboard file file-libs filesystem findutils fipscheck fipscheck-lib firstboot flac fontconfig freetype gamin gawk gcc gcc-c++ gdbm gdm genisoimage glib2 glibc glibc-common glibc-devel glibc-headers gmp gnome-desktop gnome-icon-theme gnome-keyring gnome-keyring-pam gnome-menus gnome-panel-libs gnome-python2 gnome-python2-canvas gnome-python2-gnome gnome-python2-gnomevfs gnome-session gnome-settings-daemon gnome-themes gnome-vfs2 gnupg2 gnutls gpgme grep grub grubby gstreamer gstreamer-tools gtk2 gtk2-engines gzip hal hal-info hal-libs hdparm hesiod hicolor-icon-theme hostname hwdata info initscripts iptables iptables-ipv6 iputils iscsi-initiator-utils iso-codes isomd5sum jasper-libs kbd kernel kernel-headers keyutils-libs koji kpartx krb5-libs less libICE libIDL libSM libX11 libX11-common libXScrnSaver libXau libXcomposite libXcursor libXdamage libXdmcp libXext libXfixes libXfont libXft libXi libXinerama libXmu libXrandr libXrender libXres libXt libXtst libXv libXvMC libXxf86misc libXxf86vm libacl libart_lgpl libasyncns libattr libblkid libbonobo libbonoboui libcanberra libcanberra-gtk2 libcap libcap-ng libcom_err libcroco libcurl libdaemon libdrm libedit libffi libfontenc libgail-gnome libgcc libgcrypt libglade2 libgnome libgnomecanvas libgnomekbd libgnomeui libgomp libgpg-error libgsf libgudev1 libgweather libical libidn libjpeg libmcpp libnl libnotify libogg libpcap libpciaccess libpng libproxy libproxy-bin libproxy-python librsvg2 libselinux libselinux-python libselinux-utils libsemanage libsepol libsndfile libsoup libss libssh2 libstdc++ libstdc++-devel libtasn1 libtdb libthai libtiff libtool-ltdl libudev libusb libuser libuser-python libutempter libuuid libvorbis libwnck libx86 libxcb libxkbfile libxklavier libxml2 libxml2-python libxslt linux-firmware livecd-tools logrotate lua lvm2 lvm2-libs lzma lzma-libs m4 makebootfat mash mcpp mdadm metacity mingetty mobile-broadband-provider-info module-init-tools mpfr mtools mysql-libs nash ncurses ncurses-base ncurses-libs net-tools newt newt-python notification-daemon notification-daemon-engine-slider nspr nss nss-softokn nss-softokn-freebl nss-sysinit nss-util ntp ntpdate openldap openssh openssh-clients openssh-server openssl pam pango parted passwd patch pciutils-libs pcre perl perl-Crypt-PasswdMD5 perl-Digest-SHA1 perl-Module-Pluggable perl-Pod-Escapes perl-Pod-Simple perl-libs perl-version pinentry pixman pkgconfig plymouth plymouth-gdm-hooks plymouth-libs plymouth-scripts plymouth-utils pm-utils policycoreutils polkit polkit-desktop-policy polkit-gnome popt postfix ppl ppp procmail procps psmisc pth pulseaudio-gdm-hooks pulseaudio-libs pulseaudio-libs-glib2 pungi pyOpenSSL pycairo pygobject2 pygpgme pygtk2 pygtk2-libglade pykickstart pyparted python python-bugzilla python-cryptsetup python-decorator python-deltarpm python-ethtool python-imgcreate python-iniparse python-kid python-krbV python-libs python-meh python-nss python-pyblock python-pycurl python-slip python-urlgrabber pyxf86config radeontool rarian rarian-compat readline redhat-menus redhat-rpm-config repoview rootfiles rpm rpm-build rpm-libs rpm-python rsyslog sed selinux-policy selinux-policy-targeted sendmail setserial setup setuptool sgml-common sgpio shadow-utils shared-mime-info slang sound-theme-freedesktop sqlite squashfs-tools startup-notification sudo sysklogd syslinux system-config-date system-config-firewall-base system-config-keyboard system-config-users sysvinit-tools tar tcp_wrappers-libs tzdata udev unique unzip upstart usermode usermode-gtk ustr util-linux-ng vbetool vim-minimal which wpa_supplicant xcb-util xdg-utils xkeyboard-config xml-common xorg-x11-drivers xorg-x11-drv-acecad xorg-x11-drv-aiptek xorg-x11-drv-apm xorg-x11-drv-ast xorg-x11-drv-ati xorg-x11-drv-cirrus xorg-x11-drv-dummy xorg-x11-drv-elographics xorg-x11-drv-evdev xorg-x11-drv-fbdev xorg-x11-drv-fpit xorg-x11-drv-geode xorg-x11-drv-glint xorg-x11-drv-hyperpen xorg-x11-drv-i128 xorg-x11-drv-i740 xorg-x11-drv-intel xorg-x11-drv-keyboard xorg-x11-drv-mach64 xorg-x11-drv-mga xorg-x11-drv-mouse xorg-x11-drv-mutouch xorg-x11-drv-neomagic xorg-x11-drv-nouveau xorg-x11-drv-nv xorg-x11-drv-openchrome xorg-x11-drv-penmount xorg-x11-drv-r128 xorg-x11-drv-rendition xorg-x11-drv-s3virge xorg-x11-drv-savage xorg-x11-drv-siliconmotion xorg-x11-drv-sis xorg-x11-drv-sisusb xorg-x11-drv-synaptics xorg-x11-drv-tdfx xorg-x11-drv-trident xorg-x11-drv-v4l xorg-x11-drv-vesa xorg-x11-drv-vmmouse xorg-x11-drv-vmware xorg-x11-drv-void xorg-x11-drv-voodoo xorg-x11-drv-wacom xorg-x11-server-Xorg xorg-x11-server-common xorg-x11-server-utils xorg-x11-xauth xorg-x11-xinit xorg-x11-xkb-utils xz xz-libs yum yum-metadata-parser yum-utils zenity zlib"
+# The number of admin approvals it takes to be able to push a critical path
+# update to stable for a pending release.
+critpath.num_admin_approvals = 1
+critpath.min_karma = 2
# The commented out values below are the defaults
diff --git a/bodhi/model.py b/bodhi/model.py
index 3428379..e25ab34 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -410,10 +410,14 @@ class PackageUpdate(SQLObject):
# [No Frozen Rawhide] Disable pushing critical path updates for
# pending releases directly to stable.
if action == 'stable' and self.release.locked and self.critpath:
- if ('releng' in identity.current.groups or
- 'qa' in identity.current.groups):
- self.comment('Critical path update approved by %s' %
- identity.current.user_name, author='bodhi')
+ admin_groups = config.get('admin_groups', 'qa releng').split()
+ for group in identity.current.groups:
+ if group in admin_groups:
+ if not self.critpath_approved:
+ action = 'testing'
+ self.comment('Critical path update approved',
+ author=identity.current.user_name)
+ break
else:
log.info('Forcing critical path update into testing')
action = 'testing'
@@ -683,6 +687,14 @@ class PackageUpdate(SQLObject):
as stable. If it reaches the 'unstable_karma', it is unpushed.
"""
if not author: author = identity.current.user_name
+
+ # Hack: Add admin groups to usernames (eg: "lmacken (releng)")
+ admin_groups = config.get('admin_groups', 'releng qa security_respons').split()
+ for group in identity.current.groups:
+ if group in admin_groups:
+ author += ' (%s)' % group
+ break
+
if not anonymous and karma != 0 and \
not filter(lambda c: c.author == author and c.karma == karma,
self.comments):
@@ -706,6 +718,7 @@ class PackageUpdate(SQLObject):
log.info("Automatically unpushing %s" % self.title)
self.obsolete()
mail.send(self.submitter, 'unstable', self)
+
Comment(text=text, karma=karma, update=self, author=author,
anonymous=anonymous)
@@ -838,6 +851,27 @@ class PackageUpdate(SQLObject):
break
return critical
+ @property
+ def num_admin_approvals(self):
+ """ Return the number of Releng/QA approvals of this update """
+ approvals = 0
+ for comment in self.comments:
+ # FIXME:
+ # We need to actually store the groups or approvals sanely.
+ # Hack, to get this working for F13 w/o changing the DB
+ if comment.author.endswith(')'):
+ group = comment.author[:-1].split('(')[-1]
+ if group in ('qa', 'releng'):
+ approvals += 1
+ return approvals
+
+ @property
+ def critpath_approved(self):
+ """ Return whether or not this critpath update has been approved """
+ return self.num_admin_approvals >= config.get(
+ 'critpath.num_admin_approvals', 2) and \
+ self.karma >= config.get('critpath.min_karma', 2)
+
class Comment(SQLObject):
timestamp = DateTimeCol(default=datetime.utcnow)
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 2fa903b..f7c63cd 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -71,7 +71,7 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
Push to Testing
</a>
</td>
- <span py:if="update.release.locked and update.critpath">
+ <span py:if="update.release.locked and update.critpath and update.critpath_approved">
<span py:if="'qa' in tg.identity.groups or 'releng' in tg.identity.groups">
<td>
<a href="${util.url('/request/stable/%s' % update.title)}" class="list">
@@ -81,7 +81,7 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
</td>
</span>
</span>
- <span py:if="update.release.locked and not update.critpath">
+ <span py:if="update.release.locked and not update.critpath and update.critpath_approved">
<td>
<a href="${util.url('/request/stable/%s' % update.title)}" class="list">
<img src="${tg.url('/static/images/submit.png')}" border="0"/>
@@ -120,7 +120,7 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
</td>
<span py:if="update.status == 'testing'">
<span py:if="update.request == None">
- <span py:if="update.release.locked and update.critpath">
+ <span py:if="update.release.locked and update.critpath and update.critpath_approved">
<span py:if="'qa' in tg.identity.groups or 'releng' in tg.identity.groups">
<td>
<a href="${util.url('/request/stable/%s' % update.title)}" class="list">
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 4ba206e..de6755e 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -1201,7 +1201,6 @@ class TestControllers(testutil.DBTest):
assert 'TurboGears-1.0.2.2-2.fc7' in json
assert json['TurboGears-1.0.2.2-2.fc7']['notes'] == 'foobar'
-
def test_updating_build_during_edit(self):
session = login()
create_release()
@@ -1366,7 +1365,7 @@ class TestControllers(testutil.DBTest):
}
self.save_update(params, session)
update = PackageUpdate.byTitle(params['builds'])
- assert update.request == 'stable'
+ assert update.request == 'testing'
def test_critpath_to_frozen_release_available_actions(self):
"""
@@ -1398,11 +1397,12 @@ class TestControllers(testutil.DBTest):
update = PackageUpdate.byTitle(params['builds'])
assert update.request == 'testing'
- def test_critpath_to_frozen_release_available_actions_for_releng(self):
+ def test_critpath_to_pending_release_num_approved_comments(self):
"""
Ensure releng/qa can push critpath updates to stable for pending releases
+ after 1 releng/qa karma, and 1 other karma
"""
- session = login(group='releng')
+ releng = login(group='releng')
create_release(locked=True)
params = {
'builds' : 'kernel-2.6.31-1.fc7',
@@ -1414,14 +1414,62 @@ class TestControllers(testutil.DBTest):
'request': None,
'unstable_karma' : -1,
}
- self.save_update(params, session)
+ self.save_update(params, releng)
update = PackageUpdate.byTitle(params['builds'])
testutil.create_request('/updates/%s' % params['builds'],
- method='GET', headers=session)
+ method='GET', headers=releng)
+ # Ensure releng/QA can't push critpath updates alone
assert "Push to Testing" in cherrypy.response.body[0]
+ assert "Push Critical Path update to Stable" not in cherrypy.response.body[0]
+
+ # Have a developer +1 the update
+ developer = login(username='bob')
+ testutil.create_request('/updates/comment?text=foobar&title=%s&karma=1' %
+ params['builds'], method='POST', headers=developer)
+ testutil.create_request('/updates/%s' % params['builds'],
+ method='GET', headers=developer)
+ assert "Push Critical Path update to Stable" not in cherrypy.response.body[0]
+ update = PackageUpdate.byTitle(params['builds'])
+ assert not update.request
+ assert len(update.comments) == 1
+ assert update.comments[0].author == 'bob'
+
+ # Have another developer +1 it, so it gets up to +2
+ # Ensure we can't push it to stable, until we get admin approval
+ testutil.create_request('/updates/comment?text=foobar&title=%s&karma=1' %
+ params['builds'], method='POST',
+ headers=login(username='foobar'))
+ testutil.create_request('/updates/%s' % params['builds'],
+ method='GET', headers=login(username='foobar'))
+ assert "Push Critical Path update to Stable" not in cherrypy.response.body[0]
+ update = PackageUpdate.byTitle(params['builds'])
+ assert not update.request
+ assert update.karma == 2
+
+ # Have releng try again, and ensure it can be pushed to stable
+ testutil.create_request('/updates/comment?text=foobar&title=%s&karma=1' %
+ params['builds'], method='POST', headers=releng)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert not update.request
+
+ testutil.create_request('/updates/%s' % params['builds'],
+ method='GET', headers=developer)
+ assert "Push Critical Path update to Stable" not in cherrypy.response.body[0]
+
+ testutil.create_request('/updates/%s' % params['builds'],
+ method='GET', headers=releng)
+ update = PackageUpdate.byTitle(params['builds'])
+ print update.comments
assert "Push Critical Path update to Stable" in cherrypy.response.body[0]
+ testutil.create_request('/updates/request/stable/%s' %
+ params['builds'], method='POST',
+ headers=releng)
+
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request == 'stable'
+
def test_critpath_to_frozen_release_testing(self):
"""
Ensure devs can *not* push critpath updates directly to stable
@@ -1506,7 +1554,30 @@ class TestControllers(testutil.DBTest):
testutil.create_request('/updates/%s' % params['builds'],
method='GET', headers=session)
- assert "Mark Critical Path update as Stable" in cherrypy.response.body[0]
+ assert "Mark Critical Path update as Stable" not in cherrypy.response.body[0]
+
+ testutil.create_request('/updates/comment?text=foobar&title=%s&karma=1' %
+ params['builds'], method='POST', headers=session)
+
+ testutil.create_request('/updates/%s' % params['builds'],
+ method='GET', headers=session)
+
+ assert "Mark Critical Path update as Stable" not in cherrypy.response.body[0]
+
+ testutil.create_request('/updates/comment?text=foobar&title=%s&karma=1' %
+ params['builds'], method='POST',
+ headers=login(username='bob'))
+
+ update = PackageUpdate.byTitle(params['builds'])
+ assert len(update.comments) == 2
+ assert update.comments[1].author == 'bob', update.comments
+
+ testutil.create_request('/updates/%s' % params['builds'],
+ method='GET', headers=session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.comments[0].author == 'guest (qa)'
+
+ assert "Mark Critical Path update as Stable" in cherrypy.response.body[0], cherrypy.response.body[0]
def test_created_since(self):
session = login()
14 years, 3 months
2 commits - bodhi/config bodhi.egg-info/PKG-INFO bodhi.egg-info/SOURCES.txt bodhi/release.py bodhi.spec
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.egg-info/SOURCES.txt | 3 +++
bodhi.spec | 10 +++++++++-
bodhi/config/f11-updates-testing.mash | 2 +-
bodhi/config/f11-updates.mash | 2 +-
bodhi/config/f12-updates-testing.mash | 17 +++++++++++++++++
bodhi/config/f12-updates.mash | 17 +++++++++++++++++
bodhi/release.py | 2 +-
8 files changed, 50 insertions(+), 5 deletions(-)
New commits:
commit aa8444d6d5f85d514b79b7170ed9067141380e8a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jan 18 16:19:33 2010 -0500
0.7.0 release, prepping and staging for Fedora 13
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index bfe0150..b44e17e 100644
--- a/bodhi.egg-info/PKG-INFO
+++ b/bodhi.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: bodhi
-Version: 0.6.11
+Version: 0.7.0
Summary: Bodhi is a modular web-system that facilitates the process of publishing updates for a Fedora-based software distribution
Home-page: https://fedorahosted.org/bodhi
Author: Luke Macken
diff --git a/bodhi.egg-info/SOURCES.txt b/bodhi.egg-info/SOURCES.txt
index 25a2421..c579c72 100644
--- a/bodhi.egg-info/SOURCES.txt
+++ b/bodhi.egg-info/SOURCES.txt
@@ -47,6 +47,8 @@ bodhi/config/f10-updates-testing.mash
bodhi/config/f10-updates.mash
bodhi/config/f11-updates-testing.mash
bodhi/config/f11-updates.mash
+bodhi/config/f12-updates-testing.mash
+bodhi/config/f12-updates.mash
bodhi/config/f7-updates-testing.mash
bodhi/config/f7-updates.mash
bodhi/config/f8-updates-testing.mash
@@ -101,6 +103,7 @@ bodhi/static/images/revoke.png
bodhi/static/images/rss.png
bodhi/static/images/security.png
bodhi/static/images/shadow.png
+bodhi/static/images/shadow2-big.png
bodhi/static/images/shadow2.png
bodhi/static/images/stable-large.png
bodhi/static/images/submit.png
diff --git a/bodhi.spec b/bodhi.spec
index 1749cde..663ba19 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -2,7 +2,7 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: bodhi
-Version: 0.6.11
+Version: 0.7.0
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -116,6 +116,14 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Mon Jan 18 2010 Luke Macken <lmacken(a)redhat.com> - 0.7.0-1
+- 0.7.0 release, prepping for the F13 release
+- Critical Path & No Frozen Rawhide proposals implemented
+- Many other bugfixes, enhancements, and optimizations
+
+* Fri Nov 06 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.12-1
+- 0.6.12, for F12
+
* Sat Sep 19 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.11-1
- 0.6.11
diff --git a/bodhi/release.py b/bodhi/release.py
index 46b243c..f8d1b84 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.6.11'
+VERSION = '0.7.0'
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 d4df237b513c6b5bad2179c11ab4f3e74b625135
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jan 18 16:13:10 2010 -0500
Update our mash configurations for F12
diff --git a/bodhi/config/f11-updates-testing.mash b/bodhi/config/f11-updates-testing.mash
index 72289e0..d3099fd 100644
--- a/bodhi/config/f11-updates-testing.mash
+++ b/bodhi/config/f11-updates-testing.mash
@@ -14,4 +14,4 @@ repoviewurl = http://download.fedoraproject.org/pub/fedora/linux/updates/testing
repoviewtitle = "Fedora 11 Updates Testing - %(arch)s"
arches = i386 x86_64 ppc ppc64
delta = True
-delta_dirs = /pub/fedora/linux/releases/11/Everything,/mnt/koji/mash/updates/f11-updates
+delta_dirs = /pub/fedora/linux/releases/11/Everything/%(arch)s/os/,/mnt/koji/mash/updates/f11-updates/%(arch)s/
diff --git a/bodhi/config/f11-updates.mash b/bodhi/config/f11-updates.mash
index 3f6a00f..d4879d1 100644
--- a/bodhi/config/f11-updates.mash
+++ b/bodhi/config/f11-updates.mash
@@ -14,4 +14,4 @@ repoviewurl = http://download.fedoraproject.org/pub/fedora/linux/updates/11/%(ar
repoviewtitle = "Fedora 11 Updates - %(arch)s"
arches = i386 x86_64 ppc ppc64
delta = True
-delta_dirs = /pub/fedora/linux/releases/11/Everything,/mnt/koji/mash/updates/f11-updates
+delta_dirs = /pub/fedora/linux/releases/11/Everything/%(arch)s/os/,/mnt/koji/mash/updates/f11-updates/%(arch)s/
diff --git a/bodhi/config/f12-updates-testing.mash b/bodhi/config/f12-updates-testing.mash
new file mode 100644
index 0000000..abd8345
--- /dev/null
+++ b/bodhi/config/f12-updates-testing.mash
@@ -0,0 +1,17 @@
+# mash config file
+
+[f12-updates-testing]
+rpm_path = %(arch)s/
+source_path = SRPMS/
+debuginfo = True
+multilib = True
+multilib_method = devel
+tag = dist-f12-updates-testing
+inherit = False
+strict_keys = True
+keys = 57BBCCBA
+repoviewurl = http://download.fedoraproject.org/pub/fedora/linux/updates/testing/12/%(a...
+repoviewtitle = "Fedora 12 Updates Testing - %(arch)s"
+arches = i386 x86_64 ppc ppc64
+delta = True
+delta_dirs = /pub/fedora/linux/releases/12/Everything/%(arch)s/os/,/mnt/koji/mash/updates/f12-updates/%(arch)s/
diff --git a/bodhi/config/f12-updates.mash b/bodhi/config/f12-updates.mash
new file mode 100644
index 0000000..cdd4d98
--- /dev/null
+++ b/bodhi/config/f12-updates.mash
@@ -0,0 +1,17 @@
+# mash config file
+
+[f12-updates]
+rpm_path = %(arch)s/
+source_path = SRPMS/
+debuginfo = True
+multilib = True
+multilib_method = devel
+tag = dist-f12-updates
+inherit = False
+strict_keys = True
+keys = 57BBCCBA
+repoviewurl = http://download.fedoraproject.org/pub/fedora/linux/updates/12/%(arch)s/
+repoviewtitle = "Fedora 12 Updates - %(arch)s"
+arches = i386 x86_64 ppc ppc64
+delta = True
+delta_dirs = /pub/fedora/linux/releases/12/Everything/%(arch)s/os/,/mnt/koji/mash/updates/f12-updates/%(arch)s/
14 years, 3 months