Bug 2053516

Summary: Dynamic plugin update does not take effect in Firefox
Product: Red Hat Advanced Cluster Management for Kubernetes Reporter: Rastislav Wagner <rawagner>
Component: ConsoleAssignee: Kevin Cormier <kcormier>
Status: CLOSED ERRATA QA Contact: kurwang
Severity: medium Docs Contact: Christopher Dawson <cdawson>
Priority: unspecified    
Version: rhacm-2.5CC: aos-bugs, Carol2698Hunter, dho, dhuynh, huichen, kurwang, yapei
Target Milestone: ---Flags: bot-tracker-sync: rhacm-2.5+
Target Release: rhacm-2.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-09 02:11:10 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:

Description Rastislav Wagner 2022-02-11 13:11:14 UTC
Description of problem:
When pod containing dynamic plugin gets updated, firefox wont load new chunks even after refreshing the page with ctrl+f5. The chunks are cached. Chrome is ok, it does not cache the chunks.
Workaround for the FF is to clear or disable the cache.

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


How reproducible:
always

Steps to Reproduce:
1. deploy dynamic plugin
2. access dynamic plugin pages to load the chunks
3. update dynamic plugin
4. access the pages again

Actual results:
pages are not updated


Expected results:
pages are updated


Additional info:
Console probably does not specify any cache policy so the behavior depends on the specific browser.

Comment 1 Jakub Hadvig 2022-02-14 14:04:35 UTC
Rastislav could you please specify the version of OCP you used?
I could not reproduce the issue on 4.10.0-0.nightly-2022-01-31-012936, meaning that after refreshing the page I could see updated content of the demo-dynamic-plugin.
When checking the response header I can also see the `cache-control: no-cache, no-store, must-revalidate` header present.

Comment 2 Jakub Hadvig 2022-02-14 14:06:09 UTC
Tested on FF 92.0.1 && Chrome 98.0.4758.80

Comment 3 Yadan Pei 2022-02-15 01:28:42 UTC
How can we update dynamic plugin with plugin already deployed?

Comment 4 Rastislav Wagner 2022-02-15 09:42:10 UTC
I saw this on ACM dynamic pluign and it turns out ACM backend does not specify correct cache policy https://github.com/stolostron/console/blob/0cf7e9b88b13f01c032249f15860babee203b37f/backend/src/routes/serve.ts#L34

OCP does not override cache policy defined by dynamic plugin so the issue is on ACM side. Assigning the bug to the ACM.

@yapei to update a dynamic plugin you can just update container image reference in the dynamic plugin's pod.

Comment 5 kurwang 2022-05-09 15:16:01 UTC
Verified on firefox with acm build 2.5.0-DOWNSTREAM-2022-05-05-15-16-11
then patched the acm/mce plugins with a newer reference with build (2.5.0-DOWNSTREAM-2022-05-08-12-27-27) and saw changes in the network tab as discussed with kcormier

Comment 9 errata-xmlrpc 2022-06-09 02:11:10 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: Red Hat Advanced Cluster Management 2.5 security updates, images, and bug fixes), 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:4956

Comment 10 Carol hunter 2024-02-16 05:48:35 UTC Comment hidden (spam)