Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1916888: Modifying OCS wizard Donor chart based on selected device type #7924

Merged

Conversation

Jayashree-panda
Copy link
Contributor

No description provided.

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. label Jan 26, 2021
@openshift-ci-robot
Copy link
Contributor

@Jayashree-panda: This pull request references Bugzilla bug 1916888, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

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

In response to this:

Bug 1916888: Modifying OCS wizard Donor chart based on selected device type

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/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 26, 2021
@openshift-ci-robot
Copy link
Contributor

Hi @Jayashree-panda. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 component/ceph Related to ceph-storage-plugin label Jan 26, 2021
@Jayashree-panda
Copy link
Contributor Author

No description provided.

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@Jayashree-panda: This pull request references Bugzilla bug 1916888, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

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

In response to this:

No description provided.

/bugzilla 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.

@afreen23
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. and removed bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. labels Jan 27, 2021
@openshift-ci-robot
Copy link
Contributor

@afreen23: This pull request references Bugzilla bug 1916888, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "4.8.0" instead

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

In response to this:

/bugzilla 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.

@afreen23
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

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

In response to this:

/bugzilla 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-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 27, 2021
@GowthamShanmugam
Copy link
Contributor

LGTM

@@ -16,7 +16,7 @@ export const initialState: State = {
showNodesListOnLVS: false,
diskType: 'All',
diskMode: diskModeDropdownItems.BLOCK,
deviceType: [],
deviceType: ['Disk', 'Part'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the deviceTypeDropdownItems

Suggested change
deviceType: ['Disk', 'Part'],
deviceType: [deviceTypeDropdownItems.DISK, deviceTypeDropdownItems.PART],

`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@afreen23 Sure. Will do it.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is to ensure that the changes remain consistent all over in case of modifications

Copy link
Contributor

@afreen23 afreen23 left a comment

Choose a reason for hiding this comment

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

One more, then good to go.

Comment on lines +54 to +55
const hasDeviceType: boolean = state.deviceType.includes(
deviceTypeDropdownItems[disk.type.toUpperCase()],
Copy link
Contributor

@afreen23 afreen23 Jan 27, 2021

Choose a reason for hiding this comment

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

Now when we are storing the values , we can just go with disk.type

Suggested change
const hasDeviceType: boolean = state.deviceType.includes(
deviceTypeDropdownItems[disk.type.toUpperCase()],
const hasDeviceType: boolean = state.deviceType.includes(disk.type)

Copy link
Contributor

Choose a reason for hiding this comment

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

disk.type has values that are populated using LSO CR, The values are 'part' or 'disk' (small case) and state.deviceType has ['Disk', 'Part'],

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, I see the dropdown options are getting set only.
In that case this is good in place for now.

Copy link
Contributor

@cloudbehl cloudbehl left a comment

Choose a reason for hiding this comment

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

can you attach a screenshot with and without filter & how it behaves?

Comment on lines +54 to +56
const hasDeviceType: boolean = state.deviceType.includes(
deviceTypeDropdownItems[disk.type.toUpperCase()],
);
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this will work?

Suggested change
const hasDeviceType: boolean = state.deviceType.includes(
deviceTypeDropdownItems[disk.type.toUpperCase()],
);
const hasDeviceType: boolean = state.deviceType.includes(disk.type.toUpperCase());

Copy link
Contributor

Choose a reason for hiding this comment

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

state.deviceType array has values ['Disk', 'Part'], So disk.type.toUpperCase() wont match('DISK' or 'PART')

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

The value deviceTypeDropdownItems.DISK or deviceTypeDropdownItems.PART is 'Disk' / 'Part' only.

export const deviceTypeDropdownItems = Object.freeze({
DISK: 'Disk',
PART: 'Part',
});

Comment on lines 57 to 59
if (isValidSize && hasDiskType && hasDeviceType) {
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (isValidSize && hasDiskType && hasDeviceType) {
return true;
}
return (isValidSize && hasDiskType && hasDeviceType);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes ofcourse. I am making the changes.

@Jayashree-panda
Copy link
Contributor Author

Without filter
Screenshot from 2021-01-27 13-54-48
With filter
Screenshot from 2021-01-27 16-04-34
Screenshot from 2021-01-27 16-04-49

@cloudbehl
Copy link
Contributor

have you verified that only those disks/part are used for storage cluster creation not the other ones?

@Jayashree-panda
Copy link
Contributor Author

have you verified that only those disks/part are used for storage cluster creation not the other ones?

What are the other ones you are talking about? Do you mean the other filters like diskType, diskMode etc. ?

@Jayashree-panda
Copy link
Contributor Author

Jayashree-panda commented Jan 28, 2021 via email

Copy link
Contributor

@afreen23 afreen23 left a comment

Choose a reason for hiding this comment

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

lgtm

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2021
@afreen23
Copy link
Contributor

afreen23 commented Jan 28, 2021

Sure. I am looking on it. Thanks

I would discard that now, since it would require chnages at other places too.
We need to fix i18n as well, so let this change be in first @Jayashree-panda


On Thu, Jan 28, 2021 at 9:24 AM Afreen Rahman @.> wrote: @.* requested changes on this pull request. ------------------------------ In frontend/packages/ceph-storage-plugin/src/components/ocs-install/attached-devices/create-sc/state.ts <#7924 (comment)>: > @@ -16,7 +17,7 @@ export const initialState: State = { showNodesListOnLVS: false, diskType: 'All', diskMode: diskModeDropdownItems.BLOCK, - deviceType: [], + deviceType: [deviceTypeDropdownItems.DISK, deviceTypeDropdownItems.PART], Use this object instead.

export enum DiskType {
RawDisk = 'disk',
Partition = 'part',
}
------------------------------ In frontend/packages/ceph-storage-plugin/src/components/ocs-install/attached-devices/create-sc/wizard-pages/donut-chart.tsx <#7924 (comment)>: > + const hasDeviceType: boolean = state.deviceType.includes( + deviceTypeDropdownItems[disk.type.toUpperCase()], Ah! the object is not helpful here, its for dropdown only. We shall use this one in default state and then it should be fine.
export enum DiskType {
RawDisk = 'disk',
Partition = 'part',
}
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#7924 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH6RVLEEXCLPOMZADOPFW6TS4DNYLANCNFSM4WSYVO3A .

@afreen23
Copy link
Contributor

have you verified that only those disks/part are used for storage cluster creation not the other ones?

What are the other ones you are talking about? Do you mean the other filters like diskType, diskMode etc. ?

@cloudbehl The change is meant for the donut chart filter only, the cluster creation remains intact.

@cloudbehl
Copy link
Contributor

have you verified that only those disks/part are used for storage cluster creation not the other ones?

What are the other ones you are talking about? Do you mean the other filters like diskType, diskMode etc. ?

@cloudbehl The change is meant for the donut chart filter only, the cluster creation remains intact.

RIght, but whatever filter is selected only those disks should be provisioned as PV. So wanted to make sure that we tested it and it's working as expected.

@Jayashree-panda ^^

@Jayashree-panda
Copy link
Contributor Author

Jayashree-panda commented Jan 28, 2021

@cloudbehl Sure. I will be attaching the screenshots once done with testing.

@Jayashree-panda
Copy link
Contributor Author

The storage cluster gets created based on the filter we select.
Screenshot from 2021-01-29 21-35-06
Screenshot from 2021-01-29 21-37-21

@cloudbehl
Copy link
Contributor

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 1, 2021
@cloudbehl
Copy link
Contributor

/test backend
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 2, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afreen23, cloudbehl, Jayashree-panda

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

The pull request process is described here

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 3e1fbcb into openshift:master Feb 2, 2021
@openshift-ci-robot
Copy link
Contributor

@Jayashree-panda: All pull requests linked via external trackers have merged:

Bugzilla bug 1916888 has been moved to the MODIFIED state.

In response to this:

Bug 1916888: Modifying OCS wizard Donor chart based on selected device type

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.

@spadgett spadgett added this to the v4.7 milestone Feb 5, 2021
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-medium Referenced Bugzilla bug's severity is medium 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/ceph Related to ceph-storage-plugin lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants