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

[#740] Waiting for available conversion hosts #807

Merged
merged 5 commits into from
Nov 28, 2018

Conversation

michaelkro
Copy link
Contributor

@michaelkro michaelkro commented Nov 21, 2018

Fixes #740
https://bugzilla.redhat.com/show_bug.cgi?id=1640816

Notes

  • EVM server must be running in order to test cancellation of requests/tasks
  • It is possible to test in dev by using a mapping whose target cluster has no configured conversion hosts
  • In dev, cancellation does not seem to fully execute. The request's cancelation_status gets set to 'cancel_requested`, but does not progress to the other two states. Please see [699] Fix cancellation issues based on new backend changes #708
  • Also, cancellation messes up the queue worker pretty good. There may be a better workflow, but I was forced to reset my DB between each test run.
    • After hitting the cancel button, wait for the migration to fail out
    • Kill the queue worker, and then clear out the queue with MiqQueue.destroy_all
    • Fire the queue worker back up and shut down the EVM
    • Kill the queue worker, exit all instances of the rails console, and reset the db
    • Wash, rinse, repeat
  • Should handle scoping button disabling to the specific card whose cancel button is pressed
  • Cancel button should stay disabled after a full page refresh

Screens

fullscreen_11_21_18__2_29_pm

</EmptyState>
);

CardEmptyState.propTypes = {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 11 locations. Consider refactoring.

<CardEmptyState
iconType="pf"
iconName="error-circle-o"
emptyStateInfo={
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

@michaelkro michaelkro force-pushed the 740-waiting-for-conversion-hosts branch 3 times, most recently from 458867b to d646a03 Compare November 22, 2018 02:29
.set('isRejectedCancelPlanRequest', false)
.set('hasRequestedCancellation', [...state.hasRequestedCancellation, action.payload]);
case `${V2V_CANCEL_PLAN_REQUEST}_FULFILLED`: {
return state
Copy link

Choose a reason for hiding this comment

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

Avoid too many return statements within this function.

@miq-bot miq-bot added the wip label Nov 22, 2018
@michaelkro michaelkro force-pushed the 740-waiting-for-conversion-hosts branch 2 times, most recently from 77d7d72 to aa65469 Compare November 25, 2018 15:52
response: { data: cancelRequestResponse }
});

return store.dispatch(cancelPlanRequestAction(TRANSFORMATION_PLAN_REQUESTS_URL, '1')).then(() => {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

status: 404
});

return store.dispatch(cancelPlanRequestAction(TRANSFORMATION_PLAN_REQUESTS_URL, '1')).catch(() => {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

@michaelkro michaelkro force-pushed the 740-waiting-for-conversion-hosts branch 3 times, most recently from 17ae9a7 to 29681a8 Compare November 26, 2018 04:16
response: { data: cancelRequestResponse }
});

return store.dispatch(action).then(() => {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

status: 404
});

return store.dispatch(action).catch(() => {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

@michaelkro michaelkro force-pushed the 740-waiting-for-conversion-hosts branch 4 times, most recently from 9e6bdc0 to 33e2313 Compare November 26, 2018 06:27
@michaelkro michaelkro changed the title [WIP] [#740] Waiting for available conversion hosts [#740] Waiting for available conversion hosts Nov 26, 2018
@michaelkro michaelkro removed the wip label Nov 26, 2018
* When a cancelation is initiated for a plan request, its
  cancelation_status attribute will change from null to a string value
* requestsProcessingCancellation
  * Scopes disabling cancel button to a specific in progress card
  * Cancel button will remain disabled even after a full page refresh
@michaelkro michaelkro force-pushed the 740-waiting-for-conversion-hosts branch from 593658c to 392ef2e Compare November 26, 2018 14:51
@miq-bot
Copy link
Member

miq-bot commented Nov 26, 2018

Checked commits michaelkro/manageiq-v2v@e14c5d9~...392ef2e with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍰

Copy link
Contributor

@mturley mturley left a comment

Choose a reason for hiding this comment

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

Code looks good, I'm still working on testing it.

Copy link
Contributor

@mturley mturley left a comment

Choose a reason for hiding this comment

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

Tested locally and it works great!

Nice work, especially abstracting out the card child components. And thanks for adding unit tests!

@mturley mturley merged commit ef4b7e1 into ManageIQ:master Nov 28, 2018
simaishi pushed a commit that referenced this pull request Dec 3, 2018
@simaishi
Copy link
Contributor

simaishi commented Dec 3, 2018

Hammer backport details:

$ git log -1
commit 82068aeccde633ec3f8995d28f5749f179e680a9
Author: Mike Turley <mike.turley@alum.cs.umass.edu>
Date:   Wed Nov 28 16:39:47 2018 -0500

    Merge pull request #807 from michaelkro/740-waiting-for-conversion-hosts
    
    [#740] Waiting for available conversion hosts
    
    (cherry picked from commit ef4b7e1dd6b19cd822a11945574ae33f434a39ac)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1640816

@michaelkro michaelkro deleted the 740-waiting-for-conversion-hosts branch December 7, 2018 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants