rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
465 stars 264 forks source link

when a logo/image is not present on a legacy app too many API requests are sent to the backend #4803

Closed anupama2501 closed 2 years ago

anupama2501 commented 2 years ago

Setup

Rancher version: 2.6.2 Browser type & version: Chrome

Describe the bug I have helm3 library apps installed on 2.6.2. If the logo is not found for the app, eg mariadb, the API makes too many requests and won't even when we perform an action like update/edit/install. Even if we come out of the app page, this seems to be the case.

To Reproduce Create an app mariadb by enabling legacy flag from explorer --> legacy --> project --> select a namespace in the namespace picker --> launch maria db

Result If we verify the network tab, too many requests are seen to be sent to the backend. the requests won;t stop until we navigate to a different page from the apps page. The requests seem to be sent even after we come out of the app page.

404 page not found

Expected Result Did not expect too many API calls while in the app and after coming out of the app. Screenshots While in the maria db app page:

Request URL: https://<redacted>/assets/images/generic-catalog.svg
Request Method: GET
Status Code: 404 Not Found
Remote Address:<redacted>
Referrer Policy: strict-origin-when-cross-origin
Screen Shot 2021-12-17 at 11 32 48 PM

While I navigated back to apps page:

Request URL: https:///p/c-97tj7:p-qmpsv/apps/undefinedassets/images/generic-catalog.svg

Request Method: GET
Status Code: 200 OK
Remote Address: <redacted>
Referrer Policy: strict-origin-when-cross-origin
Screen Shot 2021-12-17 at 11 34 34 PM
cmurphy commented 2 years ago

Verified :heavy_check_mark:

Verified original issue

  1. edit setting ui-index, set to https://releases.rancher.com/ui/2.6.2/index.html
  2. with network tools open in browser, navigate to legacy projects, go to install mariadb app
  3. observe repeat requests for generic-catalog.svg

Verified fix

  1. change ui-index setting back to default (latest)
  2. hard refresh
  3. go back to install mariadb app
  4. failing requests are gone :heavy_check_mark:
cmurphy commented 2 years ago

Verified on f904267