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

Boolean circuit for event dependencies #162

Merged
merged 8 commits into from
Feb 4, 2019

Conversation

VaibhavPage
Copy link
Contributor

@VaibhavPage VaibhavPage commented Feb 2, 2019

#12

@VaibhavPage VaibhavPage changed the title WIP: Boolean circuit for event dependencies Boolean circuit for event dependencies Feb 2, 2019

// 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 {
Copy link
Contributor

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?

Copy link
Contributor Author

@VaibhavPage VaibhavPage Feb 3, 2019

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
Copy link
Contributor

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.?

Copy link
Contributor Author

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

@magaldima magaldima merged commit 8989738 into master Feb 4, 2019
@VaibhavPage VaibhavPage deleted the boolean-circuit-for-event-dependencies branch February 18, 2019 12:58
juliev0 pushed a commit to juliev0/argo-events that referenced this pull request Mar 29, 2022
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants