Repository navigation
fix(aci): Validate workflow condition handler groups and boolean results - #129225
Open
sentry-junior[bot] wants to merge 5 commits into
Open
sentry-junior[bot] wants to merge 5 commits into
sentry-junior[bot] wants to merge 5 commits into
Conversation
Workflow triggers and action filters accepted any condition type, including operator conditions such as gt that only make sense in detector condition groups. At evaluation time those get compared against WorkflowEventData, raise a TypeError, and the workflow silently never fires. Require trigger conditions to come from the workflow_trigger handler group and action filter conditions from the action_filter handler group. Co-Authored-By: Kyle Consalus <6990351+kcons@users.noreply.github.com>
Pass the trigger handler group as a field argument instead of a subclass so the OpenAPI schema does not gain a new WorkflowTriggersValidator component.
kcons
marked this pull request as draft
October 29, 2026 18:32
…e-condition-groups Co-Authored-By: Kyle Consalus <6990351+kcons@users.noreply.github.com> # Conflicts: # src/sentry/workflow_engine/endpoints/validators/base/workflow.py
Workflow trigger and action filter conditions only produce a boolean, but the API accepted any JSON value for conditionResult. A stored string like "true" makes DataCondition.get_condition_result() return a ConditionError, so the condition never matches and the alert silently stops firing. The validator now turns "true"/"false" into booleans for those handler groups and rejects any other non-boolean value. Detector conditions are unchanged. Fixes SENTRY-608Y Co-Authored-By: Kyle Consalus <6990351+kcons@users.noreply.github.com>
Every registered condition handler sets group. The getattr fallback only covered two test mocks that didn't, so give them a group instead. Co-Authored-By: Kyle Consalus <6990351+kcons@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The workflow API accepted trigger and action filter conditions that can never evaluate, so the alert saves fine and then silently never fires. Workflow validation now rejects two such cases:
gt,eq) used as triggers (SENTRY-5YNQ)."true"(SENTRY-608Y)."true"and"false"are converted to booleans, and other values are rejected.via @kcons.
--
View Session [Sentry]