Repository navigation
ref(automations): Break circular dependency between dataConditionNodes and action filters - #127491
Merged
ryan953 merged 3 commits intoOct 15, 2026
Conversation
…s and action filters
The frequency filter nodes now receive a getDefaultComparison prop from the node list renderer instead of importing dataConditionNodesMap. That breaks the cycle without a second module of default values, so dataConditionNodesMap stays the only place the defaults are declared. Fixes CODING-CONVENTIONS-99M Fixes CODING-CONVENTIONS-99P Fixes CODING-CONVENTIONS-99Q
ryan953
approved these changes
Oct 15, 2026
ryan953
enabled auto-merge (squash)
October 15, 2026 04:31
ryan953
deleted the
seer/ref/automations-break-data-condition-nodes-cycle-H9omO9
branch
October 15, 2026 04:31
This branch was successfully 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.
eventFrequency.tsx,eventUniqueUserFrequency.tsxandpercentSessions.tsximporteddataConditionNodesMaponly to look up thedefaultComparisonfor the type a user picks in the "more than... / relatively higher than..." select.dataConditionNodes.tsximports those same components to build the map, so each file formed a runtime cycle.The node components now receive a
getDefaultComparisonprop.NodeindataConditionNodeList.tsx, which renders every condition and already imports the map, supplies it.dataConditionNodes.tsxkeeps declaring the defaults inline, so the map stays the single source of truth, and itsdataConditionfield is now typed with the newDataConditionNodeComponentPropsinstead ofany.The obvious alternative, extracting the defaults into a separate module that both sides import (what this PR and the duplicates #127489 / #127490 first did), also breaks the cycle but splits the condition registry across two files. A lookup callback is used rather than passing the two default objects directly because the field needs the defaults for the other condition types (COUNT/PERCENT), not the type currently rendered.
A new test in
dataConditionNodeList.spec.tsxcovers switching an event frequency condition to "relatively higher than..." and checks the percent defaults are applied; no spec covered that path before.No feature flags.
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Fixes CODING-CONVENTIONS-99M
Fixes CODING-CONVENTIONS-99P
Fixes CODING-CONVENTIONS-99Q
@sentry <feedback>: Autofix iterates on these changes@sentry stop iterating: Autofix stops iterating on this run