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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2132793: Load and show boot source reference #913

Merged

Conversation

upalatucci
Copy link
Member

@upalatucci upalatucci commented Oct 11, 2022

馃摑 Description

Cause
The EditBootSourceModal does not fetch the dataVolume and does not show the dataVolume source.

Solution
Fetch DV from DataSource and get from it the specs. Populate the form with specs data and be able to edit them. On submission, edit the DV

Most of the changes were made in the SelectSource.
The previous select source was not accepting a state or an initial state so was impossible to solve the bug without touching it.
Also in the component, there were a giant useEffect runner at every update.
Now the SelectSource accepts a state (data volume spec) and all the component states were transformed into constants dependent on that state. There is just one callback when the volume or source type change

馃帴 Demo

Screencast.from.11-10-2022.10.46.52.webm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 11, 2022

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

Requesting review from QA contact:
/cc @lkladnit

In response to this:

Bug 2132793: Load and show boot source reference

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

openshift-ci bot commented Oct 11, 2022

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: lkladnit.

Note that only kubevirt-ui members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

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

Requesting review from QA contact:
/cc @lkladnit

In response to this:

Bug 2132793: Load and show boot source reference

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.

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

openshift-ci bot commented Oct 11, 2022

@upalatucci: This pull request references Bugzilla bug 2132793, which is valid.

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

Requesting review from QA contact:
/cc @lkladnit

In response to this:

Bug 2132793: Load and show boot source reference

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

openshift-ci bot commented Oct 11, 2022

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: lkladnit.

Note that only kubevirt-ui members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@upalatucci: This pull request references Bugzilla bug 2132793, which is valid.

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

Requesting review from QA contact:
/cc @lkladnit

In response to this:

Bug 2132793: Load and show boot source reference

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.

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

openshift-ci bot commented Oct 11, 2022

@upalatucci: This pull request references Bugzilla bug 2132793, which is valid.

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

Requesting review from QA contact:
/cc @lkladnit

In response to this:

Bug 2132793: Load and show boot source reference

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

openshift-ci bot commented Oct 11, 2022

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: lkladnit.

Note that only kubevirt-ui members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@upalatucci: This pull request references Bugzilla bug 2132793, which is valid.

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

Requesting review from QA contact:
/cc @lkladnit

In response to this:

Bug 2132793: Load and show boot source reference

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.

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

openshift-ci bot commented Oct 11, 2022

@upalatucci: This pull request references Bugzilla bug 2132793, which is valid.

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

Requesting review from QA contact:
/cc @lkladnit

In response to this:

Bug 2132793: Load and show boot source reference

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

openshift-ci bot commented Oct 11, 2022

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: lkladnit.

Note that only kubevirt-ui members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@upalatucci: This pull request references Bugzilla bug 2132793, which is valid.

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

Requesting review from QA contact:
/cc @lkladnit

In response to this:

Bug 2132793: Load and show boot source reference

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.

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.

@hstastna
Copy link
Member

/retest

Copy link
Member

@hstastna hstastna left a comment

Choose a reason for hiding this comment

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

Left a few comments to make sure about some code changes. Anyway, great work, Ugo! 鉂囷笍

src/views/templates/actions/components/SelectSource.tsx Outdated Show resolved Hide resolved
try {
dataVolume = await getDataVolume(dataSourcePVCName, dataSourcePVCNamespace);
} catch (error) {
console.warn(error);
Copy link
Member

@hstastna hstastna Oct 11, 2022

Choose a reason for hiding this comment

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

Not sure if we really want console.warn here, if it's about catching error.
Also maybe we want to display the error/warning the different way - visibly for the user - as in other places in the code... Can you, please, explain the reason of using console.warn here? Just for better understanding of this change :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I used warn because deep source wants something in the catch. If getDataVolume throw an error means that there is no DV. It's not an error. What do you think? Should I use console.error anyways?

Copy link
Member

@hstastna hstastna Oct 12, 2022

Choose a reason for hiding this comment

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

Hmm, maybe console.warn + some comment in the code about why we use warn and not error, could be sufficient :) Or maybe also console.error + some comment about that it is not really an error.

But now I am wondering, what if getDataVolume really fails, and not because there was no DV... Can this ever happen?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe if the client lost connection? So also the creation will fail.

@openshift-ci openshift-ci bot added the lgtm Passed code review, ready for merge label Oct 12, 2022
);

if (!loaded) return <PersistentVolumeClainSelectSkeleton />;
if (!projectsLoaded) return <PersistentVolumeClainSelectSkeleton />;
Copy link
Member

Choose a reason for hiding this comment

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

There's a typo in that component name. It should be 'Claim' not 'Clain'. We should probably fix that in a separate PR.

@pcbailey
Copy link
Member

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 13, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hstastna, pcbailey, upalatucci

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-ci openshift-ci bot added the approved This issue is something we want to fix label Oct 13, 2022
@openshift-merge-robot openshift-merge-robot merged commit 6c4b6dd into kubevirt-ui:main Oct 13, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 13, 2022

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

Bugzilla bug 2132793 has been moved to the MODIFIED state.

In response to this:

Bug 2132793: Load and show boot source reference

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 This issue is something we want to fix bugzilla/severity-medium bugzilla/valid-bug lgtm Passed code review, ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants