Skip to content

Conversation

@christoph-jerolimov
Copy link
Member

@christoph-jerolimov christoph-jerolimov commented Sep 1, 2023

Fixes:
https://issues.redhat.com/browse/OCPBUGS-18443

This is a manual "backport" of #13126

Analysis / Root cause:
When the user enters a filter into the quick start catalog the catalog page crashes. This happened because the PatternFly Quick Start library uses a PF Search field, which changed the props 'recently': patternfly/patternfly-react#8516

So the Quick Start library and the used Search component aren't compatible, and the callback handler expects a string value but receives an event. But the same function is called with a string value when the user clicks the clear button.

A fix for the PatternFly Quick Start library wasn't merged yet: patternfly/patternfly-quickstarts#237

Solution Description:
Since the PF fix wasn't merged yet and this would require a PF Quick Start update, I decided to clone the QuickStartCatalogPage component from @patternfly/quickstarts and add it to our code base. And fix the issue in the copied version.

This reduces the risk of more incompatible issues with an update, esp. in this backport !

The difference to the origin version is mostly that the onSearchInputChange callback handles now strings and events:

  const onSearchInputChange = (searchValue) => {
    if (typeof searchValue !== 'string' && searchValue?.target) {
      // eslint-disable-next-line no-param-reassign
      searchValue = searchValue.target.value;
      if (useQueryParams) {
        setQueryArgument('keyword', searchValue);
      }
    }

Screen shots / Gifs for design review:
Crash without this PR:

4-13-broken.mp4

No crash with this PR:

4-13-fixed.mp4

Unit test coverage report:
Untouched

Test setup:

  1. Open the web console and navigate to the quick starts
  2. Enter a filter

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Sep 1, 2023
@openshift-ci-robot
Copy link
Contributor

@jerolimov: This pull request references Jira Issue OCPBUGS-18443, which is invalid:

  • expected dependent Jira Issue OCPBUGS-13359 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), but it is POST instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Fixes:
https://issues.redhat.com/browse/OCPBUGS-18443

This is a manual "backport" of #13126

Analysis / Root cause:
When the user enters a filter into the quick start catalog the catalog page crashes. This happened because the PatternFly Quick Start library uses a PF Search field, which changed the props 'recently': patternfly/patternfly-react#8516

So the Quick Start library and the used Search component aren't compatible, and the callback handler expects a string value but receives an event. But the same function is called with a string value when the user clicks the clear button.

A fix for the PatternFly Quick Start library wasn't merged yet: patternfly/patternfly-quickstarts#237

Solution Description:
Since the PF fix wasn't merged yet and this would require a PF Quick Start update, I decided to clone the QuickStartCatalogPage component from @patternfly/quickstarts and add it to our code base. And fix the issue in the copied version.

This reduces the risk of more incompatible issues with an update, esp. in this backport !

The difference to the origin version is mostly that the onSearchInputChange callback handles now strings and events:

 const onSearchInputChange = (searchValue) => {
   // eslint-disable-next-line no-param-reassign
   searchValue = typeof searchValue === 'string' ? searchValue : searchValue.target.value;

Screen shots / Gifs for design review:
Crash without this PR:

No crash with this PR:

Unit test coverage report:
Untouched

Test setup:

  1. Open the web console and navigate to the quick starts
  2. Enter a filter

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Sep 1, 2023
@openshift-ci openshift-ci bot requested review from TheRealJon and kyoto September 1, 2023 09:23
@openshift-ci openshift-ci bot added component/core Related to console core functionality approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 1, 2023
@christoph-jerolimov
Copy link
Member Author

/kind bug
/uncc kyoto TheRealJon
/cc @vikram-raj @lokanandaprabhu @Lucifergene @jhadvig

@openshift-ci openshift-ci bot requested review from Lucifergene, jhadvig, lokanandaprabhu and vikram-raj and removed request for TheRealJon and kyoto September 1, 2023 09:24
@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 1, 2023
Copy link
Member

@vikram-raj vikram-raj left a comment

Choose a reason for hiding this comment

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

Verified it.

GH-13127.mov

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerolimov, vikram-raj

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-ci-robot
Copy link
Contributor

@jerolimov: This pull request references Jira Issue OCPBUGS-18443, which is invalid:

  • expected dependent Jira Issue OCPBUGS-13359 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), but it is POST instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

Fixes:
https://issues.redhat.com/browse/OCPBUGS-18443

This is a manual "backport" of #13126

Analysis / Root cause:
When the user enters a filter into the quick start catalog the catalog page crashes. This happened because the PatternFly Quick Start library uses a PF Search field, which changed the props 'recently': patternfly/patternfly-react#8516

So the Quick Start library and the used Search component aren't compatible, and the callback handler expects a string value but receives an event. But the same function is called with a string value when the user clicks the clear button.

A fix for the PatternFly Quick Start library wasn't merged yet: patternfly/patternfly-quickstarts#237

Solution Description:
Since the PF fix wasn't merged yet and this would require a PF Quick Start update, I decided to clone the QuickStartCatalogPage component from @patternfly/quickstarts and add it to our code base. And fix the issue in the copied version.

This reduces the risk of more incompatible issues with an update, esp. in this backport !

The difference to the origin version is mostly that the onSearchInputChange callback handles now strings and events:

 const onSearchInputChange = (searchValue) => {
   if (typeof searchValue !== 'string' && searchValue?.target) {
     // eslint-disable-next-line no-param-reassign
     searchValue = searchValue.target.value;
     if (useQueryParams) {
       setQueryArgument('keyword', searchValue);
     }
   }

Screen shots / Gifs for design review:
Crash without this PR:

No crash with this PR:

Unit test coverage report:
Untouched

Test setup:

  1. Open the web console and navigate to the quick starts
  2. Enter a filter

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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.

@christoph-jerolimov
Copy link
Member Author

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Sep 1, 2023
@openshift-ci-robot
Copy link
Contributor

@jerolimov: This pull request references Jira Issue OCPBUGS-18443, which is invalid:

  • expected dependent Jira Issue OCPBUGS-13359 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), but it is POST instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

Fixes:
https://issues.redhat.com/browse/OCPBUGS-18443

This is a manual "backport" of #13126

Analysis / Root cause:
When the user enters a filter into the quick start catalog the catalog page crashes. This happened because the PatternFly Quick Start library uses a PF Search field, which changed the props 'recently': patternfly/patternfly-react#8516

So the Quick Start library and the used Search component aren't compatible, and the callback handler expects a string value but receives an event. But the same function is called with a string value when the user clicks the clear button.

A fix for the PatternFly Quick Start library wasn't merged yet: patternfly/patternfly-quickstarts#237

Solution Description:
Since the PF fix wasn't merged yet and this would require a PF Quick Start update, I decided to clone the QuickStartCatalogPage component from @patternfly/quickstarts and add it to our code base. And fix the issue in the copied version.

This reduces the risk of more incompatible issues with an update, esp. in this backport !

The difference to the origin version is mostly that the onSearchInputChange callback handles now strings and events:

 const onSearchInputChange = (searchValue) => {
   if (typeof searchValue !== 'string' && searchValue?.target) {
     // eslint-disable-next-line no-param-reassign
     searchValue = searchValue.target.value;
     if (useQueryParams) {
       setQueryArgument('keyword', searchValue);
     }
   }

Screen shots / Gifs for design review:
Crash without this PR:

4-13-broken.mp4

No crash with this PR:

4-13-fixed.mp4

Unit test coverage report:
Untouched

Test setup:

  1. Open the web console and navigate to the quick starts
  2. Enter a filter

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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.

@vikram-raj
Copy link
Member

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 4, 2023
@openshift-ci-robot
Copy link
Contributor

@vikram-raj: This pull request references Jira Issue OCPBUGS-18443, which is valid.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.z) matches configured target version for branch (4.13.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-13359 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE))
  • dependent Jira Issue OCPBUGS-13359 targets the "4.14.0" version, which is one of the valid target versions: 4.14.0
  • bug has dependents

Requesting review from QA contact:
/cc @sanketpathak

Details

In response to this:

/jira refresh

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 requested a review from sanketpathak September 4, 2023 08:43
@The-Anton
Copy link
Contributor

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Sep 18, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 18, 2023

@jerolimov: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 68633fb into openshift:release-4.13 Sep 18, 2023
@openshift-ci-robot
Copy link
Contributor

@jerolimov: Jira Issue OCPBUGS-18443: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-18443 has been moved to the MODIFIED state.

Details

In response to this:

Fixes:
https://issues.redhat.com/browse/OCPBUGS-18443

This is a manual "backport" of #13126

Analysis / Root cause:
When the user enters a filter into the quick start catalog the catalog page crashes. This happened because the PatternFly Quick Start library uses a PF Search field, which changed the props 'recently': patternfly/patternfly-react#8516

So the Quick Start library and the used Search component aren't compatible, and the callback handler expects a string value but receives an event. But the same function is called with a string value when the user clicks the clear button.

A fix for the PatternFly Quick Start library wasn't merged yet: patternfly/patternfly-quickstarts#237

Solution Description:
Since the PF fix wasn't merged yet and this would require a PF Quick Start update, I decided to clone the QuickStartCatalogPage component from @patternfly/quickstarts and add it to our code base. And fix the issue in the copied version.

This reduces the risk of more incompatible issues with an update, esp. in this backport !

The difference to the origin version is mostly that the onSearchInputChange callback handles now strings and events:

 const onSearchInputChange = (searchValue) => {
   if (typeof searchValue !== 'string' && searchValue?.target) {
     // eslint-disable-next-line no-param-reassign
     searchValue = searchValue.target.value;
     if (useQueryParams) {
       setQueryArgument('keyword', searchValue);
     }
   }

Screen shots / Gifs for design review:
Crash without this PR:

4-13-broken.mp4

No crash with this PR:

4-13-fixed.mp4

Unit test coverage report:
Untouched

Test setup:

  1. Open the web console and navigate to the quick starts
  2. Enter a filter

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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.

@christoph-jerolimov christoph-jerolimov deleted the OCPBUGS-18443 branch September 18, 2023 20:41
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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. component/core Related to console core functionality jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.