Skip to content

perf(aci): Pass DataConditionGroup to process_data_condition_group #93449

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

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

kcons
Copy link
Member

@kcons kcons commented Jun 12, 2025

The caches sometimes work for us, but when they don't DataConditionGroup loads are a major contributor to query time.
Making process_data_condition_group take a DataConditionGroup rather than an ID allow us to pass the one we have and avoid any querying risk while being roughly the same in cases where we don't have one.

@kcons kcons marked this pull request as ready for review June 12, 2025 17:03
@kcons kcons requested a review from a team as a code owner June 12, 2025 17:03
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 12, 2025
Copy link

sentry-io bot commented Jun 12, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/sentry/workflow_engine/processors/data_condition_group.py

Function Unhandled Issue
evaluate_data_conditions SoftTimeLimitExceeded: SoftTimeLimitExceeded() se...
Event Count: 1
📄 File: src/sentry/workflow_engine/processors/workflow.py (Click to Expand)
Function Unhandled Issue
evaluate_workflows_action_filters SoftTimeLimitExceeded: SoftTimeLimitExceeded() se...
Event Count: 4
---

Did you find this useful? React with a 👍 or 👎

Copy link
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 thanks! this has been on my todo list for a while (i'd like to stop passing around IDs except for celery task boundaries)

@kcons kcons enabled auto-merge (squash) June 12, 2025 17:10
@kcons kcons merged commit a19c69e into master Jun 12, 2025
60 checks passed
@kcons kcons deleted the kcons/uplevel branch June 12, 2025 17:30
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/workflow_engine/models/workflow.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #93449       +/-   ##
===========================================
+ Coverage   46.23%   87.99%   +41.76%     
===========================================
  Files       10271    10275        +4     
  Lines      592532   592995      +463     
  Branches    23034    23034               
===========================================
+ Hits       273929   521803   +247874     
+ Misses     318171    70760   -247411     
  Partials      432      432               

andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
…93449)

The caches sometimes work for us, but when they don't DataConditionGroup
loads are a major contributor to query time.
Making `process_data_condition_group` take a DataConditionGroup rather
than an ID allow us to pass the one we have and avoid any querying risk
while being roughly the same in cases where we don't have one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants