Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(pipelineTriggers): handle invalid constraint regexes (#1209) (#9) #10

Closed

Conversation

aman-agrawal
Copy link

) (#9)

* fix(pipelineTriggers): handle invalid constraint regexes

Currently, if a user accidentally configures a pipeline trigger with an
invalid regex for a constraint value, echo throws a
`PatternSyntaxException` any time it receives an event that should be
tested against the constraint.  As a result, all pipeline triggers using
the same trigger type & source/subscription will be non-functional, not
just the pipeline with the bad regex.

This patch catches `PatternSyntaxException`, logs an error about the bad
regex for troubleshooting purposes, and returns `false` such that the
bad regex will never match, allowing all other pipeline triggers to
continue functioning normally.

* fix(pipelineTriggers): improved logging for invalid constraint patterns

Co-authored-by: Alexandra Spillane <alexandra@spillane.me>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant