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