Skip to content

Commit 90e3965

Browse files
committed
intermittent failure view fixes
1 parent 5dfca93 commit 90e3965

File tree

87 files changed

+518
-390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+518
-390
lines changed

comparison-tools/config_comparator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ def get_local_environment_config(self) -> dict[str, Any]:
154154
result = subprocess.run(["python", "--version"], capture_output=True, text=True)
155155
if result.returncode == 0:
156156
config["python_version"] = result.stdout.strip()
157-
except:
157+
except Exception:
158158
pass
159159

160160
try:
161161
result = subprocess.run(["node", "--version"], capture_output=True, text=True)
162162
if result.returncode == 0:
163163
config["node_version"] = result.stdout.strip()
164-
except:
164+
except Exception:
165165
pass
166166

167167
return config
@@ -421,7 +421,7 @@ def main():
421421

422422
try:
423423
comparison = comparator.run_comparison()
424-
report = comparator.generate_report(comparison, args.output)
424+
_report = comparator.generate_report(comparison, args.output)
425425

426426
# Exit with error code if there are significant differences
427427
significant_diffs = [

comparison-tools/db_comparator.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def get_database_info(self, conn: psycopg2.extensions.connection) -> dict[str, A
8585

8686
# Get table count
8787
cursor.execute("""
88-
SELECT COUNT(*) as table_count
89-
FROM information_schema.tables
88+
SELECT COUNT(*) as table_count
89+
FROM information_schema.tables
9090
WHERE table_schema = 'public';
9191
""")
9292
table_count = cursor.fetchone()["table_count"]
@@ -117,8 +117,8 @@ def get_table_info(
117117
cursor.execute(
118118
"""
119119
SELECT EXISTS (
120-
SELECT FROM information_schema.tables
121-
WHERE table_schema = 'public'
120+
SELECT FROM information_schema.tables
121+
WHERE table_schema = 'public'
122122
AND table_name = %s
123123
);
124124
""",
@@ -131,14 +131,14 @@ def get_table_info(
131131
# Get column information
132132
cursor.execute(
133133
"""
134-
SELECT
134+
SELECT
135135
column_name,
136136
data_type,
137137
is_nullable,
138138
column_default,
139139
character_maximum_length
140140
FROM information_schema.columns
141-
WHERE table_schema = 'public'
141+
WHERE table_schema = 'public'
142142
AND table_name = %s
143143
ORDER BY ordinal_position;
144144
""",
@@ -432,7 +432,7 @@ def main():
432432

433433
try:
434434
comparison = comparator.run_comparison()
435-
report = comparator.generate_report(comparison, args.output)
435+
_report = comparator.generate_report(comparison, args.output)
436436

437437
# Exit with error code if there are significant differences
438438
has_issues = (

comparison-tools/run_comparison.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def generate_html_report(self, master_report):
336336
<h1>Treeherder Master Comparison Report</h1>
337337
<p>Generated: {master_report["comparison_summary"]["timestamp"]}</p>
338338
</div>
339-
339+
340340
<div class="summary">
341341
<h2>Summary</h2>
342342
<p><strong>Local URL:</strong> {master_report["comparison_summary"]["local_base_url"]}</p>
@@ -346,15 +346,15 @@ def generate_html_report(self, master_report):
346346
<p><strong>Failed:</strong> {master_report["comparison_summary"]["failed_tools"]}</p>
347347
<p><strong>Success Rate:</strong> {master_report["comparison_summary"]["success_rate"]:.1f}%</p>
348348
</div>
349-
349+
350350
<div class="recommendations">
351351
<h2>Recommendations</h2>
352352
{self.format_recommendations_html(master_report["recommendations"])}
353353
</div>
354-
354+
355355
<h2>Tool Results</h2>
356356
{self.format_tool_results_html(master_report["tool_results"])}
357-
357+
358358
</body>
359359
</html>"""
360360

@@ -379,11 +379,11 @@ def format_tool_results_html(self, results):
379379
html += f"""
380380
<div class="tool-result {success_class}">
381381
<h3>{result["tool"].replace("_", " ").title()} - {status}</h3>
382-
382+
383383
{f"<p><strong>Report File:</strong> {result['report_file']}</p>" if result.get("report_file") else ""}
384-
384+
385385
{f"<h4>Output:</h4><pre>{result['output']}</pre>" if result.get("output") else ""}
386-
386+
387387
{f"<h4>Error:</h4><pre>{result['error']}</pre>" if result.get("error") else ""}
388388
</div>
389389
"""

ui/css/intermittent-failures.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,23 @@ ul {
6161
}
6262

6363
/* ReactTable style */
64+
.ReactTable .rt-thead .rt-tr,
65+
.ReactTable .rt-tbody .rt-tr,
66+
.ReactTable .rt-td,
67+
.ReactTable .rt-th {
68+
text-align: left;
69+
}
70+
71+
/* Keep pagination controls on one row */
72+
.ReactTable .-pagination {
73+
flex-wrap: nowrap;
74+
}
75+
76+
.ReactTable .-pagination .-center {
77+
flex-wrap: nowrap;
78+
white-space: nowrap;
79+
}
80+
6481
.ReactTable .-pagination .-btn:focus {
6582
box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
6683
}

ui/css/perf.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,3 +799,15 @@ li.pagination-active.active > button {
799799
font-size: 14px !important;
800800
color: white !important;
801801
}
802+
803+
/* Consistent checkbox sizing for alerts table */
804+
.compare-table .form-check-input {
805+
width: 1.25em;
806+
height: 1.25em;
807+
margin-top: 0.125em;
808+
cursor: pointer;
809+
}
810+
811+
.compare-table .form-check-input:disabled {
812+
cursor: not-allowed;
813+
}

ui/css/treeherder-custom-styles.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,25 @@
1010
* when adding new styles.
1111
*/
1212

13+
/* Set base font size to match pre-Bootstrap 5 styling */
14+
html {
15+
font-size: 14px;
16+
}
17+
18+
/* Ensure Bootstrap components inherit the base font size */
19+
.btn:not(.job-btn):not(.runnable-job-btn):not(.btn-push):not(.btn-view-nav):not(.btn-view-nav-closed):not(.group-btn):not(.group-symbol):not(.group-select-all-runnable),
20+
.dropdown-toggle,
21+
.dropdown-item,
22+
.dropdown-menu,
23+
.form-control,
24+
.form-select,
25+
.input-group-text,
26+
.alert,
27+
.nav-link,
28+
a {
29+
font-size: 1rem;
30+
}
31+
1332
/* Bootstrap 4 will not show <a> as a link style if it has no href.
1433
This adds that style back. */
1534
.link-style {
@@ -315,6 +334,12 @@
315334
color: #0d7d8f;
316335
}
317336

337+
.alert-info {
338+
color: #0c5460;
339+
background-color: #d1ecf1;
340+
border-color: #bee5eb;
341+
}
342+
318343
.alert-darker-info,
319344
.badge-darker-info {
320345
background: #0d7d8f;

ui/css/treeherder-navbar.css

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ label.dropdown-item.active,
7373

7474
.navbar-right {
7575
display: flex;
76-
justify-content: flex-end;
76+
align-items: center;
7777
}
7878

7979
.nav-menu-btn {
8080
margin-right: -4px;
8181
padding-left: 14px;
8282
padding-right: 14px;
83-
font-size: 13px;
83+
font-size: 14px;
8484
}
8585

8686
.nav-menu-btn.dropdown-toggle {
@@ -127,6 +127,7 @@ secondary-nav-bar {
127127
width: 100%;
128128
display: flex;
129129
background-color: #354048;
130+
min-height: 33px;
130131
}
131132

132133
.tree-closed {
@@ -257,7 +258,8 @@ secondary-nav-bar {
257258

258259
.btn-unclassified-failures {
259260
margin-top: 1px;
260-
padding: 3px 10px;
261+
padding: 2px 8px;
262+
font-size: 13px;
261263
background-color: rgba(78, 93, 21, 0.56);
262264
border-color: #9fa01d;
263265
color: lightgray;
@@ -303,13 +305,14 @@ fieldset[disabled] .btn-unclassified-failures.active {
303305
border-bottom: 0;
304306
border-top: 0;
305307
border-right: 0;
308+
font-size: 0.875rem;
306309
}
307310

308311
.btn-view-nav:hover,
309312
.btn-view-nav:focus,
310313
.btn-view-nav:active,
311314
.btn-view-nav.active {
312-
background-color: #2c3133 !important;
315+
background-color: #404446 !important;
313316
border-color: #1a1d20 !important;
314317
color: white;
315318
}
@@ -478,3 +481,8 @@ fieldset[disabled] .btn-view-nav-closed.active {
478481
.btn-watched-repo {
479482
padding: 0.375rem 0.5rem;
480483
}
484+
485+
/* Remove caret from repository dropdown toggle */
486+
.no-caret::after {
487+
display: none !important;
488+
}

ui/css/treeherder-pushes.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.push-bar {
66
border-top: 1px solid black;
7-
padding: 2px 0 1px 34px;
7+
padding: 2px 0 1px 12px;
88
white-space: nowrap;
99
display: flex;
1010
flex-flow: row nowrap;
@@ -72,6 +72,7 @@
7272
padding-left: 9px;
7373
padding-right: 10px;
7474
border: 0;
75+
font-size: 12px;
7576
}
7677

7778
.btn-push:hover {
@@ -154,6 +155,7 @@ fieldset[disabled] .btn-push:hover {
154155
min-width: 14.5em;
155156
overflow: hidden;
156157
vertical-align: top;
158+
text-align: left;
157159
}
158160

159161
.job-row {
@@ -162,6 +164,7 @@ fieldset[disabled] .btn-push:hover {
162164
white-space: normal;
163165
word-break: normal;
164166
padding-top: 0;
167+
text-align: left;
165168
padding-bottom: 0;
166169
}
167170

ui/intermittent-failures/DateOptions.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default class DateOptions extends React.Component {
4747

4848
return (
4949
<div className="d-inline-block">
50-
<DropdownButton className="mr-3" title="date range">
50+
<DropdownButton className="me-3" title="date range">
5151
<DropdownMenuItems
5252
options={dateOptions}
5353
updateData={this.updateDateRange}

ui/intermittent-failures/DateRangePicker.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default class DateRangePicker extends React.Component {
9191
isOutsideRange={(day) => moment().diff(day) < 0}
9292
phrases={defaultPhrases}
9393
/>
94-
<Button variant="secondary" className="ml-3" onClick={this.updateData}>
94+
<Button variant="secondary" className="ms-3" onClick={this.updateData}>
9595
update
9696
</Button>
9797
</div>

0 commit comments

Comments
 (0)