Add a sample-command workflow

This commit is contained in:
Graham Christensen 2017-11-06 12:38:23 -05:00
parent 3b88c46627
commit f7377c1584
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
2 changed files with 175 additions and 0 deletions

18
doc/sample.dot Normal file
View file

@ -0,0 +1,18 @@
digraph ClassDiagram {
"PR approved to build,\n`@grahamcofborg sample 10`" -> "does the PR change stdenv?";
"does the PR change stdenv?" -> "refuse, won't do\nmass rebuilds" [label="yes"];
"does the PR change stdenv?" -> "stdenv already built?" [label="no"];
"stdenv already built?" -> "Comment:\n(stdenv not available, will retry later.)" [label="no"];
"Comment:\n(stdenv not available, will retry later.)" ->
"put the build job back to the delayed build queue";
"put the build job back to the delayed build queue" ->
"5 min later...";
"5 min later..." -> "stdenv built yet?";
"stdenv built yet?" -> "put the build job back to the delayed build queue"[label="no"];
"stdenv built yet?" -> "proceed with build"[label="yes"];
"stdenv already built?" -> "proceed with build" [label="yes"];
"proceed with build" -> "diff prev commit's drvs with current commit's drvs";
"diff prev commit's drvs with current commit's drvs" -> "select 10 drvs";
"select 10 drvs" -> "build them";
"build them" -> "comment on github issue with a build report";
}

157
doc/sample.svg Normal file
View file

@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.36.0 (20140111.2315)
-->
<!-- Title: ClassDiagram Pages: 1 -->
<svg width="558pt" height="968pt"
viewBox="0.00 0.00 558.00 968.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 964)">
<title>ClassDiagram</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-964 554,-964 554,4 -4,4"/>
<!-- PR approved to build,\n`@grahamcofborg sample 10` -->
<g id="node1" class="node"><title>PR approved to build,\n`@grahamcofborg sample 10`</title>
<ellipse fill="none" stroke="black" cx="220" cy="-933" rx="128.54" ry="26.7407"/>
<text text-anchor="middle" x="220" y="-936.8" font-family="Times,serif" font-size="14.00">PR approved to build,</text>
<text text-anchor="middle" x="220" y="-921.8" font-family="Times,serif" font-size="14.00">`@grahamcofborg sample 10`</text>
</g>
<!-- does the PR change stdenv? -->
<g id="node2" class="node"><title>does the PR change stdenv?</title>
<ellipse fill="none" stroke="black" cx="220" cy="-850" rx="109.261" ry="18"/>
<text text-anchor="middle" x="220" y="-846.3" font-family="Times,serif" font-size="14.00">does the PR change stdenv?</text>
</g>
<!-- PR approved to build,\n`@grahamcofborg sample 10`&#45;&gt;does the PR change stdenv? -->
<g id="edge1" class="edge"><title>PR approved to build,\n`@grahamcofborg sample 10`&#45;&gt;does the PR change stdenv?</title>
<path fill="none" stroke="black" d="M220,-905.925C220,-897.114 220,-887.254 220,-878.347"/>
<polygon fill="black" stroke="black" points="223.5,-878.088 220,-868.088 216.5,-878.088 223.5,-878.088"/>
</g>
<!-- refuse, won&#39;t do\nmass rebuilds -->
<g id="node3" class="node"><title>refuse, won&#39;t do\nmass rebuilds</title>
<ellipse fill="none" stroke="black" cx="166" cy="-753" rx="73.3085" ry="26.7407"/>
<text text-anchor="middle" x="166" y="-756.8" font-family="Times,serif" font-size="14.00">refuse, won&#39;t do</text>
<text text-anchor="middle" x="166" y="-741.8" font-family="Times,serif" font-size="14.00">mass rebuilds</text>
</g>
<!-- does the PR change stdenv?&#45;&gt;refuse, won&#39;t do\nmass rebuilds -->
<g id="edge2" class="edge"><title>does the PR change stdenv?&#45;&gt;refuse, won&#39;t do\nmass rebuilds</title>
<path fill="none" stroke="black" d="M210.346,-832.016C203.462,-819.906 193.97,-803.207 185.534,-788.365"/>
<polygon fill="black" stroke="black" points="188.434,-786.385 180.45,-779.421 182.349,-789.844 188.434,-786.385"/>
<text text-anchor="middle" x="208.5" y="-802.3" font-family="Times,serif" font-size="14.00">yes</text>
</g>
<!-- stdenv already built? -->
<g id="node4" class="node"><title>stdenv already built?</title>
<ellipse fill="none" stroke="black" cx="342" cy="-753" rx="84.2388" ry="18"/>
<text text-anchor="middle" x="342" y="-749.3" font-family="Times,serif" font-size="14.00">stdenv already built?</text>
</g>
<!-- does the PR change stdenv?&#45;&gt;stdenv already built? -->
<g id="edge3" class="edge"><title>does the PR change stdenv?&#45;&gt;stdenv already built?</title>
<path fill="none" stroke="black" d="M241.53,-832.235C261.304,-816.837 290.776,-793.888 312.691,-776.822"/>
<polygon fill="black" stroke="black" points="314.945,-779.503 320.685,-770.598 310.644,-773.98 314.945,-779.503"/>
<text text-anchor="middle" x="291" y="-802.3" font-family="Times,serif" font-size="14.00">no</text>
</g>
<!-- Comment:\n(stdenv not available, will retry later.) -->
<g id="node5" class="node"><title>Comment:\n(stdenv not available, will retry later.)</title>
<ellipse fill="none" stroke="black" cx="204" cy="-647" rx="158.088" ry="26.7407"/>
<text text-anchor="middle" x="204" y="-650.8" font-family="Times,serif" font-size="14.00">Comment:</text>
<text text-anchor="middle" x="204" y="-635.8" font-family="Times,serif" font-size="14.00">(stdenv not available, will retry later.)</text>
</g>
<!-- stdenv already built?&#45;&gt;Comment:\n(stdenv not available, will retry later.) -->
<g id="edge4" class="edge"><title>stdenv already built?&#45;&gt;Comment:\n(stdenv not available, will retry later.)</title>
<path fill="none" stroke="black" d="M320.133,-735.521C300.195,-720.495 270.199,-697.889 245.687,-679.416"/>
<polygon fill="black" stroke="black" points="247.7,-676.55 237.607,-673.327 243.487,-682.141 247.7,-676.55"/>
<text text-anchor="middle" x="288" y="-696.3" font-family="Times,serif" font-size="14.00">no</text>
</g>
<!-- proceed with build -->
<g id="node9" class="node"><title>proceed with build</title>
<ellipse fill="none" stroke="black" cx="358" cy="-314" rx="77.0154" ry="18"/>
<text text-anchor="middle" x="358" y="-310.3" font-family="Times,serif" font-size="14.00">proceed with build</text>
</g>
<!-- stdenv already built?&#45;&gt;proceed with build -->
<g id="edge10" class="edge"><title>stdenv already built?&#45;&gt;proceed with build</title>
<path fill="none" stroke="black" d="M357.614,-735.048C373.874,-715.569 397,-681.905 397,-648 397,-648 397,-648 397,-401 397,-379.145 386.424,-356.73 376.287,-340.265"/>
<polygon fill="black" stroke="black" points="379.152,-338.252 370.77,-331.772 373.282,-342.065 379.152,-338.252"/>
<text text-anchor="middle" x="406.5" y="-516.3" font-family="Times,serif" font-size="14.00">yes</text>
</g>
<!-- put the build job back to the delayed build queue -->
<g id="node6" class="node"><title>put the build job back to the delayed build queue</title>
<ellipse fill="none" stroke="black" cx="184" cy="-564" rx="184.375" ry="18"/>
<text text-anchor="middle" x="184" y="-560.3" font-family="Times,serif" font-size="14.00">put the build job back to the delayed build queue</text>
</g>
<!-- Comment:\n(stdenv not available, will retry later.)&#45;&gt;put the build job back to the delayed build queue -->
<g id="edge5" class="edge"><title>Comment:\n(stdenv not available, will retry later.)&#45;&gt;put the build job back to the delayed build queue</title>
<path fill="none" stroke="black" d="M197.562,-619.925C195.362,-611.017 192.898,-601.037 190.68,-592.053"/>
<polygon fill="black" stroke="black" points="194.015,-590.958 188.219,-582.088 187.219,-592.636 194.015,-590.958"/>
</g>
<!-- 5 min later... -->
<g id="node7" class="node"><title>5 min later...</title>
<ellipse fill="none" stroke="black" cx="184" cy="-476" rx="57.2927" ry="18"/>
<text text-anchor="middle" x="184" y="-472.3" font-family="Times,serif" font-size="14.00">5 min later...</text>
</g>
<!-- put the build job back to the delayed build queue&#45;&gt;5 min later... -->
<g id="edge6" class="edge"><title>put the build job back to the delayed build queue&#45;&gt;5 min later...</title>
<path fill="none" stroke="black" d="M184,-545.597C184,-533.746 184,-517.817 184,-504.292"/>
<polygon fill="black" stroke="black" points="187.5,-504.084 184,-494.084 180.5,-504.084 187.5,-504.084"/>
</g>
<!-- stdenv built yet? -->
<g id="node8" class="node"><title>stdenv built yet?</title>
<ellipse fill="none" stroke="black" cx="277" cy="-402" rx="69.3156" ry="18"/>
<text text-anchor="middle" x="277" y="-398.3" font-family="Times,serif" font-size="14.00">stdenv built yet?</text>
</g>
<!-- 5 min later...&#45;&gt;stdenv built yet? -->
<g id="edge7" class="edge"><title>5 min later...&#45;&gt;stdenv built yet?</title>
<path fill="none" stroke="black" d="M204.64,-459.021C217.433,-449.116 234.057,-436.246 248.144,-425.341"/>
<polygon fill="black" stroke="black" points="250.332,-428.073 256.096,-419.183 246.047,-422.538 250.332,-428.073"/>
</g>
<!-- stdenv built yet?&#45;&gt;put the build job back to the delayed build queue -->
<g id="edge8" class="edge"><title>stdenv built yet?&#45;&gt;put the build job back to the delayed build queue</title>
<path fill="none" stroke="black" d="M274.426,-420.06C271.007,-439.101 263.73,-470.339 250,-494 240.193,-510.899 225.426,-526.864 212.345,-539.173"/>
<polygon fill="black" stroke="black" points="209.916,-536.651 204.888,-545.977 214.634,-541.822 209.916,-536.651"/>
<text text-anchor="middle" x="272" y="-472.3" font-family="Times,serif" font-size="14.00">no</text>
</g>
<!-- stdenv built yet?&#45;&gt;proceed with build -->
<g id="edge9" class="edge"><title>stdenv built yet?&#45;&gt;proceed with build</title>
<path fill="none" stroke="black" d="M292.618,-384.418C304.642,-371.652 321.445,-353.812 335.005,-339.415"/>
<polygon fill="black" stroke="black" points="337.845,-341.503 342.154,-331.824 332.75,-336.704 337.845,-341.503"/>
<text text-anchor="middle" x="333.5" y="-354.3" font-family="Times,serif" font-size="14.00">yes</text>
</g>
<!-- diff prev commit&#39;s drvs with current commit&#39;s drvs -->
<g id="node10" class="node"><title>diff prev commit&#39;s drvs with current commit&#39;s drvs</title>
<ellipse fill="none" stroke="black" cx="358" cy="-240" rx="192.075" ry="18"/>
<text text-anchor="middle" x="358" y="-236.3" font-family="Times,serif" font-size="14.00">diff prev commit&#39;s drvs with current commit&#39;s drvs</text>
</g>
<!-- proceed with build&#45;&gt;diff prev commit&#39;s drvs with current commit&#39;s drvs -->
<g id="edge11" class="edge"><title>proceed with build&#45;&gt;diff prev commit&#39;s drvs with current commit&#39;s drvs</title>
<path fill="none" stroke="black" d="M358,-295.937C358,-287.807 358,-277.876 358,-268.705"/>
<polygon fill="black" stroke="black" points="361.5,-268.441 358,-258.441 354.5,-268.441 361.5,-268.441"/>
</g>
<!-- select 10 drvs -->
<g id="node11" class="node"><title>select 10 drvs</title>
<ellipse fill="none" stroke="black" cx="358" cy="-166" rx="59.1941" ry="18"/>
<text text-anchor="middle" x="358" y="-162.3" font-family="Times,serif" font-size="14.00">select 10 drvs</text>
</g>
<!-- diff prev commit&#39;s drvs with current commit&#39;s drvs&#45;&gt;select 10 drvs -->
<g id="edge12" class="edge"><title>diff prev commit&#39;s drvs with current commit&#39;s drvs&#45;&gt;select 10 drvs</title>
<path fill="none" stroke="black" d="M358,-221.937C358,-213.807 358,-203.876 358,-194.705"/>
<polygon fill="black" stroke="black" points="361.5,-194.441 358,-184.441 354.5,-194.441 361.5,-194.441"/>
</g>
<!-- build them -->
<g id="node12" class="node"><title>build them</title>
<ellipse fill="none" stroke="black" cx="358" cy="-92" rx="49.0941" ry="18"/>
<text text-anchor="middle" x="358" y="-88.3" font-family="Times,serif" font-size="14.00">build them</text>
</g>
<!-- select 10 drvs&#45;&gt;build them -->
<g id="edge13" class="edge"><title>select 10 drvs&#45;&gt;build them</title>
<path fill="none" stroke="black" d="M358,-147.937C358,-139.807 358,-129.876 358,-120.705"/>
<polygon fill="black" stroke="black" points="361.5,-120.441 358,-110.441 354.5,-120.441 361.5,-120.441"/>
</g>
<!-- comment on github issue with a build report -->
<g id="node13" class="node"><title>comment on github issue with a build report</title>
<ellipse fill="none" stroke="black" cx="358" cy="-18" rx="168.478" ry="18"/>
<text text-anchor="middle" x="358" y="-14.3" font-family="Times,serif" font-size="14.00">comment on github issue with a build report</text>
</g>
<!-- build them&#45;&gt;comment on github issue with a build report -->
<g id="edge14" class="edge"><title>build them&#45;&gt;comment on github issue with a build report</title>
<path fill="none" stroke="black" d="M358,-73.937C358,-65.8072 358,-55.8761 358,-46.7047"/>
<polygon fill="black" stroke="black" points="361.5,-46.4406 358,-36.4407 354.5,-46.4407 361.5,-46.4406"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB