]> git.donarmstrong.com Git - debbugs-presentations.git/blob - debbugs.Rnw
fix statistics typo
[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 Statistics
120     \item New features
121     \item Planned features
122     \item Places you can help
123     \end{itemize}
124     \column{0.5\textwidth}
125     \includegraphics[width=\textwidth,keepaspectratio]{images/rc_buggy}
126   \end{columns}
127 \end{frame}
128 \begin{frame}{Goals of the BTS}
129   \begin{columns}
130   \column{0.4\textwidth}
131     \includegraphics[width=\textwidth,keepaspectratio]{images/not_a_bug}
132   \column{0.6\textwidth}
133   \begin{itemize}
134   \item Reporting of \only<1>{Features}\only<2>{Bugs}
135   \item Evolution of \only<1>{Features}\only<2>{Bugs}
136   \item Fixing of \only<1>{Features}\only<2>{Bugs}
137   \item Reducing impact of \only<1>{Features}\only<2>{Bugs}
138   \end{itemize}
139 \end{columns}
140 \end{frame}
141
142 \section{Bugs in Debian}
143 \subsection{Bug Reporting Rate}
144 \begin{frame}{How many bugs do we have?}
145   \begin{center}
146 <<bug.growth,fig=TRUE,echo=FALSE,cache.extra=file.info("data/sorted_bug_growth_for_r_every_500.txt")[,"mtime"]>>=
147 bug.growth <- fread("data/sorted_bug_growth_for_r_every_500.txt")
148 colnames(bug.growth) <- c("time","bugs")
149 bug.growth <- bug.growth[pmax(bugs) <= as.numeric(bugs),]
150 bug.growth[,date:=
151                 as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+
152                            as.numeric(bug.growth$time))]
153 print(ggplot(bug.growth[date > as.POSIXct(ISOdatetime(2005,1,1,0,0,0)),],
154              aes(x=date,y=bugs))+
155       xlab("Time")+ylab("Bugs filed in Debian")+
156       scale_y_continuous(labels = scientific_10)+
157       geom_point()+stat_smooth(method="lm"))
158
159 \end{center}
160 \end{frame}
161
162 \begin{frame}
163   \begin{columns}
164     \column{0.5\textwidth}
165   \begin{center}
166 <<bugs.filed,fig=TRUE,echo=FALSE,warning=FALSE,fig.width=3,fig.height=3>>=
167 print(ggplot(bug.growth[date > as.POSIXct(ISOdatetime(2015,1,1,0,0,0)),],
168              aes(x=date,y=bugs))+
169       xlab("Time")+ylab("Bugs filed in Debian")+
170       scale_y_continuous(labels = scientific_10)+
171       geom_point()+stat_smooth(method="lm"))
172 bugs.filed.per.day <-
173   lm(bugs~date,bug.growth)$coeff[2]*3600*24
174 temp.lm <- lm(date~bugs,bug.growth[date > as.POSIXct(ISOdatetime(2015,1,1,0,0,0)),])
175 bug.880000 <- 
176     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=880000,date=NA))))
177 bug.900000 <- 
178     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=900000,date=NA))))
179 bug.1000000 <- 
180     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=1000000,date=NA))))
181
182 \end{center}
183 \column{0.5\textwidth}
184 Roughly \Sexpr{format(bugs.filed.per.day,digits=1)} bugs are filed per
185 day. The 880000th bug will be filed at \Sexpr{bug.880000}, the
186 900000th bug will be filed at \Sexpr{bug.900000}, and bug one million will be filled 
187 \Sexpr{bug.1000000}.
188 \end{columns}
189 \end{frame}
190
191
192 \subsection{Bug Fixing Rate}
193 \begin{frame}
194   \begin{center}
195 <<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"]>>=
196 bug.closed.series <- fread(file="data/bug_closed_time_series.txt")
197 colnames(bug.closed.series) <- c("archived.bugs","year.week")
198 bug.closed.series[,week:=
199     gsub("(\\d+)-(\\d+)","\\2",year.week)]
200 bug.closed.series[,year:=
201     gsub("(\\d+)-(\\d+)","\\1",year.week)]
202 bug.closed.series[,doy:= as.numeric(week)*7]
203 bug.closed.series[,year.doy:=
204                        paste(sep="-",year,doy)]
205 bug.closed.series[,date:=
206                        as.POSIXct(strptime(year.doy,
207                                            format="%Y-%j"))]
208
209 # bug.closed.ts <- ts(bug.closed.series[,1],start=1,frequency=7)
210
211 print(ggplot(bug.closed.series[date > as.POSIXct(ISOdatetime(2008,1,1,0,0,0)),],
212              aes(x=date,y=archived.bugs/7))+geom_line()+stat_smooth(method="lm")+
213       ylab("Bugs archived Per Day")+xlab("Time"))
214 bugs.closed.per.day <-
215     bug.closed.series[,sum(archived.bugs)]/
216     as.numeric(bug.closed.series[nrow(bug.closed.series),date]-
217                bug.closed.series[1,date])
218
219   \end{center}
220 Roughly \Sexpr{format(bugs.closed.per.day,digits=1)} bugs are closed per day.
221 \end{frame}
222
223 \subsection{RC Bugs}
224 \begin{frame}{RC Bugs in the Past Year}
225   \begin{center}
226 <<rc.bugs,fig=TRUE,echo=FALSE,warning=FALSE,cache.extra=file.info("data/rc_bugs.txt")[,"mtime"]>>=
227 rc.bugs <-
228     data.table(read.table(file="data/rc_bugs.txt",
229                           header=TRUE,fill=TRUE))
230 rc.bugs[,date:=
231              as.POSIXct(strptime(date,
232                                  format="%Y%m%d%H%M"))]
233 rc.bugs[,unknown:=NULL]
234 rc.bugs[,unknown.1:=NULL]
235 for (i in 1:10) {
236     rc.bugs <- rc.bugs[c(0,diff(total)) > -1000,]
237 }
238 rc.bugs.long <-
239     data.table(melt(rc.bugs,id="date"))
240 print(ggplot(rc.bugs.long[date > 
241                           as.POSIXct(ISOdatetime(2016,08,1,0,0,0)),]
242             ,aes(x=date,y=value,color=variable))+
243       geom_line()+
244       ylab("# of Release Critical Bugs")+xlab("Time")+
245       theme(legend.position="top")+
246       scale_color_discrete("Measure"))
247
248 \end{center}
249   \setbeamercolor{postit}{fg=black,bg=yellow}
250   \begin{textblock}{4}(6,4)
251     \begin{onlyenv}<2>
252       \begin{beamercolorbox}[sep=1em,wd=5cm]{postit}
253         \centering \huge Too many RC bugs!
254       \end{beamercolorbox}
255     \end{onlyenv}
256   \end{textblock}
257
258 \end{frame}
259
260 \section{Debbugs Structure and Infrastructure}
261
262 \subsection{BTS System Diagram}
263 \begin{frame}{BTS system Diagram}
264   \begin{center}
265     \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{figures/bug_global_layout}
266   \end{center}
267 \end{frame}
268
269 \subsection{Debbugs Box Diagram}
270 \begin{frame}{Debbugs Box Diagram}
271   \begin{center}
272     \input{debbugs_layout}
273   \end{center}
274 \end{frame}
275
276 \section{Database Ho!}
277
278 \subsection{Overall Database Design}
279
280 \begin{frame}{Overall Database Design}
281   \begin{center}
282     \input{debbugs_layout_db}
283   \end{center}
284 \end{frame}
285
286 \subsection{Perl Database Infrastucture}
287 \begin{frame}{Perl Database Infrastructure}
288   \begin{itemize}
289   \item DBIx::Class
290   \item DBIx::Class::Schema::Loader -- SQL schema to DBIx::Class
291   \item DBIx::Class::DeploymentHandler -- Upgrades of Schema
292   \item Debbugs::DB -- Debbugs SQL Module
293   \end{itemize}
294 \end{frame}
295
296
297 \subsection{SQL Design}
298 \begin{frame}{SQL Schema}
299   \includegraphics[width=\textwidth,keepaspectratio]{figures/schema.png}
300   \begin{itemize}
301   \item Current Debbugs SQL Schema
302   \end{itemize}
303 \end{frame}
304
305 \subsubsection{dak SQL Design}
306 \begin{frame}{dak SQL Schema}
307   \includegraphics[width=\textwidth,keepaspectratio]{figures/dak_schema.png}
308   \begin{itemize}
309   \item Inspiration taken from dak SQL Schema where appropriate
310   \end{itemize}
311 \end{frame}
312
313 \subsection{SQL Loading}
314 \begin{frame}[fragile]{SQL Loading}
315   % SQL loading
316   \begin{itemize}
317   \item Load bugs
318 \begin{lstlisting}[language=sh]
319 debbugs-loadsql bugs;
320 debbugs-loadsql bugs archive;
321 \end{lstlisting}
322   \item Load Versioning information
323 \begin{lstlisting}[language=sh]
324 debbugs-loadsql versions;
325 debbugs-loadsql debinfo;
326 \end{lstlisting}
327   \end{itemize}
328 \end{frame}
329
330 \subsection{SQL Working}
331 \begin{frame}[fragile]{SQL Working}
332   % example SQL query
333 \begin{lstlisting}[language=SQL]
334 SELECT count(*) FROM bug
335 WHERE last_modified > '2014-07-01'
336 AND done IS NOT NULL
337 AND owner IS NOT NULL;
338 \end{lstlisting}
339 \begin{visibleenv}<2>
340 \begin{lstlisting}
341  count 
342 -------
343    521
344 \end{lstlisting}
345 \end{visibleenv}
346 \end{frame}
347
348 \subsection{Work still needed for SQL}
349 \begin{frame}{Work Still needed for SQL}
350 \begin{itemize}
351 \item Logfile loading (for full text searching)
352 \item Status Caching (for faster page loading)
353 \item Testing
354 \item Deployment
355 \end{itemize}
356 \end{frame}
357
358 \section{New(ish) Features}
359
360 \subsection{New Changes}
361 \begin{frame}{New Changes}
362   \begin{columns}
363     \column{0.5\textwidth}
364     \begin{itemize}
365   \item mailto links (demo)
366   \item forcemerge does the right thing
367   \item control at submit time
368   \end{itemize}
369     \column{0.5\textwidth}
370     \includegraphics[width=\textwidth,keepaspectratio]{images/telegraph_bug}
371 \end{columns}
372 \end{frame}
373
374 \section{Future features}
375
376 \subsection{Status Caching}
377 \begin{frame}{Status Caching}
378   \begin{itemize}
379   \item Cache status of bugs (presence/absence at all distributions)
380   \item Speed up display of \url{http://bugs.debian.org/src:linux-2.6}
381   \item Allows for reverse status lookup
382     \begin{itemize}
383     \item Enables finding bugs which are present in testing or unstable
384     \end{itemize}
385   \end{itemize}
386 \end{frame}
387
388 \subsection{Statistics}
389 \begin{frame}{Statistics}
390   \begin{columns}
391     \column{0.5\textwidth}
392     \begin{itemize}
393     \item Track status changes over time
394     \item Bugs found/fixed/absent in stable/testing/unstable over time
395     \item Bug submission times
396     \item Bug closure times
397     \item Bug mail rates
398     \item Per package, severity, maintainer tracking of the above
399     \end{itemize}
400     \column{0.5\textwidth}
401     \begin{center}
402       \includegraphics[width=\textwidth,height=0.35\textheight,keepaspectratio]{images/bug}
403     \end{center}
404   \end{columns}
405 \end{frame}
406
407
408 \subsection{Additional Planned Features}
409 \begin{frame}{More planned features}
410   \begin{columns}
411     \column{0.5\textwidth}
412     \begin{itemize}
413     \item HTTP based reporting system with e-mail roundtrip
414     \item Release Debbugs again
415     \item Bug mailing lists in Debbugs
416       \begin{itemize}
417       \item Avoid duplicate mail
418       \item Opt in/out of mail
419       \end{itemize}
420     \item Merging of merged bug reports
421     \item Threading in report
422     \end{itemize}
423     \column{0.5\textwidth}
424     \includegraphics[width=\textwidth,keepaspectratio]{images/fixed_bug}
425   \end{columns}
426 \end{frame}
427
428 \begin{frame}{Even More planned features}
429   \begin{columns}
430     \column{0.5\textwidth}
431     \begin{itemize}
432     \item Usercategory duplication and replay
433     \item Remote Attachments
434     \item New Spool Storage Format
435     \item Usertags visibility
436     \item Smarter CGI options
437     \end{itemize}
438     \column{0.5\textwidth}
439     \includegraphics[width=\textwidth,keepaspectratio]{images/fixed_bug}
440   \end{columns}
441 \end{frame}
442
443
444
445
446
447 \section{Places you can help}
448
449 \begin{frame}{7 tasks seeking contributors}
450   \begin{itemize}
451   \item Documentation of Usercategories
452   \item Implementation of rss feeds for packages and bugs
453   \item CGI options on pkgreport.cgi for usertags et al. \#536378)
454   \item Documentation of multipe-package reassign and when it or
455     affects should be used
456   \item Mailto link with subject, references, etc. all filled in
457   \item Documentation for local-debbugs configuration file (behaves
458     like bts select)
459   \end{itemize}
460 \end{frame}
461
462 \begin{frame}{Getting started on these tasks}
463   \begin{itemize}
464   \item Upstream branches: \url{http://bugs.debian.org/debbugs-source/}
465     \begin{itemize}
466     \item master (upstream debbugs): git clone \url{http://bugs.debian.org/debbugs-source/debbugs.git}
467     \item debian (debian branch): git clone -b debian \url{http://bugs.debian.org/debbugs-source/debbugs.git}
468     \item Checked out branches are also available at
469       \url{http://bugs.debian.org/debbugs-source/master} and
470       \url{http://bugs.debian.org/debbugs-source/debian}
471     \end{itemize}
472   \item My branches: \url{http://git.donarmstrong.com/debbugs.git}
473   \item Mailing list debian-debbugs@lists.debian.org
474   \item IRC \#debbugs or \#debian-bugs on irc.debian.org; I'm dondelelcaro
475   \end{itemize}
476 \end{frame}
477
478 \begin{frame}{The Debbugs Team}
479   \begin{itemize}
480   \item Current team
481     \begin{itemize}
482     \item Don Armstrong
483     \item Blars Blarson
484     \item Colin Watson
485     \end{itemize}
486   \item Emeritus Developers
487     \begin{itemize}
488     \item Steiner Gunderson
489     \item Adam Heath
490     \item Josip Rodin
491     \item Anthony Towns
492     \end{itemize}
493   \item You!
494   \end{itemize}
495 \end{frame}
496
497 \begin{frame}{Questions?}
498   \includegraphics[width=0.8\textwidth,height=0.8\textheight,keepaspectratio]{images/don_at_burning_man.jpg}
499 \end{frame}
500
501 \end{document}
502
503