20219: Pass through promise rejections from getLogFileContents
authorStephen Smith <stephen@curii.com>
Wed, 2 Aug 2023 21:48:36 +0000 (17:48 -0400)
committerStephen Smith <stephen@curii.com>
Wed, 2 Aug 2023 21:48:36 +0000 (17:48 -0400)
commitabc9ef71a341f72c061c6fc8b0276fcf9937c411
tree9e01e18669b17dc7cecd8a872c51fe8653f7dacf
parentd53a08ea0cc9a9af1a3071969d41165e8a6ff5d5
20219: Pass through promise rejections from getLogFileContents

* No longer returns undefined for failed log fragments
* initProcessLogsPanel added catch to handle errors, on failure it shows a
  toast and initializes the store empty, allowing polling to run and retry if
  the container is running
* Add note to pollProcessLogs error console.log that the promise rejection is
  ignored currently
* loadContainerLogFileContents now handles errors from getLogFileContents
  * Switched from Promise.all to Promise.allSettled, which allows some promises
    to fail and still return a result
  * Replace undefined fragment & subfragment filtering with top level promise
    status filtering, subfragments can no longer have some failures due to
    sub-promises using .all which rejects on any failure
* Add es2020 to typescript lib array for Promise.allSettled

Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
src/services/log-service/log-service.ts
src/store/process-logs-panel/process-logs-panel-actions.ts
tsconfig.json