Bug 2027288

Summary: Devfile samples can't be loaded after fixing it on Safari (redirect caching issue)
Product: OpenShift Container Platform Reporter: Christoph Jerolimov <cjerolim>
Component: Dev ConsoleAssignee: Nico Finkernagel <nfinkern>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: low Docs Contact:
Priority: low    
Version: 4.10CC: aos-bugs, nmukherj
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:30:41 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 Christoph Jerolimov 2021-11-29 10:24:54 UTC
Description of problem:
After fixing that the Devfile samples could not be loaded on Safari (only), it looks like they couldn't be loaded at all / or on other browsers.

The reason was that the browsers caches an redirect from /api/devfile/samples (frontend code) to /api/devfile/samples/ (backend code). The PR https://github.com/openshift/console/pull/10464 to fix https://bugzilla.redhat.com/show_bug.cgi?id=2023356 changed all code to /api/devfile/samples but the browsers keep their redirect. So that the fix works when the user clears their cache or uses another cluster (URL) but has issues after updating locally. We could also expect that the users will have issues after updating from 4.9 to 4.10 with this solution.

I believe the easiest solution is to switch all URLs to /api/devfile/samples/ (old backend code) instead.

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

How reproducible:
Only if the user uses an older version first (before https://github.com/openshift/console/pull/10464 was merged) and then switches to the latest version.

Steps to Reproduce:
1. Test with an old version first (before 22th Nov 2021)
2. Open developer perspective and open Add > Samples
3. Switch your console to the latest master
4. Open developer perspective and open Add > Samples again

Actual results:
The Devfile samples could not be loaded. After cleaning the browser cache it works fine.

Expected results:
The Devfile samples could be loaded also when the browser has a redirect in its cache.

Additional info:
You can open the browser network inspector to check if the API calls contain any redirect.

Comment 2 Christoph Jerolimov 2021-12-20 11:07:05 UTC
Verified on 4.10.0-0.nightly-2021-12-16-185411 with Safari 15.1 on macOS 12.0.1.

Comment 6 errata-xmlrpc 2022-03-10 16:30:41 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 (Moderate: OpenShift Container Platform 4.10.3 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:0056