-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(workflow_engine): Add a DataConditionHandlerType
to each DataConditionHandler
#83276
base: master
Are you sure you want to change the base?
Conversation
…he handlers in APIs, allowing us to generate dropdowns for each product area (detectors, workflows, actions)
c2d790a
to
f39a0b5
Compare
…will allow us to have filtered dropdowns in the ui
f39a0b5
to
2c28d43
Compare
|
||
|
||
@condition_handler_registry.register(Condition.EVERY_EVENT) | ||
class EveryEventConditionHandler(DataConditionHandler[WorkflowJob]): | ||
type: DataConditionHandlerType = DataConditionHandlerType.WORKFLOW_TRIGGER |
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.
@cathteng can you confirm we need this condition handler? i think we might be able to remove it since it always evaluates as truthy (if we don't have a condition in a condition group that also evaluates as truthy).
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 you might be right, this was added in the past by default for issue alerts with no conditions in the WHEN 😬 but now we have a default evaluation for it
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 these two should be workflow triggers!
src/sentry/workflow_engine/handlers/condition/existing_high_priority_issue_handler.py
Outdated
Show resolved
Hide resolved
src/sentry/workflow_engine/handlers/condition/reappeared_event_handler.py
Outdated
Show resolved
Hide resolved
…_handler.py Co-authored-by: Cathy Teng <[email protected]>
…iority_issue_handler.py Co-authored-by: Cathy Teng <[email protected]>
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #83276 +/- ##
===========================================
+ Coverage 46.63% 87.54% +40.90%
===========================================
Files 9467 9481 +14
Lines 537059 537736 +677
Branches 21178 21178
===========================================
+ Hits 250471 470757 +220286
+ Misses 286238 66629 -219609
Partials 350 350 |
Description
As we were implementing DataConditionHandlers, I realized we didn't have a way to filter each handler in an API for the UI. This allow users to select the type of handler they want, and then configure it.
To address this, adding a static type to the condition handlers to match where in the product they'll be used;