You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TriggerBindingRef would be responsible for extracting values that are available to conditions - and maybe filters? Or if that's crazy then conditions can go back into TemplateBinding :D
Or something like that! What I do like though is keeping the responsibilities separate, and using EventListener to bring them together.
Actual Behavior
In our most recent design (#55 (comment)) we have added some values to the TriggerBinding which are for filtering (i.e. only create these resources if conditions is true) and validation (i.e. only create these resources if headerMatches is true, if it isn't true, this indicates that the requester is bogus :O - this can be viewed as a type of filtering too?)
This means TriggerBinding now has 3 jobs:
Extract values from events and make them available via outputparams
Extract values from events and use them to filter via conditions
Extract values from events and use them to validate the caller via headerMatches
Renaming TriggerBinding Proposal to rename TriggerBinding #62 <-- depending on how this issue goes, it might become more obvious if TriggerBinding should be renamed and to what :D
I like this proposal especially the bit about resources especially doing a single thing well.
Off the top of my head:
If we go ahead with this proposal, I like the EventParser name a lot!
I'm not sure I fully understand the difference between Filters and Conditions and why we need both. It seems like they are both validating some conditions are true before the resources get created. Maybe we could use just one (I like Filter)
The spec.bindings.filterRef syntax in the EventListener YAML is almost exactly the same as using a Condition in a PipelineTask (just replace filterRef with conditionRef). The spec.bindings.conditions syntax also looks similar enough. It seems like we could reuse Conditionals here (maybe just as an implementation detail if we want to keep distinct types like HTTPFilter)
From the WG today, we are already doing portions of this in #45 and #89 i.e. moving the validation away from TriggerBinding (thanks @khrm ) So, @bobcatfish suggested we close out this proposal and maybe open a new one in the future for Filtering only!
Expected Behavior
As much as it makes sense (our design should be as simple as possible and no simpler! :D) we should try to make our CRDs:
TriggerBindings
more reusable b/c we figured otherwise folks could end up having to create the sameTriggerBindings
over and over again).In light of #55 (see "actual behaviour" below), I propose that:
EventListeners
TriggerBindings
main job)Ideas
We could add a
Filter
type, maybe even something as specific asHTTPFilter
, something like:Or we could take this one step further and have both an
HTTPFilter
andHTTPValidation
but that feels like it's going too far?Then
TriggerBinding
would become just:At this point
TriggerBinding
might make sense to rename to something likeEventParser
?And then
EventListener
would be:TriggerBindingRef would be responsible for extracting values that are available to
conditions
- and maybefilters
? Or if that's crazy thenconditions
can go back intoTemplateBinding
:DOr something like that! What I do like though is keeping the responsibilities separate, and using
EventListener
to bring them together.Actual Behavior
In our most recent design (#55 (comment)) we have added some values to the TriggerBinding which are for filtering (i.e. only create these resources if
conditions
is true) and validation (i.e. only create these resources ifheaderMatches
is true, if it isn't true, this indicates that the requester is bogus :O - this can be viewed as a type of filtering too?)This means
TriggerBinding
now has 3 jobs:outputparams
conditions
headerMatches
Additional Info
Related issues:
The text was updated successfully, but these errors were encountered: