Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit ca1d534

Browse files
committed
Separate non-blocking from blocking builds in E2E results page.
1 parent dba64c5 commit ca1d534

File tree

3 files changed

+41
-8
lines changed

3 files changed

+41
-8
lines changed

mungegithub/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ secret:
6969
clean:
7070
rm -f mungegithub $(APP)/local.deployment.yaml $(APP)/local.secret.yaml
7171

72+
# pull down current public queue state, and run UI based off that data
73+
ui-stub:
74+
@/bin/bash -c "wget -q -r -nH -P ./submit-queue/www http://submit-queue.k8s.io/{prs,github-e2e-queue,history,sq-stats,stats,users,health,google-internal-ci,priority-info,merge-info}; \
75+
pushd ./submit-queue/www; \
76+
python -m SimpleHTTPServer;"
77+
7278
help:
7379
@echo "ENVIRONMENT VARS:"
7480
@echo " REPO= repository for the docker image being build. Default: $(REPO)"

mungegithub/submit-queue/www/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,21 @@ <h4 class="md-body-2">{{pr.Reason}}</h4>
148148
<md-toolbar class="md-whiteframe-z2">
149149
<h2 class="md-toolbar-tools">End-to-End Results</h2>
150150
</md-toolbar>
151+
<h2 class="md-title" ng-show="cntl.builds.length > 0">Queue-Blocking Builds</h2>
151152
<md-chips ng-model="cntl.builds" readonly="true">
152153
<md-chip-template title="{{$chip.msg}}">
153154
<span style="color: {{$chip.color}}">{{$chip.state}}</span> <a ng-href="http://ci-test.k8s.io/{{$chip.name}}/{{$chip.id}}/">{{$chip.name}}</a>
154155
<span style="color: {{$chip.color}}">{{$chip.msg}}</span> <span title="Job stability">{{$chip.stability}}</span>
155156
</md-chip-template>
156157
</md-chips>
158+
<h2 class="md-title" ng-show="cntl.nonBlockingBuilds.length > 0">Non-Queue-Blocking Builds</h2>
159+
<md-chips ng-model="cntl.nonBlockingBuilds" readonly="true">
160+
<md-chip-template title="{{$chip.msg}}">
161+
<span style="color: {{$chip.color}}">{{$chip.state}}</span> <a ng-href="http://ci-test.k8s.io/{{$chip.name}}/{{$chip.id}}/">{{$chip.name}}</a>
162+
<span style="color: {{$chip.color}}">{{$chip.msg}}</span> <span title="Job stability">{{$chip.stability}}</span>
163+
</md-chip-template>
164+
</md-chips>
165+
<br>
157166
<br>
158167
<h2 class="md-title" ng-show="cntl.OverallHealth.length > 0">Overall Health: {{ cntl.OverallHealth }}</h2>
159168
<p>Health percents are the fraction of the time that a given job is stable for the last day, or since the submit queue restarted ({{ cntl.sqStats.StartTime | date:'medium'}})</span>, whichever is shorter. The <a href="http://storage.googleapis.com/kubernetes-test-history/static/index.html"><strong>24-Hour Test Report</strong></a> shows more detail, along with a list of flaky and broken tests in merge-blocking jobs.</p>

mungegithub/submit-queue/www/script.js

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function SQCntl(dataService, $interval, $location) {
1111
var self = this;
1212
self.prs = {};
1313
self.builds = {};
14+
self.nonBlockingBuilds = {};
1415
self.health = {};
1516
self.lastMergeTime = Date();
1617
self.prQuerySearch = prQuerySearch;
@@ -165,21 +166,23 @@ function SQCntl(dataService, $interval, $location) {
165166
var percentStable = self.health.NumStable * 100.0 / self.health.TotalLoops;
166167
self.OverallHealth = Math.round(percentStable) + "%";
167168
}
168-
updateBuildStability(self.builds, self.health);
169+
updateBuildStability(self.builds, self.nonBlockingBuilds, self.health);
169170
});
170171
}
171172

172173
function refreshGoogleInternalCI() {
173174
dataService.getData('google-internal-ci').then(function successCallback(response) {
174175
var result = getE2E(response.data);
175176
self.builds = result.builds;
176-
updateBuildStability(self.builds, self.health);
177+
self.nonBlockingBuilds = result.nonBlockingBuilds;
178+
updateBuildStability(self.builds, self.nonBlockingBuilds, self.health);
177179
self.failedBuild = result.failedBuild;
178180
});
179181
}
180182

181183
function getE2E(builds) {
182184
var result = [];
185+
var nonBlockingResult = [];
183186
var failedBuild = false;
184187
angular.forEach(builds, function(job, key) {
185188
var obj = {
@@ -235,19 +238,25 @@ function SQCntl(dataService, $interval, $location) {
235238
failedBuild = true;
236239
}
237240
obj.stability = '';
238-
result.push(obj);
241+
if (!obj.msg) {
242+
result.push(obj);
243+
} else {
244+
if (obj.msg.includes('[nonblocking]')) {
245+
obj.msg = obj.msg.replace('[nonblocking]', '');
246+
nonBlockingResult.push(obj);
247+
} else {
248+
result.push(obj);
249+
}
250+
}
239251
});
240252
return {
241253
builds: result,
254+
nonBlockingBuilds: nonBlockingResult,
242255
failedBuild: failedBuild,
243256
};
244257
}
245258

246-
function updateBuildStability(builds, health) {
247-
if (Object.keys(builds).length === 0 ||
248-
health.TotalLoops === 0 || health.NumStablePerJob === undefined) {
249-
return;
250-
}
259+
function updateBuildStabilityHelper(builds, health) {
251260
angular.forEach(builds, function(build) {
252261
var key = build.name;
253262
if (key in self.health.NumStablePerJob) {
@@ -257,6 +266,15 @@ function SQCntl(dataService, $interval, $location) {
257266
});
258267
}
259268

269+
function updateBuildStability(builds, nonBlockingBuilds, health) {
270+
if (Object.keys(builds).length === 0 ||
271+
health.TotalLoops === 0 || health.NumStablePerJob === undefined) {
272+
return;
273+
}
274+
updateBuildStabilityHelper(builds, health);
275+
updateBuildStabilityHelper(nonBlockingBuilds, health);
276+
}
277+
260278
function searchTermsContain(terms, value) {
261279
var found = false;
262280
angular.forEach(terms, function(term) {

0 commit comments

Comments
 (0)