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 1840958: Source can be empty in general step #6270

Conversation

yaacov
Copy link
Member

@yaacov yaacov commented Aug 9, 2020

URL and Container source are not required in the general step, they are part of the storage step.

Screenshots:
Edit storage "rootdisk" URL source:
screenshot-localhost_9000-2020 08 09-15_19_54

Edit storage "rootdisk" Container source:
screenshot-localhost_9000-2020 08 09-15_20_32

Edit storage "rootdisk" "any" source:
screenshot-localhost_9000-2020 08 09-15_21_07

Edit network "any" net interface
screenshot-localhost_9000-2020 08 09-15_29_56

@openshift-ci-robot
Copy link
Contributor

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

In response to this:

Bug 1840958: Source can be empty in general step

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/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/kubevirt Related to kubevirt-plugin labels Aug 9, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 9, 2020
@yaacov yaacov force-pushed the source-can-be-empty-in-general-step branch from 9d55028 to a96b6dc Compare August 9, 2020 12:29
@openshift-ci-robot
Copy link
Contributor

@yaacov: This pull request references Bugzilla bug 1840958, which is valid.

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

In response to this:

Bug 1840958: Source can be empty in general step

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.

@yaacov
Copy link
Member Author

yaacov commented Aug 9, 2020

@matthewcarleton please review

@yaacov yaacov force-pushed the source-can-be-empty-in-general-step branch from a96b6dc to c702494 Compare August 9, 2020 12:51
ProvisionSource.URL.toString(),
ProvisionSource.CONTAINER.toString(),
ProvisionSource.DISK.toString(),
].includes(provisionSourceValue) && getProvisionSourceDiskHelpMsg()}
Copy link
Contributor

Choose a reason for hiding this comment

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

can getProvisionSourceDiskHelpMsg be a component rather than a function ?

Copy link
Member Author

Choose a reason for hiding this comment

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

+1, changed to consts

onClick={() => goToStep(VMWizardTab.STORAGE)}
variant={ButtonVariant.link}
>
<strong>storage</strong>
Copy link
Contributor

Choose a reason for hiding this comment

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

please capitalize

Copy link
Member Author

Choose a reason for hiding this comment

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

+1

onClick={() => goToStep(VMWizardTab.NETWORKING)}
variant={ButtonVariant.link}
>
<strong>networking</strong>
Copy link
Contributor

Choose a reason for hiding this comment

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

also capitalize here

Copy link
Member Author

Choose a reason for hiding this comment

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

+1

@yaacov yaacov force-pushed the source-can-be-empty-in-general-step branch from 72af112 to 8910a55 Compare August 9, 2020 13:20
@irosenzw
Copy link
Contributor

irosenzw commented Aug 9, 2020

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irosenzw, yaacov

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

@yaacov
Copy link
Member Author

yaacov commented Aug 9, 2020

/retest

1 similar comment
@yaacov
Copy link
Member Author

yaacov commented Aug 9, 2020

/retest

@openshift-merge-robot openshift-merge-robot merged commit 20bdbe2 into openshift:master Aug 9, 2020
@openshift-ci-robot
Copy link
Contributor

@yaacov: All pull requests linked via external trackers have merged: openshift/console#6270. Bugzilla bug 1840958 has been moved to the MODIFIED state.

In response to this:

Bug 1840958: Source can be empty in general step

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.

Copy link
Member

@atiratree atiratree left a comment

Choose a reason for hiding this comment

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

@yaacov PTAL

@@ -110,11 +110,9 @@ const provisioningSourceUpdater = ({ id, prevState, dispatch, getState }: Update
dispatch(
vmWizardInternalActions[InternalActionType.UpdateVmSettings](id, {
[VMSettingsField.CONTAINER_IMAGE]: {
Copy link
Member

Choose a reason for hiding this comment

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

the fields were kept required so it would be apparent from redux which fields have to be filled.

for this special use case skipValidation was introduced into vm-settings-tab-initial-state.

Please revert this change or give a good reason why it shouldn't be visible in redux and skipValidation should then be removed from initial-state?

Copy link
Member Author

Choose a reason for hiding this comment

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

the fields were kept required so it would be apparent from redux which fields have to be filled.

this fields are are not required in the user view, a user can leave them empty and continue filling up the form.
the redux viewer should reflect that.

or give a good reason why it shouldn't be visible in redux and skipValidation should then be removed from initial-state?

This fields are optional, users can fill this information later in the storage tab, we should remove the skipValidation, I can make a folow up PR to fix that.

Copy link
Member

Choose a reason for hiding this comment

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

+1 let's remove the skipValidation then

@@ -53,6 +62,52 @@ export class VMSettingsTabComponent extends React.Component<VMSettingsTabCompone
goToStep,
} = this.props;

const provisionSourceValue = this.getFieldValue(VMSettingsField.PROVISION_SOURCE_TYPE);
Copy link
Member

Choose a reason for hiding this comment

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

there are many fields in General Tab and we try to keep this component short as possible. Please either make a new component for this message or make a new component for provision source which will include this functionality.

Copy link
Member Author

Choose a reason for hiding this comment

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

makes sense to me too 👍

I can make a follow up PR to move the "source" input into a separate component.

Copy link
Member

Choose a reason for hiding this comment

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

+1

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/kubevirt Related to kubevirt-plugin lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants