Scmbug: Policy-Based Integration of Software Configuration
Total Page:16
File Type:pdf, Size:1020Kb
Scmbug: Policy-based Integration of Software Configuration Management with Bug-tracking Kristis Makris Kyung Dong Ryu Department of Computer Science IBM T.J. Watson Research Center and Engineering 1101 Kitchawan Rd Arizona State University Yorktown Heights, NY 10598 Tempe, AZ, 85287 [email protected] [email protected] Abstract and enhancement requests. Those who do not use a bug-tracking system tend to rely on shared lists, Software configuration management(SCM) and email, spreadsheets and/or Post-It notes to moni- bug-tracking are key components of a successful tor the status of defects. This procedure is usually software engineering project. Existing systems error-prone and tends to cause those bugs judged integrating the two have failed to meet the needs least significant by developers to be dropped or of the ASU scalable computing lab, powered by ignored[10]. open-source software. An improved solution to By examining a log of software changes from the integration problem, designed to accomodate an SCM tool, it is uncertain why the changes oc- both free and commercial systems alike, is pre- curred. By examining a defect report, it is un- sented. certain what changed in software in response to Scmbug offers a policy-based mechanism of the defect. Integration of SCM with bug-tracking capturing and handling integration of SCM ties the reason why a feature/defect was devel- events, such as committing software change- oped/fixed with what software changes occurred sets and labeling software releases, with a in the SCM system to accomplish this. Marry- bug-tracking system. Synchronous verification ing the SCM and bug-tracking systems improves checks and the flexibilty to match multiple devel- the traceability of software changesets, quality of opment models separate this approach from re- documentation in defect reports, and quality of lated work. We address design limitations of ex- release documents. isting integration efforts, suggest improvements SCM[11, 9, 18, 6, 5, 7, 3] and defect- in SCM and bug-tracking systems required to tracking[2, 4, 1] systems are widely popular and achieve a scalable solution, and document our in deployment. Commercial systems implement early integration experiences. a mostly inflexible integration of the two, and free systems lack a variety of important verification 1 Introduction guarantees. None of the existing systems met the integration demands of the ASU scalable com- SCM is key[17] in maintaining quality in soft- puting lab. At a minimum, an integration system ware engineering. SCM systems, or even simple should provide: version control systems, guarantee that a record • Integration of common denominator SCM of all changes and enhancements to software is events, such as committing changesets and maintained. When bugs creep in software, a trace labeling releases. When a changeset is of how changes occurred is available, simplify- committed, the accompanying log message ing the process of identifying regression points should be inserted in the bug-tracker. The and correcting defects. list of affected files, and the older/newer Paired with SCM, bug-tracking is another key version numbers of each file, should be re- in engineering quality software. Defect-tracking flected in the bug report. When a release systems guarantee that nothing gets swept under is labeled, the release version should be in- the carpet; they provide a method of creating, serted in the bug-tracker. storing, arranging and processing defect reports • Synchronous verification checks of SCM USENIX Association FREENIX Track: 2005 USENIX Annual Technical Conference 11 actions against the bug-tracker. If a devel- changes. Additionally, integration with other oper attempts to commit a changeset against bug-tracking systems requires implementing a an invalid product or bug id, the commit ac- communication interface with the target bug- tivity should fail, and the developer should tracker. Finally, the integration is unsuitable for be informed immediately. deployment across the public Internet, for rea- • Policy-based configuration. The integration sons explained in Section 5.1. system should be able to match the develop- In the free software arena, the most fre- ment model followed by an organization by quently attempted integration involves CVS[11], tuning run-time parameters. the dominant open-source network transparent • Secure deployment of the integration over version control system, with Bugzilla, a free de- the public Internet. fect tracking software that tracks millions of bugs • An interface to integrate any SCM system and issues for hundreds of organizations around with any bug-tracking system, overcoming the world. Steve McIntyre’s website[21] docu- limitations of the involved systems where ments an approach using trigger scripts to email possible. CVS’s actions to an account (Bugzilla Email • A mechanism to produce a Version Descrip- Gateway) configured to parse the email and pro- tion Document (VDD) detailing the defects cess it accordingly. This approach is not syn- corrected, and the changesets involved in chronous. If a user accidentally commits against fixing a defect, between two releases of a the wrong bug number, or a bug against which he software. is not the owner, the SCM system will proceed Scmbug is designed to meet these require- with the commit action regardless. The user will ments. It is implemented in Perl, an excellent, not be given the option to correct her actions. Ad- cross-platform, glue programming language, for ditionally, if the email gateway is not active, the UNIX-like systems, such as Linux, AIX, and So- developer will not be immediately aware that in- laris. It currently supports integration of CVS and tegration failed. Subversion with Bugzilla. The somewhat dated CVSZilla[15] project also integrates SCM events produced by CVS with The rest of this paper is structured as follows. Bugzilla 2.10. It does not support integration of Section 2 outlines the limitations of existing sys- events produced by any SCM system in a generic tems that prompted our solution. The system de- way. Moreover, it modifies the Bugzilla schema, sign is presented in Section 3, and a short exam- and as a result does not work with current ver- ple in Section 4. The system’s components are sions of Bugzilla, such as 2.18. Finally, this in- analyzed in Sections 5, 6, and 7. Section 8 brings tegration is unsuitable for deployment across the to light the improved quality of release documen- public Internet. tation enabled by this system. Early experiences John C. Quillan was first to conceive and im- using Scmbug are documented in Section 9, and plement synchronous verification checks and a insight to future work is given in Section 10. Fi- VDD generator, in work that was never pub- nally, Section 11 concludes this paper. licly released. He integrated CVS with Bugzilla, but his design did not support any SCM sys- 2 Related Work tem with any bug-tracking system, or deployment over the public Internet. Scmbug incorporates In the realm of commercial products, Perforce[7] these features, and proposes a more flexible de- and ClearCase/ClearQuest[3] only offer integra- sign that can accommodate both free and com- tion of their own SCM and bug-tracking sys- mercial SCM and bug-tracking systems. tems, in a proprietary way. They do not read- ily support integration with free SCM systems, 3 System Architecture such as CVS[11], Subversion[9], and Arch[18] or free bug-tracking systems such as Bugzilla[2] Scmbug is a client/server system. As shown in MantisBT[4], and AntHill[1]. Work enabling Figure 1, it consists of a set of SCM system hooks integration of Perforce with Bugzilla 2.0-16 is that capture standard SCM events and a generic available[8], but the integration API lacks an ab- glue mechanism of handling these events on stract bug-tracker interface, and requires mod- the machine hosting an SCM repository. These ifications released by the Perforce integration events are translated into integration requests and team every time the Bugzilla database schema transported to a server daemon. The daemon em- 12 FREENIX Track: 2005 USENIX Annual Technical Conference USENIX Association loginfo, verifymsg, Bugzilla API: taginfo hooks Scmbug globals.pl CVS CGI.pm Bugzilla Integration Glue Daemon activity.pl TCP port 3872 native Subversion Mantis API Mantis pre−commit, post−commit hooks Figure 1: Scmbug system architecture diagram ploys a generic mechanism of handling these re- Figure 3 presents the log comment stored in quests and contains functionality that can process CVS, produced in a more readable Changelog these requests per bug-tracking system. format using the cvs2cl tool, in response to The integration glue follows a common in- this changeset. This entry clearly details what terface of handling SCM events, and groups changed: a global variable is introduced to hold the logic driving the behavior of the integra- the name of the network device. However, it does tion. SCM-specific implementation idiosynchra- not explain why this change was required. Why cies, such as parameter decoding from SCM must a global variable be used instead of a hard- hooks, are isolated in separate modules. The ab- coded value? To identify the reason why these straction of an integration glue is what permits files were modified one must consult the bug- any SCM system to be integrated using Scmbug. tracking system. This log entry refers the reader The integration functionality is always executed to bug id 417. on the machine hosting the SCM repository. Figure 4 captures the comment entered in Respectively, the integration daemon imple- Bugzilla in response to the changeset. The origi- ments a common interface of accepting and pro- nal SCM log message is included in the bug com- cessing integration requests. Bugtracker-specific ments. The integration also generates a list of af- functionality, such as reading metadata and up- fected files, matched with the older/newer version dating bug comments, is implemented in separate numbers of each file, and appends it to the log modules.