Repository navigation
Lite's Job History shows that it is loading and says when it shows only the newest rows (#4478) - #4488
Merged
Conversation
Mirrors the Viewer's fix in #4481: LoadJobsAsync shows a loading message while the read runs (collapsed in a finally on every exit path), and the run count label states "showing the newest 2,000" through the shared PerformanceMonitor.Common.JobHistoryCap only when the unfiltered read actually hit the cap. Adds a macOS-runnable source-scan pin in Darling.Tests, since Lite's UI is WPF and cannot be instantiated outside Windows CI.
… current (#4478) LoadJobsAsync's finally used to collapse the loading indicator unconditionally, so an older, still-in-flight load could hide the newer load's indicator when the two overlapped. The collapse (on both the success and caught-exception exit paths) now runs only when the load's own generation has not been superseded, mirroring the file's existing supersession check. The Viewer's JobHistoryTab.xaml.cs carried the same unguarded collapse with no load-generation guard at all; it now claims and checks its own generation the same way its DatabaseStateOverridesWindow twin does. Also extends the census's site table to cover the Viewer's JobHistoryTab.LoadJobsAsync, and updates the existing Lite Job History pin to assert the guarded-collapse shape instead of a bare finally block (the bare-finally shape was exactly the bug).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #4478.
Why
The Viewer's Job History tab (#4481) got a loading message while its read is in flight and a "showing the newest 2,000" label when the unfiltered read hit its row cap, so an empty grid mid-load doesn't read as "no jobs ran," and a capped read doesn't look like a complete history. Lite's Job History tab has the same 2,000-row cap and the same read-in-flight window, but neither cue.
What changes
Lite/Controls/JobHistoryTab.xaml: adds aLoadingMessagetext block, styled like the tab's existing empty-state message, collapsed by default.Lite/Controls/JobHistoryTab.xaml.cs:RowCap = 2000constant, replacing the literal2000passed toGetJobHistoryAsync;LoadJobsAsyncshowsLoadingMessagebefore the read starts and collapses it in afinally, so it clears on every exit path (success, the caught exception, and the load-guard's superseded/early return);all.Count), not the filtered display count, through the sharedPerformanceMonitor.Common.JobHistoryCap.Label(already referenced by Lite forAgTopology), appending(showing the newest 2,000)only when the read actually hit the cap.Test plan
Darling/Darling.Tests/LiteJobHistoryLoadingCapTests.cs: a source-scan fact (the same idiom asViewerPerfmonShapingParityTests), since Lite's UserControl is WPF and cannot be instantiated off Windows. It asserts:JobHistoryTab.xaml.cscallsJobHistoryCap.Label(, and itsLoadJobsAsyncsetsLoadingMessage.Visibility = Visibility.Visiblebefore the read andVisibility.Collapsedinside afinally;JobHistoryTab.xamldeclaresx:Name="LoadingMessage".JobHistoryCap.Label(call (temporarily replacing it with"") reproduces the RED on the call-site fact; reverted.LiteJobHistoryLoadingCapTests+JobHistoryCapLabelTests(the label text itself, already pinned by The Viewer counts Availability Groups by identity, shows Job History loading, and says "queries" (#4475, #4478) #4481, not duplicated here) +DocCommentHygieneTests: Total 82, 0 failed, on macOS via the in-process xunit v3 runner.Darling.Tests.csprojandLite.Tests.csprojRelease with-p:EnableWindowsTargeting=true: 0 warnings, 0 errors on both. Lite's WPF UI (the XAML rendering, the loading/label wiring in a live grid) is exercised only in the Windows CI build; the pin here is source-level and cannot see a rendering bug that keeps the same source text.CHANGELOG
SECTION: Fixed
ENTRY:
REF:
[Lite's Job History shows that it is loading and says when it shows only the newest rows (#4478) #4488]: Lite's Job History shows that it is loading and says when it shows only the newest rows (#4478) #4488