Skip to content

Conversation

@gruselhaus
Copy link
Contributor

This PR is a continuation to #10464

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=2027288
https://issues.redhat.com/browse/OCPBUGSM-37613

Analysis / Root cause:
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 #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.
Solution Description:

How reproducible:
Only if the user uses an older version first (before #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.

Fix:
I changed all routes back to ...samples/.... In addition to that I made a change in devfileHooks.ts to use the new logic which was overlooked at #10464.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci openshift-ci bot added bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Nov 29, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 29, 2021

@gruselhaus: This pull request references Bugzilla bug 2027288, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.10.0) matches configured target release for branch (4.10.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @sanketpathak

Details

In response to this:

Bug 2027288: Devfile samples can't be loaded after fixing it on Safari (redirect caching issue)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added component/backend Related to backend component/dev-console Related to dev-console labels Nov 29, 2021
@gruselhaus
Copy link
Contributor Author

/assign @jerolimov

@gruselhaus
Copy link
Contributor Author

/retest-required

Copy link
Member

@christoph-jerolimov christoph-jerolimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally and it looks good to me.

/lgtm
/approve
/cc jhadvig

@openshift-ci openshift-ci bot requested a review from jhadvig November 29, 2021 14:26
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 29, 2021
@gruselhaus
Copy link
Contributor Author

/assign florkbr

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 5, 2021
@openshift-ci openshift-ci bot removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. lgtm Indicates that a PR is ready to be merged. labels Dec 6, 2021
@florkbr
Copy link
Contributor

florkbr commented Dec 6, 2021

Tested on a 4.10 nightly cluster and looks good in Chrome, Firefox, and Safari:

Before

Screen Shot 2021-12-06 at 9 34 24 AM

After

Screen Shot 2021-12-06 at 10 51 21 AM

The redirect has been removed.

@florkbr
Copy link
Contributor

florkbr commented Dec 6, 2021

/lgtm

@florkbr
Copy link
Contributor

florkbr commented Dec 6, 2021

/assign TheRealJon

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 6, 2021
@TheRealJon
Copy link
Member

/approve

@TheRealJon
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 6, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 6, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: florkbr, gruselhaus, jerolimov, TheRealJon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit aa2b66e into openshift:master Dec 6, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 6, 2021

@gruselhaus: All pull requests linked via external trackers have merged:

Bugzilla bug 2027288 has been moved to the MODIFIED state.

Details

In response to this:

Bug 2027288: Devfile samples can't be loaded after fixing it on Safari (redirect caching issue)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@gruselhaus gruselhaus deleted the bz2027288 branch December 6, 2021 20:08
@spadgett spadgett added this to the v4.10 milestone Dec 8, 2021
gruselhaus added a commit to yangcao77/console that referenced this pull request Dec 10, 2021
yangcao77 pushed a commit to yangcao77/console that referenced this pull request Dec 11, 2021
meysam-jeffrey pushed a commit to snapp-incubator/console that referenced this pull request Dec 24, 2025
meysam-jeffrey pushed a commit to snapp-incubator/console that referenced this pull request Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/backend Related to backend component/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants