Skip to content

Conversation

@afreen23
Copy link

@afreen23 afreen23 commented Mar 6, 2020

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1804107
The OCS form is unmounted when the parent component's state changes and it re renders. We should render the component only once we have got all the data. (i.e csv)
Internally the states of inner children components are getting affected due to this behavior.

Additional Info on internal state management of the dropdown:
The selectedKey value is set to null in storage class dropdown. This happens when the parent components gets re-rendered and the shouldComponentupdate lifecycle hook returns false because the current state === next state. This does not happen on initial render, since props were different (firehose takes some time to fetch data). Also, if the state is changed by selection then it got set too.

@openshift-ci-robot
Copy link
Contributor

@afreen23: This pull request references Bugzilla bug 1804107, which is valid. 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.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1804107: Storage class dropdown not updates selected key on second render

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 bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/ceph Related to ceph-storage-plugin labels Mar 6, 2020
Copy link
Contributor

@bipuladh bipuladh left a comment

Choose a reason for hiding this comment

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

minor

@afreen23 afreen23 force-pushed the storage-class-fix branch from 48e35f4 to 777e9aa Compare March 6, 2020 18:22
@afreen23 afreen23 force-pushed the storage-class-fix branch from 777e9aa to b8ca4a7 Compare March 7, 2020 10:35
@afreen23 afreen23 force-pushed the storage-class-fix branch from 5609d32 to 0340b84 Compare March 11, 2020 10:13
@afreen23 afreen23 changed the title Bug 1804107: Storage class dropdown not updates selected key on second render Bug 1804107: Mount OCS form when csv is available Mar 11, 2020
@openshift-ci-robot
Copy link
Contributor

@afreen23: This pull request references Bugzilla bug 1804107, which is valid.

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

In response to this:

Bug 1804107: Mount OCS form when csv is available

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.

@afreen23 afreen23 force-pushed the storage-class-fix branch 2 times, most recently from d1eda5a to 0590e68 Compare March 11, 2020 10:29
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 11, 2020
@openshift-ci-robot
Copy link
Contributor

@afreen23: This pull request references Bugzilla bug 1804107, which is valid.

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

In response to this:

Bug 1804107: Mount OCS form when csv is available

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.

@afreen23
Copy link
Author

/retest

@gnehapk
Copy link
Contributor

gnehapk commented Mar 12, 2020

/approve

@bipuladh
Copy link
Contributor

LGTM

@cloudbehl
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 12, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

Copy link
Contributor

@a2batic a2batic left a comment

Choose a reason for hiding this comment

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

Requires optional chaining here. It will error out when we select no default storage class in dropdrown.
https://github.com/openshift/console/blob/master/frontend/packages/ceph-storage-plugin/src/components/modals/storage-class-dropdown.tsx#L46
Screenshot from 2020-03-12 13-27-45

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@afreen23
Copy link
Author

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 12, 2020
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1804107
The OCS form is unmounted when the parent component's state changes. We should render the component only once we have got all the data.
Internally the states of inner children components are getting affected.

Signed-off-by: Afreen Rahman <afrahman@redhat.com>
@afreen23 afreen23 force-pushed the storage-class-fix branch from 0590e68 to b2830b2 Compare March 12, 2020 11:54
@afreen23
Copy link
Author

Requires optional chaining here. It will error out when we select no default storage class in dropdrown.
https://github.com/openshift/console/blob/master/frontend/packages/ceph-storage-plugin/src/components/modals/storage-class-dropdown.tsx#L46
Screenshot from 2020-03-12 13-27-45

I checked, this is not related to this bug, but I fixed it.
Plus, we need to backport to 4.3 , hence not using optional chaining.

Thanks for the review :)

@a2batic
Copy link
Contributor

a2batic commented Mar 12, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 12, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a2batic, cloudbehl, gnehapk

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

@afreen23
Copy link
Author

/cerry-pick release-4.4

@afreen23
Copy link
Author

/cherry-pick release-4.4

@openshift-cherrypick-robot

@afreen23: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.4

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-merge-robot openshift-merge-robot merged commit 02c72c6 into openshift:master Mar 12, 2020
@openshift-ci-robot
Copy link
Contributor

@afreen23: All pull requests linked via external trackers have merged. Bugzilla bug 1804107 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1804107: Mount OCS form when csv is available

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-cherrypick-robot

@afreen23: new pull request created: #4723

Details

In response to this:

/cherry-pick release-4.4

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.

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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/ceph Related to ceph-storage-plugin lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants