Bug 2064607 - Pipeline builder makes too many (100+) API calls upfront
Summary: Pipeline builder makes too many (100+) API calls upfront
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Karthik Jeeyar
QA Contact: spathak@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 2072440
TreeView+ depends on / blocked
 
Reported: 2022-03-16 09:16 UTC by Christoph Jerolimov
Modified: 2022-08-10 10:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:54:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
too-many-tekton-hub-api-calls.mp4 (923.04 KB, video/mp4)
2022-03-16 09:17 UTC, Christoph Jerolimov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 11195 0 None open Bug 2064607: avoid pre-fetching tekton hub task versions in pipeline builder 2022-03-17 18:51:22 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:54:54 UTC

Description Christoph Jerolimov 2022-03-16 09:16:53 UTC
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):
4.9+

How reproducible:
Always

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"

Actual results:
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.

Expected results:
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.

Additional info:

Comment 1 Christoph Jerolimov 2022-03-16 09:17:19 UTC
Created attachment 1866158 [details]
too-many-tekton-hub-api-calls.mp4

Comment 4 Christoph Jerolimov 2022-04-06 10:12:03 UTC
Verified on 4.11.0-0.nightly-2022-04-01-172551

Comment 7 errata-xmlrpc 2022-08-10 10:54:28 UTC
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.

https://access.redhat.com/errata/RHSA-2022:5069


Note You need to log in before you can comment on or make changes to this bug.