Description of problem:
When the user opens the Pipeline builder it makes over 100 API calls to https://api.hub.tekton.dev/ to get the available versions of all installable tasks. This information is not needed until the user press 'Add task' AND selects one installable task.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install OpenShift Pipelines operator
2. Switch to the developer perspective
3. Open the browser network inspector and filter for "api.hub.tekton.dev"
4. Navigate to Pipelines and press on "Create Pipeline"
5. Press "Cancel"
6. Press "Create Pipeline" again
7. Click on "Add task"
Step 4 and 6 fetches https://api.hub.tekton.dev/v1/resources
and for each task https://api.hub.tekton.dev/v1/resource/$id/versions
This happens 135 times while writing this issue and could increase in the future when new tasks are published on Tekton Hub.
Max. one API call to the Tekton API to pre-fetch all available tasks.
When the user selects an installable Task in the QuickSearch it should lazy fetch the available versions from the subresource.
In best case this API call will not be called when switching back and forth, but this is not required for this fix. We can also ask for a short living caching header here.
Created attachment 1866158 [details]
Verified on 4.11.0-0.nightly-2022-04-01-172551
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.