-
Notifications
You must be signed in to change notification settings - Fork 84
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
Remove WorkMsg interface to avoid unneeded marshalling and unmarshalling #604
Remove WorkMsg interface to avoid unneeded marshalling and unmarshalling #604
Conversation
…halling. Add missing error checks in subscribers
Changes Unknown when pulling d19a6cc on maleck13:remove-wrkmsg-interface into ** on openshift:master**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR!
Method: apb.JobMethodDeprovision, | ||
}) | ||
}); err != nil { | ||
log.Errorf("failed to set state after deprovision %#v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
var extCreds *apb.ExtractedCredentials | ||
metrics.ProvisionJobFinished() | ||
|
||
log.Debug("Processed provision message from buffer") | ||
// HACK: this seems like a hack, there's probably a better way to | ||
// get the data sent through instead of a string | ||
json.Unmarshal([]byte(msg.Render()), &pmsg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Describe what this PR does and why we need it:
Removes the WorkMsg interface as it only seems to be used to marshal msgs into strings and then the subscribers unmarshal back again. Now that we only have one JobMsg type, this seems unnecessary. This PR also adds missing err checks within the subscribers.
Changes proposed in this pull request