Repository navigation
Fix Index Analysis banners, Settings help placement and the estimated-plan card title (#6653) #6669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
120436f
728e267
2d509bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,7 +156,8 @@ export const tab = { | |
| const recs = (data.recommendations || []).map((r) => recommendationRow(r, captured)); | ||
| const rollups = (data.overall ? [rollupRow({ ...data.overall, database_name: "ALL DATABASES" })] : []) | ||
| .concat((data.databases || []).map(rollupRow)); | ||
| const lead = (data.uptime_warning ? 1 : 0) + (data.dedupe_only_applied ? 1 : 0); | ||
| /* #6653: the notes lead with the uptime caveat only when dedupe-only is not in effect (the tool leaves it out beside the dedupe notice). */ | ||
| const lead = (data.uptime_warning && !data.dedupe_only_applied ? 1 : 0) + (data.dedupe_only_applied ? 1 : 0); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: correct as written, and the arithmetic matches the tool's note order at The harness already captures notice text ( |
||
| const notes = data.notes || []; | ||
| const parts = [noticeStrip(noticeText(data, recs.length, choice.db))]; | ||
| notes.slice(0, lead).forEach((t) => parts.push(noticeStrip(t))); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -472,6 +472,14 @@ public sealed record IndexCleanupAnalysisResult | |
| /// <summary>Dedupe-only was in effect (either requested, or auto-enabled because uptime <= 7 days), so unused indexes were not flagged.</summary> | ||
| public bool DedupeOnlyApplied { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Whether the "uptime under 14 days" caveat is worth showing (#6653). It warns that usage data may be incomplete and some "Unused | ||
| /// Index" findings premature, but dedupe-only mode (uptime of 7 days or less, or requested) flags no unused index at all, so beside | ||
| /// the dedupe notice the caveat describes findings that are not there and contradicts it. Both the Viewer's banners and the | ||
| /// get_finops notes (which the web page shows) read this one rule; <see cref="UptimeWarning"/> itself stays the raw fact. | ||
| /// </summary> | ||
| public bool ShowUptimeCaveat => UptimeWarning && !DedupeOnlyApplied; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking, and not a live defect — but the doc's own "or requested" branch is the one case where this rule drops a true statement without a replacement.
Unreachable from either shipped Darling surface today: the single options builder both the viewer and |
||
|
|
||
| /// <summary>Precisely-surfaced limitations of this data-driven reproduction (e.g. omitted filegroup placement, compression exclusions not reproducible, out-of-scope rules).</summary> | ||
| public IReadOnlyList<string> Notes { get; init; } = Array.Empty<string>(); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,11 +76,13 @@ public static string CopyQueryText(PlanStatement statement, int statementCount, | |
|
|
||
| /// <summary> | ||
| /// The runtime summary card's title, matching erikdarlingdata/PerformanceStudio@40ade29 (E7): | ||
| /// "Predicted Runtime" when the statement has no <see cref="PlanStatement.QueryTimeStats"/> | ||
| /// (an estimated-plan-only statement), "Runtime Summary" otherwise. | ||
| /// "Plan properties" when the statement has no <see cref="PlanStatement.QueryTimeStats"/> | ||
| /// (an estimated-plan-only statement), "Runtime Summary" otherwise. #6653: PerformanceStudio@40ade29 | ||
| /// titled the estimated card "Predicted Runtime", but it holds compile facts (compile time, memory, cached size), | ||
| /// not a predicted runtime, so the title is "Plan properties" here. | ||
| /// </summary> | ||
| public static string RuntimeSummaryTitle(PlanStatement statement) => | ||
| statement.QueryTimeStats == null ? "Predicted Runtime" : "Runtime Summary"; | ||
| statement.QueryTimeStats == null ? "Plan properties" : "Runtime Summary"; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking (UI copy): every sibling card title in the plan viewer is Title Case — "Server Context" ( |
||
|
|
||
| /// <summary> | ||
| /// Walks a plan's node tree looking for any warning whose type ends in " Spill" (Sort Spill, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking (naming): the method is still
RuntimeSummaryTitle_NoQueryTimeStats_IsPredictedRuntimewhile the assertion now pins"Plan properties". After this PR that test name is the only remaining "Predicted Runtime" string in the C# tree (grep -rn "Predicted Runtime"otherwise hits onlydocs/changelog/3.9.md:141), so the name points at the title it no longer asserts...._IsPlanPropertieswould keep the grep honest.