Bug 2076527

Summary: Pipeline Builder: Make unnecessary tekton hub API calls when the user types 'too fast'
Product: OpenShift Container Platform Reporter: Christoph Jerolimov <cjerolim>
Component: Dev ConsoleAssignee: Karthik Jeeyar <kjeeyar>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: low Docs Contact:
Priority: medium    
Version: 4.9CC: nmukherj, viraj
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2089589 (view as bug list) Environment:
Last Closed: 2022-08-10 11:07:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2089589    
Attachments:
Description Flags
multiple-api-calls.mp4 none

Description Christoph Jerolimov 2022-04-19 09:41:56 UTC
Description of problem:
When the user opens the Pipeline Builder and searches for a task, the quick search modal makes a 'version' API call to show the details on the right side for a task.

When typing quickly into the search input, the modal makes multiple API calls for the same 'version' resource. For example when typing 'build' quickly it makes 5 API calls.

Version-Release number of selected component (if applicable):
4.9-4.11

How reproducible:
Always

Steps to Reproduce:
1. Install OpenShift Pipelines operator
2. Switch to the Developer Perspective, navigate to Pipelines > Create Pipeline
3. Open the browser network inspector
4. Click on "Add task" and type "build" into the search

Actual results:
The same resource (/versions/7 at the moment) is fetched multiple times.

Expected results:
Each resource should only be fetched once. An in-flight API call should not be fetched again just because the search input is changed.

Additional info:
Looks like the API is called again because the first request is not fulfilled and the user input change triggers a rerender that results in an API call.

Comment 1 Christoph Jerolimov 2022-04-19 09:42:27 UTC
Created attachment 1873484 [details]
multiple-api-calls.mp4

Comment 5 Christoph Jerolimov 2022-05-23 08:47:31 UTC
Verified on 4.11.0-0.nightly-2022-05-20-213928

Comment 7 errata-xmlrpc 2022-08-10 11:07:40 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