]> git.donarmstrong.com Git - debbugs-presentations.git/blob - debbugs.Rnw
the code and slides are on dla2.us
[debbugs-presentations.git] / debbugs.Rnw
1
2 \usepackage{fontspec}
3 \setmainfont{FreeSerif}
4 \setsansfont{FreeSans}
5 \setmonofont{FreeMono}
6 \usepackage{url}
7 \usepackage{fancyhdr}
8 \usepackage{graphicx}
9 \usepackage[bf]{caption}
10 \usepackage{rotating}
11 \usepackage{wrapfig}
12 \usepackage{fancybox}
13 \usepackage{booktabs}
14 % \usepackage{multirow}
15 \usepackage{acronym}
16 \usepackage{qrcode}
17 \usepackage[backend=biber,natbib=true,hyperref=true,style=nature]{biblatex}
18 \addbibresource{references.bib}
19 % \usepackage[nomargin,inline,draft]{fixme}
20 % \newcommand{\DLA}[1]{\textcolor{red}{\fxnote{DLA: #1}}}
21 % \usepackage[hyperfigures,bookmarks,colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black]{hyperref}
22 \usepackage{texshade}
23 \usepackage{tikz}
24 \usepackage{nameref}
25 \usepackage{zref-xr,zref-user}
26 \renewcommand*{\bibfont}{\tiny}
27 \usepackage[absolute,overlay]{textpos}
28
29 \mode<presentation>
30 {
31   \usetheme{Montpellier}
32   %\useoutertheme[hideallsubsections]{debiansidebar}
33 %  \setbeamercovered{transparent}  
34 }
35
36
37 \usepackage[nomargin,inline,draft]{fixme}
38 \usepackage{listings}
39
40
41 \logo{\begin{tikzpicture}% Pale figure
42     {\node[opacity=0.3] {\includegraphics[width=2cm,keepaspectratio]{figures/openlogo-crop.pdf}};}%
43     \end{tikzpicture}}
44 \author{Don Armstrong}
45 \title{Debbugs}
46 \subtitle{22 Years of Bugs}
47 \date{August 10th, 2017}
48 \titlegraphic{\includegraphics[height=0.2\textheight,keepaspectratio]{figures/openlogo-crop.pdf}}
49 \subject{BTS}
50
51 % State of the BTS: new features, changes and tips
52
53 % The bug tracking system is where all bugs that affect Debian are
54 % filed. New features, including the affects, summary, and local debbugs
55 % mirror will be presented and demonstrated. Some of the underlying
56 % architectural changes to the codebase in debbugs to make it more
57 % maintainable and deployable are also outlined. Finally, a set of tips
58 % and tricks that can be used to make the BTS easier to use are
59 % presented.
60
61 %  - New Features
62 %    - affects
63 %    - summary
64 %    - local debbugs mirror for offline work
65 %    - New SOAP
66 %      - full text search
67 %      - filtering bugs
68 %    - multi-distribution/arch status
69 %    - control changes at submit@ time
70 %  - Code Architecture Changes
71 %    - Modularization
72 %    - Control abstraction
73 %    - release to experimental
74
75
76 <<load.libraries,echo=FALSE,results="hide",error=FALSE,message=FALSE>>=
77 library(lattice)
78 library(xtable)
79 library(ggplot2)
80 library("scales")
81 library(reshape2)
82 library("data.table")
83 opts_chunk$set(dev="cairo_pdf",out.width="\\textwidth",out.height="0.8\\textheight",out.extra="keepaspectratio",fig.width=6,fig.height=4)
84 opts_chunk$set(cache=TRUE, autodep=TRUE)
85 options(device = function(file, width = 6, height = 4, ...) {
86   cairo_pdf(tempfile(), width = width, height = height, ...)
87 })
88
89
90
91 <<scientific_format,echo=FALSE>>=
92 scientific_10 <- function(x) {
93   parse(text=gsub("e", " %*% 10^", scientific_format()(x)))
94 }
95
96
97 \begin{document}
98
99 %\setbeamercolor{frametitle}[bg=-red!90!green!10,fg=black]
100
101 \frame[plain]{\titlepage
102   Code and slides are here: 
103   \qrcode[padding]{https://dla2.us/p/debbugs2017}
104   \url{https://dla2.us/p/debbugs2017}
105
106 }
107
108 % \begin{frame}{Debbugs}
109 %   \tableofcontents[subsectionstyle=hide]
110 % \end{frame}
111
112 \section{Introduction to Debbugs}
113
114 \subsection{Introduction}
115 \begin{frame}{Goals of this talk}
116   \begin{columns}
117     \column{0.5\textwidth}
118     \begin{itemize}
119     \item Bug Statitics
120     \item Introduction to Debbugs
121     \item New features
122     \item Planned features
123     \item Places you can help
124     \end{itemize}
125     \column{0.5\textwidth}
126     \includegraphics[width=\textwidth,keepaspectratio]{images/rc_buggy}
127   \end{columns}
128 \end{frame}
129 \begin{frame}{Goals of the BTS}
130   \begin{columns}
131   \column{0.4\textwidth}
132     \includegraphics[width=\textwidth,keepaspectratio]{images/not_a_bug}
133   \column{0.6\textwidth}
134   \begin{itemize}
135   \item Reporting of \only<1>{Features}\only<2>{Bugs}
136   \item Evolution of \only<1>{Features}\only<2>{Bugs}
137   \item Fixing of \only<1>{Features}\only<2>{Bugs}
138   \item Reducing impact of \only<1>{Features}\only<2>{Bugs}
139   \end{itemize}
140 \end{columns}
141 \end{frame}
142
143 \section{Bugs in Debian}
144 \subsection{Bug Reporting Rate}
145 \begin{frame}{How many bugs do we have?}
146   \begin{center}
147 <<bug.growth,fig=TRUE,echo=FALSE,cache.extra=file.info("data/sorted_bug_growth_for_r_every_500.txt")[,"mtime"]>>=
148 bug.growth <- fread("data/sorted_bug_growth_for_r_every_500.txt")
149 colnames(bug.growth) <- c("time","bugs")
150 bug.growth <- bug.growth[pmax(bugs) <= as.numeric(bugs),]
151 bug.growth[,date:=
152                 as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+
153                            as.numeric(bug.growth$time))]
154 print(ggplot(bug.growth[date > as.POSIXct(ISOdatetime(2005,1,1,0,0,0)),],
155              aes(x=date,y=bugs))+
156       xlab("Time")+ylab("Bugs filed in Debian")+
157       scale_y_continuous(labels = scientific_10)+
158       geom_point()+stat_smooth(method="lm"))
159
160 \end{center}
161 \end{frame}
162
163 \begin{frame}
164   \begin{columns}
165     \column{0.5\textwidth}
166   \begin{center}
167 <<bugs.filed,fig=TRUE,echo=FALSE,warning=FALSE,fig.width=3,fig.height=3>>=
168 print(ggplot(bug.growth[date > as.POSIXct(ISOdatetime(2015,1,1,0,0,0)),],
169              aes(x=date,y=bugs))+
170       xlab("Time")+ylab("Bugs filed in Debian")+
171       scale_y_continuous(labels = scientific_10)+
172       geom_point()+stat_smooth(method="lm"))
173 bugs.filed.per.day <-
174   lm(bugs~date,bug.growth)$coeff[2]*3600*24
175 temp.lm <- lm(date~bugs,bug.growth[date > as.POSIXct(ISOdatetime(2015,1,1,0,0,0)),])
176 bug.880000 <- 
177     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=880000,date=NA))))
178 bug.900000 <- 
179     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=900000,date=NA))))
180 bug.1000000 <- 
181     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=1000000,date=NA))))
182
183 \end{center}
184 \column{0.5\textwidth}
185 Roughly \Sexpr{format(bugs.filed.per.day,digits=1)} bugs are filed per
186 day. The 880000th bug will be filed at \Sexpr{bug.880000}, the
187 900000th bug will be filed at \Sexpr{bug.900000}, and bug one million will be filled 
188 \Sexpr{bug.1000000}.
189 \end{columns}
190 \end{frame}
191
192
193 \subsection{Bug Fixing Rate}
194 \begin{frame}
195   \begin{center}
196 <<bugs.closed,fig=TRUE,echo=FALSE,width=7,height=5,warning=FALSE,error=FALSE,cache.extra=file.info("data/bug_closed_time_series.txt")[,"mtime"]>>=
197 bug.closed.series <- fread(file="data/bug_closed_time_series.txt")
198 colnames(bug.closed.series) <- c("archived.bugs","year.week")
199 bug.closed.series[,week:=
200     gsub("(\\d+)-(\\d+)","\\2",year.week)]
201 bug.closed.series[,year:=
202     gsub("(\\d+)-(\\d+)","\\1",year.week)]
203 bug.closed.series[,doy:= as.numeric(week)*7]
204 bug.closed.series[,year.doy:=
205                        paste(sep="-",year,doy)]
206 bug.closed.series[,date:=
207                        as.POSIXct(strptime(year.doy,
208                                            format="%Y-%j"))]
209
210 # bug.closed.ts <- ts(bug.closed.series[,1],start=1,frequency=7)
211
212 print(ggplot(bug.closed.series[date > as.POSIXct(ISOdatetime(2008,1,1,0,0,0)),],
213              aes(x=date,y=archived.bugs/7))+geom_line()+stat_smooth(method="lm")+
214       ylab("Bugs archived Per Day")+xlab("Time"))
215 bugs.closed.per.day <-
216     bug.closed.series[,sum(archived.bugs)]/
217     as.numeric(bug.closed.series[nrow(bug.closed.series),date]-
218                bug.closed.series[1,date])
219
220   \end{center}
221 Roughly \Sexpr{format(bugs.closed.per.day,digits=1)} bugs are closed per day.
222 \end{frame}
223
224 \subsection{RC Bugs}
225 \begin{frame}{RC Bugs in the Past Year}
226   \begin{center}
227 <<rc.bugs,fig=TRUE,echo=FALSE,warning=FALSE,cache.extra=file.info("data/rc_bugs.txt")[,"mtime"]>>=
228 rc.bugs <-
229     data.table(read.table(file="data/rc_bugs.txt",
230                           header=TRUE,fill=TRUE))
231 rc.bugs[,date:=
232              as.POSIXct(strptime(date,
233                                  format="%Y%m%d%H%M"))]
234 rc.bugs[,unknown:=NULL]
235 rc.bugs[,unknown.1:=NULL]
236 for (i in 1:10) {
237     rc.bugs <- rc.bugs[c(0,diff(total)) > -1000,]
238 }
239 rc.bugs.long <-
240     data.table(melt(rc.bugs,id="date"))
241 print(ggplot(rc.bugs.long[date > 
242                           as.POSIXct(ISOdatetime(2016,08,1,0,0,0)),]
243             ,aes(x=date,y=value,color=variable))+
244       geom_line()+
245       ylab("# of Release Critical Bugs")+xlab("Time")+
246       theme(legend.position="top")+
247       scale_color_discrete("Measure"))
248
249 \end{center}
250   \setbeamercolor{postit}{fg=black,bg=yellow}
251   \begin{textblock}{4}(6,4)
252     \begin{onlyenv}<2>
253       \begin{beamercolorbox}[sep=1em,wd=5cm]{postit}
254         \centering \huge Too many RC bugs!
255       \end{beamercolorbox}
256     \end{onlyenv}
257   \end{textblock}
258
259 \end{frame}
260
261 \section{Debbugs Structure and Infrastructure}
262
263 \subsection{BTS System Diagram}
264 \begin{frame}{BTS system Diagram}
265   \begin{center}
266     \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{figures/bug_global_layout}
267   \end{center}
268 \end{frame}
269
270 \subsection{Debbugs Box Diagram}
271 \begin{frame}{Debbugs Box Diagram}
272   \begin{center}
273     \input{debbugs_layout}
274   \end{center}
275 \end{frame}
276
277 \section{Database Ho!}
278
279 \subsection{Overall Database Design}
280
281 \begin{frame}{Overall Database Design}
282   \begin{center}
283     \input{debbugs_layout_db}
284   \end{center}
285 \end{frame}
286
287 \subsection{Perl Database Infrastucture}
288 \begin{frame}{Perl Database Infrastructure}
289   \begin{itemize}
290   \item DBIx::Class
291   \item DBIx::Class::Schema::Loader -- SQL schema to DBIx::Class
292   \item DBIx::Class::DeploymentHandler -- Upgrades of Schema
293   \item Debbugs::DB -- Debbugs SQL Module
294   \end{itemize}
295 \end{frame}
296
297
298 \subsection{SQL Design}
299 \begin{frame}{SQL Schema}
300   \includegraphics[width=\textwidth,keepaspectratio]{figures/schema.png}
301   \begin{itemize}
302   \item Current Debbugs SQL Schema
303   \end{itemize}
304 \end{frame}
305
306 \subsubsection{dak SQL Design}
307 \begin{frame}{dak SQL Schema}
308   \includegraphics[width=\textwidth,keepaspectratio]{figures/dak_schema.png}
309   \begin{itemize}
310   \item Inspiration taken from dak SQL Schema where appropriate
311   \end{itemize}
312 \end{frame}
313
314 \subsection{SQL Loading}
315 \begin{frame}[fragile]{SQL Loading}
316   % SQL loading
317   \begin{itemize}
318   \item Load bugs
319 \begin{lstlisting}[language=sh]
320 debbugs-loadsql bugs;
321 debbugs-loadsql bugs archive;
322 \end{lstlisting}
323   \item Load Versioning information
324 \begin{lstlisting}[language=sh]
325 debbugs-loadsql versions;
326 debbugs-loadsql debinfo;
327 \end{lstlisting}
328   \end{itemize}
329 \end{frame}
330
331 \subsection{SQL Working}
332 \begin{frame}[fragile]{SQL Working}
333   % example SQL query
334 \begin{lstlisting}[language=SQL]
335 SELECT count(*) FROM bug
336 WHERE last_modified > '2014-07-01'
337 AND done IS NOT NULL
338 AND owner IS NOT NULL;
339 \end{lstlisting}
340 \begin{visibleenv}<2>
341 \begin{lstlisting}
342  count 
343 -------
344    521
345 \end{lstlisting}
346 \end{visibleenv}
347 \end{frame}
348
349 \subsection{Work still needed for SQL}
350 \begin{frame}{Work Still needed for SQL}
351 \begin{itemize}
352 \item Logfile loading (for full text searching)
353 \item Status Caching (for faster page loading)
354 \item Testing
355 \item Deployment
356 \end{itemize}
357 \end{frame}
358
359 \section{New(ish) Features}
360
361 \subsection{New Changes}
362 \begin{frame}{New Changes}
363   \begin{columns}
364     \column{0.5\textwidth}
365     \begin{itemize}
366   \item mailto links (demo)
367   \item forcemerge does the right thing
368   \item control at submit time
369   \end{itemize}
370     \column{0.5\textwidth}
371     \includegraphics[width=\textwidth,keepaspectratio]{images/telegraph_bug}
372 \end{columns}
373 \end{frame}
374
375 \section{Future features}
376
377 \subsection{Status Caching}
378 \begin{frame}{Status Caching}
379   \begin{itemize}
380   \item Cache status of bugs (presence/absence at all distributions)
381   \item Speed up display of \url{http://bugs.debian.org/src:linux-2.6}
382   \item Allows for reverse status lookup
383     \begin{itemize}
384     \item Enables finding bugs which are present in testing or unstable
385     \end{itemize}
386   \end{itemize}
387 \end{frame}
388
389 \subsection{Statistics}
390 \begin{frame}{Statistics}
391   \begin{columns}
392     \column{0.5\textwidth}
393     \begin{itemize}
394     \item Track status changes over time
395     \item Bugs found/fixed/absent in stable/testing/unstable over time
396     \item Bug submission times
397     \item Bug closure times
398     \item Bug mail rates
399     \item Per package, severity, maintainer tracking of the above
400     \end{itemize}
401     \column{0.5\textwidth}
402     \begin{center}
403       \includegraphics[width=\textwidth,height=0.35\textheight,keepaspectratio]{images/bug}
404     \end{center}
405   \end{columns}
406 \end{frame}
407
408
409 \subsection{Additional Planned Features}
410 \begin{frame}{More planned features}
411   \begin{columns}
412     \column{0.5\textwidth}
413     \begin{itemize}
414     \item HTTP based reporting system with e-mail roundtrip
415     \item Release Debbugs again
416     \item Bug mailing lists in Debbugs
417       \begin{itemize}
418       \item Avoid duplicate mail
419       \item Opt in/out of mail
420       \end{itemize}
421     \item Merging of merged bug reports
422     \item Threading in report
423     \end{itemize}
424     \column{0.5\textwidth}
425     \includegraphics[width=\textwidth,keepaspectratio]{images/fixed_bug}
426   \end{columns}
427 \end{frame}
428
429 \begin{frame}{Even More planned features}
430   \begin{columns}
431     \column{0.5\textwidth}
432     \begin{itemize}
433     \item Usercategory duplication and replay
434     \item Remote Attachments
435     \item New Spool Storage Format
436     \item Usertags visibility
437     \item Smarter CGI options
438     \end{itemize}
439     \column{0.5\textwidth}
440     \includegraphics[width=\textwidth,keepaspectratio]{images/fixed_bug}
441   \end{columns}
442 \end{frame}
443
444
445
446
447
448 \section{Places you can help}
449
450 \begin{frame}{7 tasks seeking contributors}
451   \begin{itemize}
452   \item Documentation of Usercategories
453   \item Implementation of rss feeds for packages and bugs
454   \item CGI options on pkgreport.cgi for usertags et al. \#536378)
455   \item Documentation of multipe-package reassign and when it or
456     affects should be used
457   \item Mailto link with subject, references, etc. all filled in
458   \item Documentation for local-debbugs configuration file (behaves
459     like bts select)
460   \end{itemize}
461 \end{frame}
462
463 \begin{frame}{Getting started on these tasks}
464   \begin{itemize}
465   \item Upstream branches: \url{http://bugs.debian.org/debbugs-source/}
466     \begin{itemize}
467     \item master (upstream debbugs): git clone \url{http://bugs.debian.org/debbugs-source/debbugs.git}
468     \item debian (debian branch): git clone -b debian \url{http://bugs.debian.org/debbugs-source/debbugs.git}
469     \item Checked out branches are also available at
470       \url{http://bugs.debian.org/debbugs-source/master} and
471       \url{http://bugs.debian.org/debbugs-source/debian}
472     \end{itemize}
473   \item My branches: \url{http://git.donarmstrong.com/debbugs.git}
474   \item Mailing list debian-debbugs@lists.debian.org
475   \item IRC \#debbugs or \#debian-bugs on irc.debian.org; I'm dondelelcaro
476   \end{itemize}
477 \end{frame}
478
479 \begin{frame}{The Debbugs Team}
480   \begin{itemize}
481   \item Current team
482     \begin{itemize}
483     \item Don Armstrong
484     \item Blars Blarson
485     \item Colin Watson
486     \end{itemize}
487   \item Emeritus Developers
488     \begin{itemize}
489     \item Steiner Gunderson
490     \item Adam Heath
491     \item Josip Rodin
492     \item Anthony Towns
493     \end{itemize}
494   \item You!
495   \end{itemize}
496 \end{frame}
497
498 \begin{frame}{Questions?}
499   \includegraphics[width=0.8\textwidth,height=0.8\textheight,keepaspectratio]{images/don_at_burning_man.jpg}
500 \end{frame}
501
502 \end{document}
503
504