Skip to content

Commit 416a875

Browse files
committed
Remove deprecated /api/v1/buildProperties.php endpoint
1 parent e77c93c commit 416a875

File tree

7 files changed

+1
-586
lines changed

7 files changed

+1
-586
lines changed

app/Http/Controllers/BuildPropertiesController.php

Lines changed: 0 additions & 289 deletions
This file was deleted.

app/cdash/app/Controller/Api/Timeline.php

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public function getResponse()
6868

6969
// Generate data based on the page that's requesting this chart.
7070
switch ($page) {
71-
case 'buildProperties.php':
72-
return $this->chartForBuildProperties();
7371
case 'testOverview.php':
7472
return $this->chartForTestOverview();
7573
case 'viewBuildGroup.php':
@@ -93,52 +91,6 @@ private function generateColorMap(): void
9391
}
9492
}
9593

96-
private function chartForBuildProperties()
97-
{
98-
$request = request();
99-
$defect_types = $request->session()->get('defecttypes');
100-
101-
if (!$defect_types) {
102-
abort(400, 'No defecttypes defined in your session');
103-
}
104-
$this->defectTypes = $defect_types;
105-
106-
// Construct an SQL SELECT clause for the requested types of defects.
107-
$defect_keys = [];
108-
$valid_defect_types = [
109-
'configureerrors',
110-
'configurewarnings',
111-
'builderrors',
112-
'buildwarnings',
113-
'testnotrun',
114-
'testfailed',
115-
'testpassed',
116-
];
117-
foreach ($this->defectTypes as $type) {
118-
if (!in_array($type['name'], $valid_defect_types, true)) {
119-
abort(400, "Invalid defect type: {$type['name']}");
120-
}
121-
$defect_keys[] = $type['name'];
122-
}
123-
$defect_selection = implode(', ', $defect_keys);
124-
$stmt = $this->db->prepare("
125-
SELECT
126-
id,
127-
$defect_selection,
128-
starttime
129-
FROM build b
130-
WHERE
131-
projectid = ?
132-
AND parentid IN (0, -1)
133-
ORDER BY starttime
134-
");
135-
if (!pdo_execute($stmt, [$this->project->Id])) {
136-
abort(500, 'Failed to load results');
137-
}
138-
139-
return $this->getTimelineChartData($stmt);
140-
}
141-
14294
private function chartForTestOverview(): array
14395
{
14496
$this->defectTypes = [

app/cdash/tests/ctest/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,8 @@ set_tests_properties(indexfilters PROPERTIES DEPENDS submitsortingdata)
7373
add_php_test(timeline)
7474
set_tests_properties(timeline PROPERTIES DEPENDS indexfilters)
7575

76-
add_laravel_test(Feature/Timeline)
77-
set_tests_properties(Feature/Timeline PROPERTIES DEPENDS timeline)
78-
7976
add_php_test(nobackup)
80-
set_tests_properties(nobackup PROPERTIES DEPENDS Feature/Timeline)
77+
set_tests_properties(nobackup PROPERTIES DEPENDS timeline)
8178

8279
# TODO: (sbelsk) revisit why this test fails and add proper dependencies
8380
#add_php_test(parallelsubmissions)

app/cdash/tests/test_buildproperties.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,6 @@ public function testUploadBuildProperties(): void
116116
$warning->Insert();
117117
}
118118

119-
public function testListDefects(): void
120-
{
121-
$buildids = [];
122-
foreach ($this->Builds as $name => $build) {
123-
$buildids[] = $build->Id;
124-
}
125-
$defects = ['builderrors', 'buildwarnings', 'testfailed'];
126-
$query_string = http_build_query(['buildid' => $buildids, 'defect' => $defects]);
127-
$this->get($this->url . "/api/v1/buildProperties.php?$query_string");
128-
$content = $this->getBrowser()->getContent();
129-
$jsonobj = json_decode($content, true);
130-
$num_defects = count($jsonobj['defects']);
131-
if ($num_defects !== 3) {
132-
$this->fail("Expected 3 defects, found $num_defects");
133-
}
134-
}
135-
136119
private function create_build($buildname, $filename, $date, $md5): void
137120
{
138121
$timestamp = strtotime($date);

0 commit comments

Comments
 (0)