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

Set service's lifecycle_state based on miq_request_task's state. #19205

Merged
merged 1 commit into from
Aug 29, 2019

Conversation

lfu
Copy link
Member

@lfu lfu commented Aug 26, 2019

With bundle service, all the top and sub services are connected to the same request.
A sub service may have two ServiceTemplateProvisionTask. One has ServiceTemplate as the source while the other has MiqRequest.

https://bugzilla.redhat.com/show_bug.cgi?id=1743550

@miq-bot assign @tinaafitz
@miq-bot add_label bug, services, ivanchuk/yes, changelog/yes, blocker

Screen Shot 2019-08-26 at 13 18 43

@tinaafitz
Copy link
Member

@mkanoor Please review.

end

private

def top_task_for_service?
source_type == "ServiceTemplate"
Copy link
Contributor

Choose a reason for hiding this comment

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

@lfu Just for information what is the source_type for other other child services wouldn't they be ServiceTemplate too.

Copy link
Member Author

Choose a reason for hiding this comment

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

As stated in the description, the child service could have MiqRequest or ServiceTempalte for source_type.

Copy link
Member

Choose a reason for hiding this comment

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

To be clear the reference to MiqRequest is the MiqProvisionRequestTemplate sub-class.

I found the name confusing as I kept thinking it was trying to reference the top task (the one for the service bundle), but it is really just trying to identify if the source of the task is a ServiceTemplate.

Maybe a better name would be: service_template_source?

@miq-bot
Copy link
Member

miq-bot commented Aug 29, 2019

Checked commit lfu@b089207 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. 🍰

Copy link
Member

@gmcculloug gmcculloug left a comment

Choose a reason for hiding this comment

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

LGTM

@gmcculloug gmcculloug merged commit 5aa663b into ManageIQ:master Aug 29, 2019
@gmcculloug gmcculloug added this to the Sprint 119 Ending Sep 2, 2019 milestone Aug 29, 2019
simaishi pushed a commit that referenced this pull request Aug 30, 2019
Set service's lifecycle_state based on miq_request_task's state.

(cherry picked from commit 5aa663b)

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

Ivanchuk backport details:

$ git log -1
commit ef3de50de2747bd846996ebaaed2b3a12fea1188
Author: Greg McCullough <gmccullo@redhat.com>
Date:   Thu Aug 29 15:59:29 2019 -0400

    Merge pull request #19205 from lfu/bundle_lifecycle_1743550
    
    Set service's lifecycle_state based on miq_request_task's state.
    
    (cherry picked from commit 5aa663babe25e5723dbdf53181836761cfd7b39b)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1743550

@lfu lfu deleted the bundle_lifecycle_1743550 branch November 4, 2019 15:23
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