-
Notifications
You must be signed in to change notification settings - Fork 12
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
Correct event relationships #121
Correct event relationships #121
Conversation
Signed-off-by: Mike Mason <[email protected]>
Signed-off-by: Mike Mason <[email protected]>
Signed-off-by: Mike Mason <[email protected]>
Signed-off-by: Mike Mason <[email protected]>
We need to dig into the errors that may be produced and create a list of errors which should be reprocessable. Otherwise we might reprocess a message which will never be succeed, wasting resources. Signed-off-by: Mike Mason <[email protected]>
b748030
to
ded2de5
Compare
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.
I think this looks good except for the one comment - are we taking into account the union types?
internal/pubsub/subscriber.go
Outdated
rType := s.qe.GetResourceType(resource.Type) | ||
if rType == nil { | ||
s.logger.Warnw("no resource type found for", "resource_type", resource.Type) | ||
|
||
return nil |
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.
just realized you can do this outside of the loop right?
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.
ah yes, good point. fixing
This allows for relations to be determined based on their type. All matched relations will be created. Signed-off-by: Mike Mason <[email protected]>
ded2de5
to
e7cdd25
Compare
We were improperly building relationships setting the relation to the type of resource rather than the actual relation it had.
This now finds all the relations which are supported by the two resources and creates the appropriate relationships.