Repository navigation
ref(automations): Break circular dependency between dataConditionNodes and action filters - #127490
Closed
sentry[bot] wants to merge 2 commits into
Closed
sentry[bot] wants to merge 2 commits into
sentry[bot] wants to merge 2 commits into
Conversation
…s and action filters
Member
|
Closing as a duplicate of #127491, which breaks the same dataConditionNodes ↔ actionFilters cycle and now also references this PR's issue. |
ryan953
deleted the
seer/fix/automations-circular-dependency-data-condition-nodes
branch
October 15, 2026 03:08
ryan953
added a commit
that referenced
this pull request
Oct 15, 2026
…s and action filters (#127491) `eventFrequency.tsx`, `eventUniqueUserFrequency.tsx` and `percentSessions.tsx` imported `dataConditionNodesMap` only to look up the `defaultComparison` for the type a user picks in the "more than... / relatively higher than..." select. `dataConditionNodes.tsx` imports those same components to build the map, so each file formed a runtime cycle. The node components now receive a `getDefaultComparison` prop. `Node` in `dataConditionNodeList.tsx`, which renders every condition and already imports the map, supplies it. `dataConditionNodes.tsx` keeps declaring the defaults inline, so the map stays the single source of truth, and its `dataCondition` field is now typed with the new `DataConditionNodeComponentProps` instead of `any`. 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.tsx` covers 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. <!-- Sentry employees and contractors can delete or ignore the following. --> ### 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. <!-- SEER_FIXES_SENTRY_ISSUE --> Fixes [CODING-CONVENTIONS-99M](https://sentry.sentry.io/issues/7780644945/?seerDrawer=true) Fixes [CODING-CONVENTIONS-99P](https://sentry.sentry.io/issues/7780644963/?seerDrawer=true) Fixes [CODING-CONVENTIONS-99Q](https://sentry.sentry.io/issues/7780644968/?seerDrawer=true) <!-- /SEER_FIXES_SENTRY_ISSUE --> <sub>`@sentry <feedback>`: Autofix iterates on these changes</sub> <sub>`@sentry stop iterating`: Autofix stops iterating on this run</sub> --------- Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com> Co-authored-by: Ryan Albrecht <ryan.albrecht@sentry.io>
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.
Fixes circular import cycle where
percentSessions.tsx,eventFrequency.tsx, andeventUniqueUserFrequency.tsximporteddataConditionNodesMapfromdataConditionNodes.tsx, whiledataConditionNodes.tsximported components from those same files.Extracted
dataConditionDefaultComparisonsinto a standalonedefaultComparisons.tshelper withinactionFilters/so dependencies flow in one direction.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-99P
@sentry <feedback>: Autofix iterates on these changes@sentry stop iterating: Autofix stops iterating on this run