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

Don't create retirement tasks for things that are already retired #18895

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Jun 19, 2019

We shouldn't create tasks for already retired VMs.
bz is https://bugzilla.redhat.com/show_bug.cgi?id=1720338

This is ugly but it'll work for now. The refactor ideally involves using the general status check that Lucy's working on, but until that's baked in and finished and well-tested, we have to do something kinda hacky like this. This check doesn't belong inside the retireable? mixin check because that was intended as a class check for, can this class of thing actually be retired? So since this is an instance method check, it has to be here for now.

@d-m-u
Copy link
Contributor Author

d-m-u commented Jun 19, 2019

@miq-bot add_label bug
@miq-bot assign @tinaafitz
@miq-bot add_reviewer @lfu

@miq-bot miq-bot added the bug label Jun 19, 2019
@miq-bot miq-bot requested a review from lfu June 19, 2019 15:46
@d-m-u d-m-u force-pushed the adding_already_retired_check_to_service_retire_task_create branch from c2309eb to 2a6b8f3 Compare June 19, 2019 16:29
@tinaafitz
Copy link
Member

Hi @d-m-u , here's the BZ for this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1720338

@tinaafitz
Copy link
Member

@mkanoor Please review.

@tinaafitz
Copy link
Member

Thanks @d-m-u for making the changes I requested.

@d-m-u
Copy link
Contributor Author

d-m-u commented Jun 19, 2019

@bdunne any chance I could con you into merging this please?

@d-m-u d-m-u changed the title Don't create tasks for things that are already retired Don't create retirement tasks for things that are already retired Jun 19, 2019
@d-m-u d-m-u force-pushed the adding_already_retired_check_to_service_retire_task_create branch from 2a6b8f3 to c6822d3 Compare June 19, 2019 19:05
@miq-bot
Copy link
Member

miq-bot commented Jun 19, 2019

Checked commit d-m-u@c6822d3 with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍪

@bdunne bdunne merged commit 6bbf5f4 into ManageIQ:master Jun 19, 2019
@bdunne bdunne added this to the Sprint 114 Ending Jun 24, 2019 milestone Jun 19, 2019
@bdunne bdunne assigned bdunne and unassigned tinaafitz Jun 19, 2019
@d-m-u
Copy link
Contributor Author

d-m-u commented Jul 10, 2019

@miq-bot add_label hammer/yes

simaishi pushed a commit that referenced this pull request Jul 22, 2019
…service_retire_task_create

Don't create retirement tasks for things that are already retired

(cherry picked from commit 6bbf5f4)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1728889
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit e8bd1a3882ab0cb25b0970545ba320cc5428a8e0
Author: Brandon Dunne <brandondunne@hotmail.com>
Date:   Wed Jun 19 15:25:37 2019 -0400

    Merge pull request #18895 from d-m-u/adding_already_retired_check_to_service_retire_task_create
    
    Don't create retirement tasks for things that are already retired
    
    (cherry picked from commit 6bbf5f46cd3bd36d4d2138fe2c2859afbc4c5a81)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1728889

@simaishi
Copy link
Contributor

simaishi commented Jul 22, 2019

@d-m-u I backported this after #18958 which removed - so Travis is now failing in hammer branch. Can you create a PR to fix? Sorry!

@d-m-u d-m-u deleted the adding_already_retired_check_to_service_retire_task_create branch September 26, 2019 10:34
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.

6 participants