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