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

Bug 1504729 - Log job state when getting last op #505

Merged
merged 2 commits into from Oct 26, 2017

Conversation

djzager
Copy link
Member

@djzager djzager commented Oct 19, 2017

Simple enhancement so that we can see the state of the last operation when the service-catalog requests it.

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 19, 2017
a.log.Debug(fmt.Sprintf("service_id: %s", req.ServiceID)) // optional
a.log.Debug(fmt.Sprintf("plan_id: %s", req.PlanID)) // optional
a.log.Debug(fmt.Sprintf("operation: %s", req.Operation)) // this is provided with the provision. task id from the work_engine
a.log.Debugf("service_id: %s", req.ServiceID)
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for killing the fmt.Sprint, there's a lot of that left over from the old days :)

a.log.Debug(fmt.Sprintf("operation: %s", req.Operation)) // this is provided with the provision. task id from the work_engine
a.log.Debugf("service_id: %s", req.ServiceID)
a.log.Debugf("plan_id: %s", req.PlanID)
a.log.Debugf("operation: %s", req.Operation) // this is provided with the provision. task id from the work_engine
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: the comment is a little inaccurate, it'll be there with every async op, not just provision.

@@ -1004,7 +1004,7 @@ func (a AnsibleBroker) LastOperation(instanceUUID uuid.UUID, req *LastOperationR
*/
a.log.Debugf("service_id: %s", req.ServiceID)
a.log.Debugf("plan_id: %s", req.PlanID)
a.log.Debugf("operation: %s", req.Operation) // this is provided with the provision. task id from the work_engine
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this an erroneous comment? The operation is expected to be the job token (task_id) from the work_engine that happened during the provision. At a minimum I'd remove provision and make it clear that we expect operation to be the job token id.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just remarked it wasn't entirely accurate since all async jobs will set that to be the job token, not just provision.

Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

cleanup the comment to make it more clear vs removing.

@djzager djzager force-pushed the instance-state-logging branch 2 times, most recently from bcb5fe2 to 2a6fdda Compare October 19, 2017 18:06
Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

Sorry while this is a TRIVIAL change, we're in bug mode. So in order to get this into 3.7 we need a bugzlila. The bug will only need QE to look at the logs to see the desired statement.

@jmrodri
Copy link
Contributor

jmrodri commented Oct 20, 2017

If this was changing something in docs or build file stuff I would let it slide. This is actually changing mainline broker code so a bugzilla is required.

@djzager djzager changed the title Log job state when getting last operation Bug 1504729 - Log job state when getting last op Oct 20, 2017
@jmrodri jmrodri merged commit 87c5165 into openshift:master Oct 26, 2017
@rthallisey
Copy link
Contributor

#475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants