tektoncd / dashboard

A dashboard for Tekton!
Apache License 2.0
863 stars 258 forks source link

Pass AbortSignal to fetch to allow for cancelling in-flight requests on navigation #3475

Closed AlanGreene closed 1 week ago

AlanGreene commented 1 week ago

Changes

Follow-up to https://github.com/tektoncd/dashboard/pull/3465 Related to https://github.com/tektoncd/dashboard/issues/2452

TanStack Query provides an AbortSignal instance to the query function which can in turn be provided to fetch to cancel in-flight requests when the response is no longer required, e.g. incomplete API calls in progress when the user navigates to a different page.

/kind misc

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Release Notes

NONE
tekton-robot commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: briangleeson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tektoncd/dashboard/blob/main/OWNERS)~~ [briangleeson] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
AlanGreene commented 1 week ago

Slow responses from server for Create TaskRun test, likely load related. Re-running as all other tests ran within normal times. /retest