-
Notifications
You must be signed in to change notification settings - Fork 743
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
Boolean circuit for event dependencies #162
Conversation
|
||
// canExecuteTrigger determines whether a trigger is executable based on condition set on trigger | ||
func (sec *sensorExecutionCtx) canExecuteTrigger(trigger v1alpha1.Trigger) bool { | ||
if trigger.When == 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.
so does this make this change non-breaking? for existing sensors defined without groups or when
this will still allow the trigger to fire?
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.
Yeah, this is a non breaking change. If sensor doesn’t define groups, it will follow old logic of ANDing all events. ‘when’ on triggers is completely optional as well
sec.log.Error().Err(err).Msg("failed to create K8s event to log trigger execution round completion") | ||
} | ||
|
||
// Mark all dependency nodes as active |
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.
so every trigger execution resets the sensor nodes to active
so that this sensor can be triggered again.?
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.
Every round of triggers resets the sensor nodes back to active state
* Moving EventProtocol to api common * Moving EventProtocol to api common * Added support to declare dependency groups and circuit expression * AAdded DependencyGroups as separate entity from Dependencies * Validating every sensor file and other chores * Added conditions for triggers * Validating every sensor file and other chores
#12