22 Oct
2009
22 Oct
'09
09:09
Hi, one of the topics we spoke about at our kickoff was adding package section into our Bugzilla so screening team wouldn't have so much work. One of our colleagues was working on the other way how to solve the same problem during last hackweek. His project was called 'susereport' and it can be found on gitorious.org [1]. It is basically application which allows you to generate report to the Bugzilla with right assignee. He wrote article about accessing Novell Bugzilla [2], but he didn't wrote about this program on his blog. It is written in Python, unit tests doesn't work now but program itself works. I packaged it and after build it will be available for 11.1 and Factory in home:-miska-:Release:susereport [3] repository. It can be run using following syntax: > susereport <login> <password> It requires packages osc, python-bugzilla and rpm-python. Currently the part which actually does posting to the bugzilla is commented out so it is safe to try. However bugs [4] and [5] were created using this tool. Program caches some data from Bugzilla (list of products, and such), so first call might take some additional time but program displays warning about this. Few implementation remarks. Program is implemented as a state machine. Every method do_something returns next state: > ,--> (STATE1) > (START) `--> (END) > `--> (STATE2) --> .... > > Code: > do_START(self): > if something: > return "STATE1" > return "STATE2" > > do_STATE1(self): > print "STATE1" > return "END" > > do_STATE2(self): > .... And how does it work with pre-filled answers in debug mode: > Loggining to the novell bugzilla > DEBUG:susereport:STATE: START > Please enter the name of the package in which you have found a problem. > > ant > DEBUG:susereport:STATE: TEST_PACKAGE_EMPTY > DEBUG:susereport:STATE: ASK_PRODUCT_PLATFORM > Found: openSUSE 11.2 RC 1 (x86_64) > > Enter a version of openSUSE/product. Type `s' if you want to select a product > from a list [openSUSE 11.2]: s > DEBUG:susereport:STATE: SELECT_PRODUCT_PLATFORM > Select a product: > 1. openSUSE 10.2 openSUSE 10.2 (Basilisk Lizard) > 2. openSUSE 10.3 openSUSE 10.3 > 3. openSUSE 11.0 openSUSE 11.0 > 4. openSUSE 11.1 openSUSE 11.1 > 5. openSUSE 11.2 openSUSE 11.2 > 6. openSUSE.org The openSUSE project (not the distribution) > 7. SUSE Show all SUSE products > 8. All Show all Novell products > What product do you want to use? 5 > DEBUG:susereport:STATE: SELECT_PLATFORM > DEBUG:susereport:TO_BE_IMPLEMENTED > Enter a platform All > DEBUG:susereport:STATE: TEST_PRODUCT_PLATFORM > DEBUG:susereport:STATE: GET_COMPONENT > Select a component: > 1. Apache > 2. AppArmor > 3. AutoYaST > 4. Banshee > 5. Basesystem > 6. Bootloader > 7. Commercial > 8. Compiz > 9. Development > 10. Documentation > 11. Evolution > 12. Firefox > 13. GNOME > 14. Hotplug > 15. Installation > 16. ISDN > 17. Java > 18. KDE3 > 19. KDE4 Applications > 20. KDE4 Workspace > 21. Kernel > 22. libzypp > 23. Live Medium > 24. Maintenance > 25. Mobile Devices > 26. Mono > 27. Network > 28. OpenOffice.org > 29. Other > 30. Patterns > 31. Printing > 32. Release Notes > 33. Samba > 34. SaX2 > 35. Security > 36. Sound > 37. Translations > 38. Update Problems > 39. Usability > 40. WBEM > 41. WebYaST > 42. X.Org > 43. X11 3rd Party Driver > 44. X11 Applications > 45. Xen > 46. Xfce > 47. YaST2 > What component would you like to select? 17 > Using component `Java' > DEBUG:susereport:STATE: PRE_ASK_ORIGIN > DEBUG:susereport:STATE: ASK_ORIGIN > > Would you like to determine an origin of package automatically [y/N]? y > DEBUG:susereport:STATE: LOAD_ASSIGNEE > Package `ant' is from repository `Java:packages' > DEBUG:susereport:<class > 'susereport.base.BSClient'>.get_related_persons(https://api.opensuse.org, > Java:packages, ant) > DEBUG:susereport:STATE: GET_ASSIGNEE > Enter a bug assignee [mvyskocil@novell.com]: > DEBUG:susereport:STATE: GET_SUMMARY > > > Please briefly describe your problem (you can elaborate in a moment; an empty > response will stop susereport). This should be a concise summary of > what is > wrong with the package, for example, "fails to send email" or "does > not start > with -q option specified." > > Cannot find a Java virtual machine > DEBUG:susereport:STATE: GET_SEVERITY > Please describe the impact of a bug > 1. Blocker Blocks development and/or testing work > 2. Critical Crash, loss of data, corruption of data, severe memory leak > 3. Major Major loss of function > 4. Normal regular issue, some loss of functionality under specific > circumstances > 5. Minor Issue that can be viewed as trivial (e.g. cosmetic, UI, easily > documented > 6. Enhancement Request for enhancement (don't use it, use > features.opensuse.org instead) > How would you rate the severity of this problem or report? 4 > Using severity `Normal' > DEBUG:susereport:STATE: GET_DESCRIPTION > > Please review your bugreport: > > #----------------------------------------------------------------------- > #Summary: Cannot find a Java virtual machine > #Product: openSUSE 11.2 > #Platform: All > #Component: Java > #Severity: Normal > #Assigned_to: > #CC: [] > #----------------------------------------------------------------------- > > #Description of the bug: > > Package: ant > Source: ant > Version: 1.7.1-9.2 > Devel project/package: Java:packages/ant > This is a testing bug report > > DEBUG:susereport:STATE: ASK_ATTACHEMENT > Would you like to add an attachement [y\N]? n > DEBUG:susereport:STATE: ASK_SUBMIT > > Would you like to submitt it [y\N\q]? y > DEBUG:susereport:STATE: SUBMIT > Calling createbug with {'product': 'openSUSE 11.2', 'severity': 'Normal', > 'cc': [], 'rep_platform': 'All', 'component': 'Java', 'summary': 'Cannot find > a Java virtual machine', 'version': 'unspecified', 'assigned_to': '', > 'attachements': None, 'op_sys': 'Linux', 'description': '\nPackage: > ant\nSource: ant\nVersion: 1.7.1-9.2\nDevel project/package: > Java:packages/ant\nThis is a testing bug report\n'} > DEBUG:susereport:STATE: EXIT [1] http://gitorious.org/opensuse/susereport [3] http://download.opensuse.org/repositories/home:/-miska-:/Release:/susereport [4] https://bugzilla.novell.com/show_bug.cgi?id=525549 [5] https://bugzilla.novell.com/show_bug.cgi?id=523787 -- Michal HRUSECKY SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xFED656F6 19000 Praha 9 mhrusecky[at]suse.cz Czech Republic http://michal.hrusecky.net http://www.suse.cz
5493
Age (days ago)
5493
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michal Hrusecky