Skip to content

Commit 1ee1c29

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 914c56e commit 1ee1c29

6 files changed

Lines changed: 2 additions & 210 deletions

File tree

app/Http/Controllers/BuildController.php

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
use CDash\Model\BuildRelationship;
2222
use CDash\ServiceContainer;
2323
use Illuminate\Http\JsonResponse;
24-
use Illuminate\Http\RedirectResponse;
2524
use Illuminate\Http\Request;
2625
use Illuminate\Support\Carbon;
2726
use Illuminate\Support\Facades\Auth;
@@ -537,93 +536,6 @@ public function apiBuildSummary(): JsonResponse
537536
return response()->json(cast_data_for_JSON($response));
538537
}
539538

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

app/cdash/tests/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,8 @@ set_tests_properties(buildconfigure PROPERTIES DEPENDS aggregatecoverage)
552552
add_php_test(buildgrouprule)
553553
set_tests_properties(buildgrouprule PROPERTIES DEPENDS buildconfigure)
554554

555-
add_php_test(buildoverview)
556-
set_tests_properties(buildoverview PROPERTIES DEPENDS buildgrouprule)
557-
558555
add_php_test(committerinfo)
559-
set_tests_properties(committerinfo PROPERTIES DEPENDS buildoverview)
556+
set_tests_properties(committerinfo PROPERTIES DEPENDS buildgrouprule)
560557

561558
add_php_test(displayimage)
562559
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
@@ -717,7 +717,7 @@ parameters:
717717
-
718718
rawMessage: Cannot cast mixed to int.
719719
identifier: cast.int
720-
count: 12
720+
count: 11
721721
path: app/Http/Controllers/BuildController.php
722722

723723
-
@@ -780,12 +780,6 @@ parameters:
780780
count: 1
781781
path: app/Http/Controllers/BuildController.php
782782

783-
-
784-
rawMessage: 'Method App\Http\Controllers\BuildController::buildOverview() never returns Illuminate\Http\RedirectResponse so it can be removed from the return type.'
785-
identifier: return.unusedType
786-
count: 1
787-
path: app/Http/Controllers/BuildController.php
788-
789783
-
790784
rawMessage: 'Method App\Http\Controllers\BuildController::marshalBuildError() has parameter $data with no value type specified in iterable type array.'
791785
identifier: missingType.iterableValue
@@ -894,12 +888,6 @@ parameters:
894888
count: 4
895889
path: app/Http/Controllers/BuildController.php
896890

897-
-
898-
rawMessage: 'Parameter #1 $string of function htmlspecialchars expects string, mixed given.'
899-
identifier: argument.type
900-
count: 2
901-
path: app/Http/Controllers/BuildController.php
902-
903891
-
904892
rawMessage: 'Parameter #1 $value of function count expects array|Countable, array|false given.'
905893
identifier: argument.type
@@ -912,12 +900,6 @@ parameters:
912900
count: 11
913901
path: app/Http/Controllers/BuildController.php
914902

915-
-
916-
rawMessage: 'Parameter #2 $timestamp of function gmdate expects int|null, (float|int) given.'
917-
identifier: argument.type
918-
count: 1
919-
path: app/Http/Controllers/BuildController.php
920-
921903
-
922904
rawMessage: 'Parameter #3 $length of function substr expects int|null, int|false given.'
923905
identifier: argument.type
@@ -19077,18 +19059,6 @@ parameters:
1907719059
count: 1
1907819060
path: app/cdash/tests/test_buildmodel.php
1907919061

19080-
-
19081-
rawMessage: 'Call to deprecated method pass() of class SimpleTestCase.'
19082-
identifier: method.deprecated
19083-
count: 1
19084-
path: app/cdash/tests/test_buildoverview.php
19085-
19086-
-
19087-
rawMessage: 'Method BuildOverviewTestCase::testBuildOverview() has no return type specified.'
19088-
identifier: missingType.return
19089-
count: 1
19090-
path: app/cdash/tests/test_buildoverview.php
19091-
1909219062
-
1909319063
rawMessage: '''
1909419064
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
@@ -257,8 +257,6 @@
257257

258258
Route::get('/compareCoverage.php', 'CoverageController@compareCoverage');
259259

260-
Route::match(['get', 'post'], '/buildOverview.php', 'BuildController@buildOverview');
261-
262260
Route::get('/viewBuildGroup.php', 'BuildController@viewBuildGroup');
263261

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

0 commit comments

Comments
 (0)