Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Conversion Host Enablement - Future Refactor - Entire history of tasks is loaded, we should instead load only the necessary tasks #895

Closed
mturley opened this issue Mar 5, 2019 · 11 comments
Assignees
Labels
enhancement refactoring stale technical debt UI Issues and PRs related only to the UI wontfix This will not be worked on

Comments

@mturley
Copy link
Contributor

mturley commented Mar 5, 2019

To display the status and enablement log of an enabled conversion host, we needed to associate each conversion host object with its original completed enablement task object. Due to the difficulty of this association, we didn't have a simple way of requesting from the API only the completed tasks matching the existing conversion hosts, so instead we load ALL conversion host tasks and make the associations in the UI, and we rely on parsing the task's name to get the resource name/type/id.

While it will work for this initial release, this isn't ideal for performance, and it theoretically could run into the 1000-record API pagination limit (see #891) if enough enable/disable tasks are present on the appliance. In the future, we should find a way to do this filtering on the back end, and make an API request that loads only:

  • conversion host enablement tasks that are incomplete or failed
  • conversion host enablement tasks that are complete, and correspond to existing configured conversion_host objects
  • conversion host disablement (?) tasks that are incomplete or failed, and correspond to existing configured conversion_host objects.

@djberg96 let's keep track of this for post-1.1

@mturley
Copy link
Contributor Author

mturley commented Mar 5, 2019

Just to store this somewhere, here is the query Dan originally sent me for loading one of these tasks by resource id, maybe we could adapt this to load multiple tasks by these ids: MiqTask.where("name ~* ?", '.*?conversion_host.*?resource=\(type:\s+[A-Za-z\:]+\s+id:6\)').map(&:name)

@djberg96
Copy link
Contributor

djberg96 commented Mar 7, 2019

Eventually we'll want to establish a relationship from ConversionHost -> MiqTask, presumably through MiqQueue. This is trickier than it ought to be because of the way things are currently modelled, but should be possible. In addition, we'll want to make sure this is exposed in the REST API.

@mturley
Copy link
Contributor Author

mturley commented Mar 7, 2019

Ideally that would include a relationship from MiqTask -> resource (Host or Vm) too, so we could get the name, type and id of the resource before the ConversionHost exists.

@mturley
Copy link
Contributor Author

mturley commented Mar 11, 2019

It looks like this may be made possible by ManageIQ/manageiq#18540.

@mturley
Copy link
Contributor Author

mturley commented Apr 16, 2019

Note to self: to test the implementation here, I'll need to get a database with completed conversion host enable tasks that include the conversion_host.id as provided by ManageIQ/manageiq#18540.

@mturley mturley added the UI Issues and PRs related only to the UI label May 29, 2019
@miq-bot
Copy link
Member

miq-bot commented Dec 2, 2019

This issue has been automatically marked as stale because it has not been updated for at least 6 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions!

@miq-bot miq-bot added the stale label Dec 2, 2019
@mturley
Copy link
Contributor Author

mturley commented Dec 3, 2019

Still should be done, but low priority.

@mturley mturley removed the stale label Dec 4, 2019
@vconzola vconzola added wontfix This will not be worked on and removed v1.3 labels Dec 18, 2019
@vconzola
Copy link

Close as wontfix - maybe someday.

@mturley
Copy link
Contributor Author

mturley commented Dec 18, 2019

I may actually try to do this eventually.. reopening for now.

@mturley mturley reopened this Dec 18, 2019
@miq-bot miq-bot added the stale label Jun 11, 2020
@miq-bot
Copy link
Member

miq-bot commented Jun 11, 2020

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the traige process documentation.

@mturley
Copy link
Contributor Author

mturley commented Jun 15, 2020

You were right last year @vconzola , sorry 😆 . Closing as wontfix.

@mturley mturley closed this as completed Jun 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement refactoring stale technical debt UI Issues and PRs related only to the UI wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants