Skip to content

Commit e66fab4

Browse files
committed
Remove build overview page
This page has been broken on and off for years, and is no longer referenced in the UI. The main use case, tracking inconsistent build errors, is far less common than tracking flaky test errors. In the future, there may be a place for this functionality as a widget on another page. Interested users are encouraged to file an issue describing their use cases.
1 parent c7019c8 commit e66fab4

File tree

6 files changed

+2
-210
lines changed

6 files changed

+2
-210
lines changed

app/Http/Controllers/BuildController.php

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use CDash\Model\BuildGroupRule;
1919
use CDash\Model\BuildRelationship;
2020
use Illuminate\Http\JsonResponse;
21-
use Illuminate\Http\RedirectResponse;
2221
use Illuminate\Http\Request;
2322
use Illuminate\Support\Carbon;
2423
use Illuminate\Support\Facades\Auth;
@@ -534,93 +533,6 @@ public function apiBuildSummary(): JsonResponse
534533
return response()->json(cast_data_for_JSON($response));
535534
}
536535

537-
/**
538-
* TODO: (williamjallen) this function contains legacy XSL templating and should be converted
539-
* to a proper Blade template with Laravel-based DB queries eventually. This contents
540-
* this function are originally from buildOverview.php and have been copied (almost) as-is.
541-
*/
542-
public function buildOverview(): View|RedirectResponse
543-
{
544-
$this->setProjectByName(htmlspecialchars($_GET['project'] ?? ''));
545-
546-
$date = htmlspecialchars($_GET['date'] ?? '');
547-
548-
// We select the builds
549-
$currentstarttime = get_dates($date, $this->project->NightlyTime)[1];
550-
551-
// Return the available groups
552-
$selected_group = (int) ($_POST['groupSelection'] ?? 0);
553-
554-
// Check the builds
555-
$beginning_timestamp = $currentstarttime;
556-
$end_timestamp = $currentstarttime + 3600 * 24;
557-
558-
$beginning_UTCDate = gmdate(FMT_DATETIME, $beginning_timestamp);
559-
$end_UTCDate = gmdate(FMT_DATETIME, $end_timestamp);
560-
561-
$groupSelectionSQL = '';
562-
$params = [];
563-
if ($selected_group > 0) {
564-
$groupSelectionSQL = ' AND b2g.groupid=? ';
565-
$params[] = $selected_group;
566-
}
567-
568-
$builds = DB::select("
569-
SELECT
570-
s.name AS sitename,
571-
b.name AS buildname,
572-
be.type,
573-
be.sourcefile,
574-
be.sourceline,
575-
be.stderror as text
576-
FROM
577-
build AS b,
578-
builderror as be,
579-
site AS s,
580-
build2group AS b2g
581-
WHERE
582-
b.starttime<?
583-
AND b.starttime>?
584-
AND b.projectid=?
585-
AND be.buildid=b.id
586-
AND s.id=b.siteid
587-
AND b2g.buildid=b.id
588-
$groupSelectionSQL
589-
ORDER BY
590-
be.sourcefile ASC,
591-
be.type ASC,
592-
be.sourceline ASC
593-
", array_merge([$end_UTCDate, $beginning_UTCDate, $this->project->Id], $params));
594-
595-
$sourcefiles = [];
596-
597-
// NOTE: Query results are already ordered by sourcefile...
598-
foreach ($builds as $build_array) {
599-
$filename = $build_array->sourcefile;
600-
601-
if (!isset($sourcefiles[$filename])) {
602-
$sourcefiles[$filename] = [
603-
'name' => $filename,
604-
'errors' => [],
605-
'warnings' => [],
606-
];
607-
}
608-
609-
$type = (int) $build_array->type === 0 ? 'errors' : 'warnings';
610-
$sourcefiles[$filename][$type][] = [
611-
'line' => (int) $build_array->sourceline,
612-
'sitename' => $build_array->sitename,
613-
'buildname' => $build_array->buildname,
614-
'text' => $build_array->text,
615-
];
616-
}
617-
618-
return $this->view('build.overview', 'Build Overview')
619-
->with('selected_group', $selected_group)
620-
->with('sourcefiles', $sourcefiles)
621-
->with('startdate', date('l, F d Y H:i:s', $currentstarttime));
622-
}
623-
624536
public function viewUpdatePageContent(): JsonResponse
625537
{
626538
$pageTimer = new PageTimer();

app/cdash/tests/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,8 @@ set_tests_properties(buildconfigure PROPERTIES DEPENDS aggregatecoverage)
541541
add_php_test(buildgrouprule)
542542
set_tests_properties(buildgrouprule PROPERTIES DEPENDS buildconfigure)
543543

544-
add_php_test(buildoverview)
545-
set_tests_properties(buildoverview PROPERTIES DEPENDS buildgrouprule)
546-
547544
add_php_test(committerinfo)
548-
set_tests_properties(committerinfo PROPERTIES DEPENDS buildoverview)
545+
set_tests_properties(committerinfo PROPERTIES DEPENDS buildgrouprule)
549546

550547
add_php_test(displayimage)
551548
set_tests_properties(displayimage PROPERTIES DEPENDS committerinfo)

app/cdash/tests/test_buildoverview.php

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

phpstan-baseline.neon

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ parameters:
705705
-
706706
rawMessage: Cannot cast mixed to int.
707707
identifier: cast.int
708-
count: 11
708+
count: 10
709709
path: app/Http/Controllers/BuildController.php
710710

711711
-
@@ -756,12 +756,6 @@ parameters:
756756
count: 1
757757
path: app/Http/Controllers/BuildController.php
758758

759-
-
760-
rawMessage: 'Method App\Http\Controllers\BuildController::buildOverview() never returns Illuminate\Http\RedirectResponse so it can be removed from the return type.'
761-
identifier: return.unusedType
762-
count: 1
763-
path: app/Http/Controllers/BuildController.php
764-
765759
-
766760
rawMessage: 'Only numeric types are allowed in *, (int|false) given on the left side.'
767761
identifier: mul.leftNonNumeric
@@ -816,12 +810,6 @@ parameters:
816810
count: 4
817811
path: app/Http/Controllers/BuildController.php
818812

819-
-
820-
rawMessage: 'Parameter #1 $string of function htmlspecialchars expects string, mixed given.'
821-
identifier: argument.type
822-
count: 2
823-
path: app/Http/Controllers/BuildController.php
824-
825813
-
826814
rawMessage: 'Parameter #1 $value of function count expects array|Countable, array|false given.'
827815
identifier: argument.type
@@ -834,12 +822,6 @@ parameters:
834822
count: 11
835823
path: app/Http/Controllers/BuildController.php
836824

837-
-
838-
rawMessage: 'Parameter #2 $timestamp of function gmdate expects int|null, (float|int) given.'
839-
identifier: argument.type
840-
count: 1
841-
path: app/Http/Controllers/BuildController.php
842-
843825
-
844826
rawMessage: 'Parameter #3 $length of function substr expects int|null, int|false given.'
845827
identifier: argument.type
@@ -18372,18 +18354,6 @@ parameters:
1837218354
count: 1
1837318355
path: app/cdash/tests/test_buildmodel.php
1837418356

18375-
-
18376-
rawMessage: 'Call to deprecated method pass() of class SimpleTestCase.'
18377-
identifier: method.deprecated
18378-
count: 1
18379-
path: app/cdash/tests/test_buildoverview.php
18380-
18381-
-
18382-
rawMessage: 'Method BuildOverviewTestCase::testBuildOverview() has no return type specified.'
18383-
identifier: missingType.return
18384-
count: 1
18385-
path: app/cdash/tests/test_buildoverview.php
18386-
1838718357
-
1838818358
rawMessage: '''
1838918359
Call to deprecated function pdo_execute():

resources/views/build/overview.blade.php

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

routes/web.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@
255255

256256
Route::get('/testOverview.php', 'TestController@testOverview');
257257

258-
Route::match(['get', 'post'], '/buildOverview.php', 'BuildController@buildOverview');
259-
260258
Route::get('/viewBuildGroup.php', 'BuildController@viewBuildGroup');
261259

262260
Route::get('/viewSubProjects.php', 'SubProjectController@viewSubProjects');

0 commit comments

Comments
 (0)