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

Ensure correct type is set when creating an instance from a cached image #518

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

lorumic
Copy link
Contributor

@lorumic lorumic commented Nov 1, 2023

Done

  • Passed the correct image type when creating an instance from a cached image

QA

  1. Run the LXD-UI:
    • On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @lorumic or @edlerd for access.
    • With a local copy of this branch, run as described here.
  2. Perform the following QA steps:
    • Go to storage page, select "Cached images" tab
    • Click on the "Play" button to create an instance using a VM cached image (if you don't have one, first create a VM instance following the regular instance creation flow from the instances page)
    • Check that, on the instance creation page, the correct image type is selected in the (disabled) dropdown

@webteam-app
Copy link

Demo starting at https://lxd-ui-518.demos.haus

Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

This breaks the image selector in some cases it sets instance type to "any":

  1. Create instance
  2. Browse images
  3. Select Type VM
  4. Select Type Any
  5. Choose the 1st image in the list
  6. Create
  7. Error appears: "Instance creation failed / Invalid instance type"

@edlerd
Copy link
Collaborator

edlerd commented Nov 13, 2023

Did you forget to push the update @lorumic ? The problem described above is unchanged.

@lorumic
Copy link
Contributor Author

lorumic commented Nov 13, 2023

Did you forget to push the update @lorumic ? The problem described above is unchanged.

No, I didn't find any solution yet. I had a hard time reproducing it and was asking for further clarifications, but then I could reproduce it and deleted my message. I cannot undo the re-request of review though.

@lorumic
Copy link
Contributor Author

lorumic commented Nov 13, 2023

This breaks the image selector in some cases it sets instance type to "any":

Should be fixed now.

@lorumic lorumic requested review from edlerd and removed request for edlerd November 13, 2023 11:42
Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fixes, two minor suggestions below to improve code.

src/pages/images/ImageSelector.tsx Outdated Show resolved Hide resolved
src/pages/images/ImageSelector.tsx Outdated Show resolved Hide resolved
@lorumic lorumic merged commit 6673199 into canonical:main Nov 13, 2023
5 checks passed
@lorumic lorumic deleted the fix-create-from-cached-image branch November 13, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants