]> git.donarmstrong.com Git - debbugs-presentations.git/blob - debbugs.Rnw
update talk goals to include questions
[debbugs-presentations.git] / debbugs.Rnw
1
2 %\usepackage{libertine}
3 \usepackage{fontspec}
4 \setmainfont[Ligatures=TeX]{FreeSerif}
5 \setsansfont[Ligatures=TeX]{FreeSans}
6 \setmonofont{FreeMono}
7 \usepackage[Symbols]{ucharclasses}
8 \newfontfamily{\defaultfont}{FreeSerif}
9 %\newfontfamily{\symbolfont}{FreeSerif}
10 \newfontfamily{\sansfont}{FreeSans}
11 \setDefaultTransitions{\bgroup\defaultfont}{\egroup}
12 \usepackage{url}
13 \usepackage{fancyhdr}
14 \usepackage{graphicx}
15 \usepackage[bf]{caption}
16 \usepackage{rotating}
17 \usepackage{wrapfig}
18 \usepackage{fancybox}
19 \usepackage{booktabs}
20 \usepackage{minted}
21 \usepackage{tcolorbox}
22 \usepackage{etoolbox}
23 \BeforeBeginEnvironment{minted}{\begin{tcolorbox}}%
24 \AfterEndEnvironment{minted}{\end{tcolorbox}}%
25 % \usepackage{multirow}
26 \usepackage{acronym}
27 \usepackage{qrcode}
28 \usepackage[backend=biber,natbib=true,hyperref=true,style=nature]{biblatex}
29 \addbibresource{references.bib}
30 % \usepackage[nomargin,inline,draft]{fixme}
31 % \newcommand{\DLA}[1]{\textcolor{red}{\fxnote{DLA: #1}}}
32 % \usepackage[hyperfigures,bookmarks,colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black]{hyperref}
33 \usepackage{texshade}
34 \usepackage{tikz}
35 \usepackage{nameref}
36 \usepackage{zref-xr,zref-user}
37 \renewcommand*{\bibfont}{\tiny}
38 \usepackage[absolute,overlay]{textpos}
39
40 \mode<presentation>
41 {
42   \usetheme{Montpellier}
43   %\useoutertheme[hideallsubsections]{debiansidebar}
44 %  \setbeamercovered{transparent}  
45 }
46
47 \setbeamertemplate{navigation symbols}{}%remove navigation symbols
48
49 \usepackage[nomargin,inline,draft]{fixme}
50 \usepackage{listings}
51
52
53 \logo{\begin{tikzpicture}% Pale figure
54     {\node[opacity=0.3] {\includegraphics[width=2cm,keepaspectratio]{figures/openlogo-crop.pdf}};}%
55     \end{tikzpicture}}
56 \author{Don Armstrong}
57 \title{Debbugs}
58 \subtitle{22 Years of Bugs}
59 \date{August 10th, 2017}
60 \titlegraphic{\includegraphics[height=0.2\textheight,keepaspectratio]{figures/openlogo-crop.pdf}}
61 \subject{BTS}
62
63 \setbeamercolor{postit}{fg=black,bg=yellow}
64
65 % State of the BTS: new features, changes and tips
66
67 % The bug tracking system is where all bugs that affect Debian are
68 % filed. New features, including the affects, summary, and local debbugs
69 % mirror will be presented and demonstrated. Some of the underlying
70 % architectural changes to the codebase in debbugs to make it more
71 % maintainable and deployable are also outlined. Finally, a set of tips
72 % and tricks that can be used to make the BTS easier to use are
73 % presented.
74
75 %  - New Features
76 %    - affects
77 %    - summary
78 %    - local debbugs mirror for offline work
79 %    - New SOAP
80 %      - full text search
81 %      - filtering bugs
82 %    - multi-distribution/arch status
83 %    - control changes at submit@ time
84 %  - Code Architecture Changes
85 %    - Modularization
86 %    - Control abstraction
87 %    - release to experimental
88
89
90 <<load.libraries,echo=FALSE,results="hide",error=FALSE,message=FALSE,cache=FALSE>>=
91 library(lattice)
92 library(xtable)
93 library(ggplot2)
94 library("scales")
95 library(reshape2)
96 library("data.table")
97 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)
98 opts_chunk$set(cache=TRUE, autodep=TRUE)
99 options(device = function(file, width = 6/1.2, height = 4/1.2, ...) {
100   cairo_pdf(tempfile(), width = width, height = height, ...)
101 })
102
103
104
105 <<scientific_format,echo=FALSE>>=
106 scientific_10 <- function(x) {
107   parse(text=gsub("e", " %*% 10^", scientific_format()(x)))
108 }
109
110
111 \begin{document}
112
113 %\setbeamercolor{frametitle}[bg=-red!90!green!10,fg=black]
114
115 \frame[plain]{\titlepage
116   Code and slides are here: 
117   \qrcode[padding]{https://dla2.us/p/debbugs2017}
118   \url{https://dla2.us/p/debbugs2017}
119
120 }
121
122 % \begin{frame}{Debbugs}
123 %   \tableofcontents[subsectionstyle=hide]
124 % \end{frame}
125
126 \section{Introduction to Debbugs}
127
128 \subsection{Introduction}
129 \begin{frame}{Goals of this talk}
130   \begin{columns}
131     \column{0.5\textwidth}
132     \begin{itemize}
133     \item Bug Statistics
134     \item New features
135     \item How you can help
136     \item Answer questions/discussion
137     \end{itemize}
138     \column{0.5\textwidth}
139     \includegraphics[width=\textwidth,keepaspectratio]{images/rc_buggy}
140   \end{columns}
141 \end{frame}
142 \begin{frame}{Goals of the BTS}
143   \begin{columns}
144   \column{0.4\textwidth}
145     \includegraphics[width=\textwidth,keepaspectratio]{images/not_a_bug}
146   \column{0.6\textwidth}
147   \begin{itemize}
148   \item Reporting of \only<1>{Features}\only<2>{Bugs}
149   \item Evolution of \only<1>{Features}\only<2>{Bugs}
150   \item Fixing of \only<1>{Features}\only<2>{Bugs}
151   \item Reducing impact of \only<1>{Features}\only<2>{Bugs}
152   \end{itemize}
153 \end{columns}
154 \end{frame}
155
156 \section{Bugs in Debian}
157 \subsection{Bug Reporting Rate}
158 \begin{frame}{Bugs from the beginning of time}
159   \begin{center}
160 <<bug.growth,fig=TRUE,echo=FALSE,cache.extra=file.info("data/sorted_bug_growth_for_r_every_500.txt")[,"mtime"]>>=
161 bug.growth <- fread("data/sorted_bug_growth_for_r_every_500.txt")
162 colnames(bug.growth) <- c("time","bugs")
163 bug.growth <- bug.growth[pmax(bugs) <= as.numeric(bugs),]
164 bug.growth <- bug.growth[order(time),]
165 while (bug.growth[,any(c(0,diff(bugs)) < 0)]) {
166        bug.growth <-
167            bug.growth[c(0,diff(bugs))>=0,]
168 }
169 bug.growth[,date:=
170                 as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+
171                            as.numeric(bug.growth$time))]
172 bug.growth[,`bugs per day`:=c(0,diff(bugs)/
173                                 as.double(diff(date),"days"))
174            ]
175 print(ggplot(bug.growth,#[date > as.POSIXct(ISOdatetime(2005,1,1,0,0,0)),],
176              aes(x=date,y=bugs))+
177       xlab("Time")+ylab("Bugs filed in Debian")+
178       scale_y_continuous(labels = scientific_10)+
179       geom_point())
180
181 \end{center}
182 \end{frame}
183
184 \begin{frame}[fragile]{Bug Growth Rate}
185 <<bug_growth_rate,echo=FALSE>>=
186 print(ggplot(bug.growth[date > as.POSIXct(ISOdatetime(2014,1,1,0,0,0)),],
187              aes(x=date,y=`bugs per day`))+
188       xlab("Time")+ylab("Bugs filed per day")
189       + scale_y_log10(breaks=c(60,100,200,400,800))
190       + geom_line()+stat_smooth(method="lm")
191       + geom_label(data=data.table(date=as.POSIXct(ISOdatetime(2015,04,25,0,0,0)),"bugs per day"=400),label="Jessie",color="red")
192       + geom_label(data=data.table(date=as.POSIXct(ISOdatetime(2017,06,17,0,0,0)),"bugs per day"=400),label="Stretch",color="purple")
193       )
194
195 \end{frame}
196
197 \begin{frame}[fragile]{Is the bug filing rate decreasing?}
198 \tiny
199 <<bug_growth_rate_over_time>>=
200 summary(lm(log(`bugs per day`)~date,
201            bug.growth[date > "2014-01-01 PST",]))
202
203 \normalsize
204 Not significantly decreasing.
205 \end{frame}
206
207 \begin{frame}{My entries into Christian's game}
208   \begin{columns}
209     \column{0.5\textwidth}
210   \begin{center}
211 <<bugs.filed,fig=TRUE,echo=FALSE,warning=FALSE,fig.width=3,fig.height=3>>=
212 print(ggplot(bug.growth[date > as.POSIXct(ISOdatetime(2015,1,1,0,0,0)),],
213              aes(x=date,y=bugs))+
214       xlab("Time")+ylab("Bugs filed in Debian")+
215       scale_y_continuous(labels = scientific_10)+
216       geom_point()+stat_smooth(method="lm"))
217 bugs.filed.per.day <-
218   lm(bugs~date,bug.growth)$coeff[2]*3600*24
219 temp.lm <- lm(date~bugs,bug.growth[date > as.POSIXct(ISOdatetime(2015,1,1,0,0,0)),])
220 bug.880000 <- 
221     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=880000,date=NA))))
222 bug.900000 <- 
223     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=900000,date=NA))))
224 bug.1000000 <- 
225     as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+as.numeric(predict(temp.lm,data.frame(bugs=1000000,date=NA))))
226
227 \end{center}
228 \column{0.5\textwidth}
229 Roughly \Sexpr{format(bugs.filed.per.day,digits=1)} bugs are filed per
230 day. The 880000th bug will be filed at \Sexpr{bug.880000}, the
231 900000th bug will be filed at \Sexpr{bug.900000}, and bug one million will be filled 
232 \Sexpr{bug.1000000}.
233 \end{columns}
234 \end{frame}
235
236
237 \subsection{Bug Fixing Rate}
238 \begin{frame}
239   \begin{center}
240 <<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"]>>=
241 bug.closed.series <- fread(file="data/bug_closed_time_series.txt")
242 colnames(bug.closed.series) <- c("archived.bugs","year.week")
243 bug.closed.series[,week:=
244     gsub("(\\d+)-(\\d+)","\\2",year.week)]
245 bug.closed.series[,year:=
246     gsub("(\\d+)-(\\d+)","\\1",year.week)]
247 bug.closed.series[,doy:= as.numeric(week)*7]
248 bug.closed.series[,year.doy:=
249                        paste(sep="-",year,doy)]
250 bug.closed.series[,date:=
251                        as.POSIXct(strptime(year.doy,
252                                            format="%Y-%j"))]
253
254 # bug.closed.ts <- ts(bug.closed.series[,1],start=1,frequency=7)
255
256 print(ggplot(bug.closed.series[date > as.POSIXct(ISOdatetime(2008,1,1,0,0,0)),],
257              aes(x=date,y=archived.bugs/7))+geom_line()+stat_smooth(method="lm")+
258       ylab("Bugs archived Per Day")+xlab("Time"))
259 bugs.closed.per.day <-
260     bug.closed.series[,sum(archived.bugs)]/
261     as.numeric(bug.closed.series[nrow(bug.closed.series),date]-
262                bug.closed.series[1,date])
263
264   \end{center}
265 Roughly \Sexpr{format(bugs.closed.per.day,digits=1)} bugs are closed per day.
266 \end{frame}
267
268 \subsection{RC Bugs}
269 \begin{frame}{RC Bugs in the Past Year}
270   \begin{center}
271 <<rc.bugs,fig=TRUE,echo=FALSE,warning=FALSE,cache.extra=file.info("data/rc_bugs.txt")[,"mtime"]>>=
272 rc.bugs <-
273     data.table(read.table(file="data/rc_bugs.txt",
274                           header=TRUE,fill=TRUE))
275 rc.bugs[,date:=
276              as.POSIXct(strptime(date,
277                                  format="%Y%m%d%H%M"))]
278 rc.bugs[,unknown:=NULL]
279 rc.bugs[,unknown.1:=NULL]
280 for (i in 1:10) {
281     rc.bugs <- rc.bugs[c(0,diff(total)) > -1000,]
282 }
283 rc.bugs.long <-
284     data.table(melt(rc.bugs,id="date"))
285 print(ggplot(rc.bugs.long[date > 
286                           as.POSIXct(ISOdatetime(2016,08,1,0,0,0)),]
287             ,aes(x=date,y=value,color=variable))+
288       geom_line()+
289       ylab("# of Release Critical Bugs")+xlab("Time")+
290       theme(legend.position="top")+
291       scale_color_discrete("Measure"))
292
293 \end{center}
294 \end{frame}
295
296 \section{Debbugs Structure and Infrastructure}
297
298 \subsection{BTS System Diagram}
299 \begin{frame}{BTS system Diagram}
300   \begin{center}
301     \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{figures/bug_global_layout}
302   \end{center}
303 \end{frame}
304
305 \subsection{Debbugs Box Diagram}
306 \begin{frame}{Debbugs Box Diagram}
307   \begin{center}
308     \input{debbugs_layout}
309   \end{center}
310 \end{frame}
311
312 \section{New Features}
313
314 \subsection{Database}
315
316 \subsubsection{Perl Database Infrastucture}
317 \begin{frame}{Perl Database Infrastructure}
318   \begin{itemize}
319   \item DBIx::Class
320   \item DBIx::Class::Schema::Loader -- SQL schema to DBIx::Class
321   \item DBIx::Class::DeploymentHandler -- Upgrades of Schema
322   \item Debbugs::DB -- Debbugs SQL Module
323   \end{itemize}
324 \end{frame}
325
326
327 \subsubsection{SQL Loading}
328 \begin{frame}[fragile]{SQL Loading}
329   % SQL loading
330   \begin{itemize}
331   \item Load bugs
332 \begin{minted}{sh}
333 debbugs-loadsql bugs;
334 debbugs-loadsql bugs archive;
335 \end{minted}
336   \item Load Versioning information
337 \begin{minted}{sh}
338 debbugs-loadsql versions;
339 debbugs-loadsql debinfo;
340 \end{minted}
341   \end{itemize}
342 \end{frame}
343
344 \subsubsection{Fun Queries}
345
346 \begin{frame}[fragile]{Messages to bugs}
347 \small
348 \begin{minted}{sql}
349 SELECT count(*),c.addr FROM 
350 message_correspondent mc 
351 JOIN correspondent c ON mc.correspondent=c.id 
352 WHERE correspondent_type='from' 
353 GROUP BY mc.correspondent,c.addr 
354 ORDER BY count DESC LIMIT 5;
355 \end{minted}
356 \begin{verbatim}
357  count |              addr
358 -------+---------------------------------
359   5123 | bubulle@debian.org
360   4346 | joeyh@debian.org
361   4214 | biebl@debian.org
362   3875 | tbm@cyrius.com
363   3632 | ftpmaster@ftp-master.debian.org
364 \end{verbatim}
365 \end{frame}
366
367 \begin{frame}[fragile]{Single-message correspondents}
368 \small
369 \begin{minted}{sql}
370 SELECT count (*) FROM 
371 (SELECT count(*),c.addr 
372  FROM message_correspondent mc 
373  JOIN correspondent c ON 
374  mc.correspondent=c.id 
375  WHERE correspondent_type='from' 
376  GROUP BY mc.correspondent,
377  c.addr 
378  HAVING count(*) = 1) AS foo;
379 \end{minted}
380 \begin{verbatim}
381  count
382 -------
383  30215
384 \end{verbatim}
385 \end{frame}
386
387
388
389 \begin{frame}[fragile]{More fun queries}
390 \begin{minted}{sql}
391 SELECT count(*),t.tag 
392 FROM bug b 
393 JOIN bug_tag bt ON b.id=bt.bug 
394 JOIN tag t on bt.tag=t.id 
395 GROUP by bt.tag,t.tag 
396 ORDER by count DESC LIMIT 5;
397 \end{minted}
398 \begin{verbatim}
399  count  |      tag
400 --------+----------------
401  141184 | patch
402   42288 | upstream
403   39466 | sid
404   33640 | l10n
405   25566 | fixed-upstream
406 \end{verbatim}
407 \end{frame}
408
409 \subsection{Database status caching}
410 \begin{frame}[fragile]{Status caching ``working''}
411 \begin{minted}{sql}
412 SELECT count(*),status 
413 FROM bug_status_cache bsc 
414 JOIN suite s ON bsc.suite=s.id 
415 WHERE s.suite_name='unstable' 
416 GROUP by status;
417 \end{minted}
418 \begin{verbatim}
419  count  | status
420 --------+--------
421  514488 | fixed
422  234155 | absent
423    3923 | found
424 \end{verbatim}
425 \end{frame}
426
427 \subsection{Work still needed for SQL}
428 \begin{frame}{Work Still needed for SQL}
429 \begin{itemize}
430 \item Integration into CGI (\texttt{bugreport.cgi} and
431   \texttt{pkgreport.cgi})
432 \item Database loading/update is slow in some cases
433 \item Some corrupted bugs have been exposed by the loading (#167851
434   and #280931); likely others
435 \item Testing (Mainly of queries)
436 \item Deployment
437 \end{itemize}
438 \end{frame}
439
440 \section{New(ish) Features}
441
442 \subsection{New Changes}
443 \begin{frame}{New Changes}
444   \begin{columns}
445     \column{0.5\textwidth}
446     \begin{itemize}
447   \item Format-flowed messages are wrapped
448   \item https links everywhere
449   \item etag caching support everywhere
450   \item a11y (accessibility, ♿) tag
451   \item newcomer (⎈) tag
452   \item Usercategories now selectable (Categorize/order using)
453   \end{itemize}
454     \column{0.5\textwidth}
455     \includegraphics[width=\textwidth,keepaspectratio]{images/telegraph_bug}
456 \end{columns}
457 \end{frame}
458
459 \section{Contributing to Debbugs}
460
461 \begin{frame}{7 tasks seeking contributors}
462   \begin{itemize}
463   \item Documentation of Usercategories
464   \item Implementation of rss feeds for packages and bugs
465   \item CGI options on pkgreport.cgi for usertags et al. \#536378)
466   \item Documentation of multiple-package reassign and when it or
467     affects should be used
468   \item Documentation for local-debbugs configuration file (behaves
469     like bts select)
470   \end{itemize}
471 \end{frame}
472
473 \begin{frame}{Getting started on these tasks}
474   \begin{itemize}
475   \item Upstream branches: \url{http://bugs.debian.org/debbugs-source/}
476     \begin{itemize}
477     \item master (upstream debbugs): git clone \url{http://bugs.debian.org/debbugs-source/debbugs.git}
478     \item debian (debian branch): git clone -b debian \url{http://bugs.debian.org/debbugs-source/debbugs.git}
479     \item Checked out branches are also available at
480       \url{http://bugs.debian.org/debbugs-source/master} and
481       \url{http://bugs.debian.org/debbugs-source/debian}
482     \end{itemize}
483   \item My branches: \url{http://git.donarmstrong.com/debbugs.git}
484   \item Mailing list debian-debbugs@lists.debian.org
485   \item IRC \#debbugs or \#debian-bugs on irc.debian.org; I'm dondelelcaro
486   \end{itemize}
487 \end{frame}
488
489 \begin{frame}[fragile]{Using \texttt{local-debbugs} to run these tasks}
490 \footnotesize
491 \begin{minted}{sh}
492 git clone \
493  https://bugs.debian.org/debbugs-source/debbugs.git
494 cd debbugs
495 # get some bugs
496 perl -I. ./bin/local-debbugs --mirror
497 # start a web daemon
498 perl -I. ./bin/local-debbugs --daemon
499 # show some of my bugs (use your own search here)
500 perl -I. ./bin/local-debbugs --search bugs.debian.org
501 # stop the daemon
502 perl -I. ./bin/local-debbugs --stop
503 # hack and repeat
504 perl -I. ./bin/local-debbugs --daemon
505 perl -I. ./bin/local-debbugs --show 614351
506 \end{minted}
507 \end{frame}
508
509 \begin{frame}{The Debbugs Team}
510   \begin{itemize}
511   \item Current team
512     \begin{itemize}
513     \item Don Armstrong
514     \item Blars Blarson
515     \item Colin Watson
516     \end{itemize}
517   \item Emeritus Developers
518     \begin{itemize}
519     \item Steiner Gunderson
520     \item Adam Heath
521     \item Josip Rodin
522     \item Anthony Towns
523     \end{itemize}
524   \item You!
525   \end{itemize}
526 \end{frame}
527
528 \begin{frame}{Questions?}
529 \begin{center}
530 \includegraphics[height=0.8\textheight,keepaspectratio]{images/relevant_xkcd}
531 \end{center}
532 \end{frame}
533
534 \end{document}
535
536