Is JIRA about
(a) the status on the listing of complete/uncomplete being wrong in some way
(b) the actual job view (history/some-app-id) being stale when a job completes.
(b) is consistent with what I observed in
Looking at your patch, and comparing it with my proposal, I prefer mine. All I'm proposing is invalidating the cache on work in progress, so that it is retrieved again.
Thinking about it some more, we can go one better: rely on the ApplicationHistoryInfo.lastUpdated field to tell us when the UI was last updated. If we cache the update time with the UI, on any GET of an appUI, we can look to see if the previous UI was not completed and if the lastupdated time has changed...if so. that triggers a refresh.
with this approach the entry you see will always be the one most recently published to the history store (of any implementation), and picked up by the history provider in its getListing()/background refresh operation.