AutoQA PUAP check-in
by Kamil Paral
Hello everyone,
here's my check-in to our Package Update Acceptance Test Plan (maybe PUATP?).
I've been playing with autotest labels lately and I've flooded this
conference with results just a moments ago, but I'll repeat a short
summary:
* Patched autoqa is in 'labels' branch
* Enumeration of our autotest labels is on our wiki ("Managing
autotest labels")
The staging autotest server and client jlaska provided was a tremendous
help, but I ran into some issues with virtual guests, so I'll have to
dig into it a little deeper and ask a lot of questions (apologies to
jlaska in advance). Mainly about networking (I studied network bridges
recently but I'm still not proficient with it), adding clients to autotest
(what must be installed), etc. I also intend to prepare a simple kickstart
script that will ease the task of preparing a new VM client and hooking
it up into autotest, because it's boring (and slow) to do it by hand.
Kamil
13 years, 2 months
ResultsDB progress
by Josef Skladanka
Hi gang,
today, I made some magic working, so i'd like to share it with you :)
So what's the deal - we want to have complete results in resultsdb, when
any exception is raised during the testrun, it's immediately stopped
(killed), and no other function (not even the postprocess) from the test
object is called.
This is obviously bad, since the information about the fail is not
propagated into the resultsdb.
The most obvious solution is to put the whole thing in try-catch block,
and if an exception is raised, store the info inside resultsdb. This not
good looking, though, so i created a decorator which catches the
exception, stores it, calls the 'trigger function' which it has as a
parameter, and after calling this function, it re-raises the exception.
You can see the usage here
<http://git.fedorahosted.org/git/?p=autoqa.git;a=blob;f=tests/initscripts/...>,
the decorator is here
<http://git.fedorahosted.org/git/?p=autoqa.git;a=blob;f=lib/python/logging...>.
This solution has one 'drawback', though - you need to have the **kwargs
parameter in the initialize & run_once functions, since the autotest
calls them with all parameters specified in the run() call in control
file, and does some nasty magic with introspection to see which
parameters to actually call the function with (e.g. not to call the
run_once with the config parameter etc). And i was not able to replicate
this behaviour, even though i know how is it done (there's probably some
other step in the autotest magic which i did not discover), so i decided
to KISS and just add the **kwargs parameter, which solves the problem.
Any comments on the decorator, it's usage in the test and resultsdb API
calls (the same library as the decorator) are appreciated.
Joza
13 years, 2 months
[AutoQA] #136: ResultsDB: Study MediaWiki RPC mechanism
by fedora-badges
#136: ResultsDB: Study MediaWiki RPC mechanism
----------------------------+-----------------------------------------------
Reporter: jskladan | Owner: wwoods
Type: task | Status: new
Priority: major | Milestone: Resultdb
Component: infrastructure | Version: 1.0
Keywords: |
----------------------------+-----------------------------------------------
We want to store metadata about tests on our wiki. To grab the information
back, we'll need a way to 'query' wiki for certain page/sub-page.
Investigate on the MediaWiki RPC mechanism and propose a way to use it.
--
Ticket URL: <https://fedorahosted.org/autoqa/ticket/136>
AutoQA <http://autoqa.fedorahosted.org>
Automated QA project
13 years, 2 months
Re: [AutoQA] #88: bodhi_utils module for autoqa lib
by fedora-badges
#88: bodhi_utils module for autoqa lib
---------------------+------------------------------------------------------
Reporter: wwoods | Owner: wwoods
Type: task | Status: closed
Priority: major | Milestone: autoqa depcheck
Component: tests | Version: 1.0
Resolution: fixed | Keywords:
---------------------+------------------------------------------------------
Changes (by wwoods):
* status: assigned => closed
* resolution: => fixed
Comment:
bodhi_utils.py committed to master.
--
Ticket URL: <https://fedorahosted.org/autoqa/ticket/88#comment:3>
AutoQA <http://autoqa.fedorahosted.org>
Automated QA project
13 years, 2 months
[PATCH 1/2] Move some useful functions from bodhi watcher to bodhi_utils.py
by Will Woods
---
hooks/post-bodhi-update/watch-bodhi-requests.py | 30 +------------
lib/python/bodhi_utils.py | 49 +++++++++++++++++++++++
2 files changed, 52 insertions(+), 27 deletions(-)
create mode 100755 lib/python/bodhi_utils.py
diff --git a/hooks/post-bodhi-update/watch-bodhi-requests.py b/hooks/post-bodhi-update/watch-bodhi-requests.py
index f1a4e6c..1df5654 100755
--- a/hooks/post-bodhi-update/watch-bodhi-requests.py
+++ b/hooks/post-bodhi-update/watch-bodhi-requests.py
@@ -55,6 +55,7 @@ import optparse
import time
import os
from autoqa.repoinfo import repoinfo
+from autoqa.bodhi_utils import bodhitime, parse_bodhitime, bodhi_list
cachedir = '/var/cache/autoqa/watch-bodhi-requests'
try:
@@ -69,32 +70,8 @@ except OSError, e:
bodhi_releases = ['F11','F12','F13']
archlist = ('i686', 'x86_64', 'noarch')
-
-def bodhitime(timestamp):
- '''Convert timestamp (seconds since Epoch, assumed to be local time) to a
- Bodhi-approved time string ('%Y-%m-%d %H:%M:%S')'''
- return time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(timestamp))
-
-def parse_bodhitime(bodhitimestr):
- '''Convert a Bodhi-approved time string ('%Y-%m-%d %H:%M:%S') to a
- float-represented number of seconds since Epoch (local time)'''
- return time.mktime(time.strptime(bodhitimestr,'%Y-%m-%d %H:%M:%S'))
-
-def bodhi_list(params, limit=100):
- '''Perform a bodhi 'list' method call, with pagination handling'''
- bodhi = fedora.client.bodhi.BodhiClient()
- params['tg_paginate_limit'] = limit
- params['tg_paginate_no'] = 1
-
- updates = list()
- num_items = 1 # this is a lie to get us in the loop
- while num_items > len(updates):
- r = bodhi.send_request('list', params)
- num_items = r['num_items']
- updates += r['updates']
- params['tg_paginate_no'] += 1
- return updates
-
+# XXX NOTE we could probably be using cPickle or something here, rather than
+# a possibly-unreliable invented encoding/decoding to save a set()
def save_update_ids(update_ids, cachefile):
try:
f = open(cachefile,'w')
@@ -103,7 +80,6 @@ def save_update_ids(update_ids, cachefile):
f.close()
except IOError, e:
print "error: failed to write %s: %s" % (cachefile, str(e))
-
def load_update_ids(cachefile):
update_ids = set()
try:
diff --git a/lib/python/bodhi_utils.py b/lib/python/bodhi_utils.py
new file mode 100755
index 0000000..cb91bf8
--- /dev/null
+++ b/lib/python/bodhi_utils.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+# bodhi_utils.py - utility functions for dealing with bodhi
+#
+# Copyright 2010, Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Authors:
+# Will Woods <wwoods(a)redhat.com>
+
+import fedora.client
+import time
+
+def bodhitime(timestamp):
+ '''Convert timestamp (seconds since Epoch, assumed to be local time) to a
+ Bodhi-approved time string ('%Y-%m-%d %H:%M:%S')'''
+ return time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(timestamp))
+
+def parse_bodhitime(bodhitimestr):
+ '''Convert a Bodhi-approved time string ('%Y-%m-%d %H:%M:%S') to a
+ float-represented number of seconds since Epoch (local time)'''
+ return time.mktime(time.strptime(bodhitimestr,'%Y-%m-%d %H:%M:%S'))
+
+def bodhi_list(params, limit=100):
+ '''Perform a bodhi 'list' method call, with pagination handling'''
+ bodhi = fedora.client.bodhi.BodhiClient()
+ params['tg_paginate_limit'] = limit
+ params['tg_paginate_no'] = 1
+
+ updates = list()
+ num_items = 1 # this is a lie to get us in the loop
+ while num_items > len(updates):
+ r = bodhi.send_request('list', params)
+ num_items = r['num_items']
+ updates += r['updates']
+ params['tg_paginate_no'] += 1
+ return updates
--
1.7.0.1
13 years, 2 months
time to merge the bodhi hook?
by Will Woods
The post-bodhi-update hook code (in my git branch) has been off in its
own branch for too long - I think it's about time to try to merge it to
master, so we can start writing tests and trying to get depcheck
working.
Is there anything missing before we're sure that the hook/watcher are
functional enough to merge? James, you've been testing the watcher - are
you satisfied that it's ready to land? Or should we try to write the
helloworld test first, to be super-sure it's ready before we merge?
Any thoughts? If nobody has any strong opinions against it, I'll attempt
to merge it tomorrow.
Thanks,
-w
13 years, 2 months
wiki: Managing autotest labels
by Kamil Paral
I have been reading through instructions how to add new autotest
clients [1] and I've seen a link there pointing to non-existent
page "Managing autotest labels". So I created it, here it is:
https://fedoraproject.org/wiki/Managing_autotest_labels
I will soon post a code that will allow us to use also additional
autotest labels in AutoQA, not just the platform labels. So I have
taken this opportunity and proposed on that page how the additional
labels could look like:
* fcNN
* virt_capable
* virt
Maybe we will need some more labels, I still haven't figured them
out yet (maybe "destructive" in one candidate). We can add them
in the future.
Do you have any comments on those proposed ones? Are they intuitive
or should we change them somehow? Suggestions welcome.
Thanks,
Kamil
[1] https://fedoraproject.org/wiki/How_to_add_autotest_clients
13 years, 2 months