Skip to content

feat(workflow_engine): Return status change messages when a stateful detector resolves - #80122

Merged
wedamija merged 2 commits into
masterfrom
danf/we-return-status-changes
Nov 5, 2024
Merged

wedamija merged 2 commits into
masterfrom
danf/we-return-status-changes

Conversation

@wedamija

@wedamija wedamija commented Nov 1, 2024

Copy link
Copy Markdown
Member

When we detect that a stateful detector has resolved we can return a resolved status change message. This is generic and applies to all stateful detectors, so there's no need for customization here.

@wedamija
wedamija requested a review from saponifi3d November 1, 2024 01:34
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 1, 2024
@wedamija
wedamija force-pushed the danf/we-condition-eval branch from a018976 to f2d261c Compare November 2, 2024 00:59
@wedamija
wedamija requested review from a team as code owners November 2, 2024 00:59
@wedamija
wedamija force-pushed the danf/we-return-status-changes branch from b3513f6 to f196c85 Compare November 2, 2024 00:59
Comment thread src/sentry/workflow_engine/processors/detector.py Outdated

@property
def project_id(self):
# XXX: Temporary property until we add `project_id` to the model.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

any other properties that we should add? I have a few more things from process_workflows as well, but going to hold off until these PRs are merged before looking at those more. (active is on my list to remove as well.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Where are you removing active from?

I don't know of any other properties right now, but if I think of any I'll slack them over to you

if state_data.active != is_active or state_data.status != status:
self.enqueue_state_update(group_key, is_active, status)
# TODO: Add hook here for generating occurrence or status update
if state_data.status != new_status:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉

@codecov

codecov Bot commented Nov 5, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #80122      +/-   ##
==========================================
- Coverage   78.09%   78.09%   -0.01%     
==========================================
  Files        7185     7185              
  Lines      317425   317435      +10     
  Branches    43747    43748       +1     
==========================================
+ Hits       247894   247896       +2     
- Misses      63192    63198       +6     
- Partials     6339     6341       +2     

…detector resolves

When we detect that a stateful detector has resolved we can return a resolved status change message. This is generic and applies to all stateful detectors, so there's no need for customization here.
@wedamija
wedamija force-pushed the danf/we-return-status-changes branch from 64effae to b87fe97 Compare November 5, 2024 21:34
@wedamija
wedamija merged commit bdd229e into master Nov 5, 2024
@wedamija
wedamija deleted the danf/we-return-status-changes branch November 5, 2024 22:30
jan-auer added a commit that referenced this pull request Nov 6, 2024
* master: (67 commits)
  feat(dynamic-sampling): Sampling breakdown (#80304)
  feat(profiling): add organizations:continuous-profiling to the list of exposable features (#80236)
  chore(broadcasts): remove cta column from broadcast model (#80201)
  feat(dynamic-sampling): Use sample rates endpoint (#80235)
  feat(issues): Rearrange all events columns, sizes (#80296)
  fix(issues): All event table pagination counts (#80297)
  fix(issues): Preserve query parameters on all events close (#80295)
  feat(issues): Hide "comment" button until focused (#80283)
  fix(sentry-app): Adds better validation for invalid token request bodies (#80289)
  feat(workflow_engine): Add in hook for producing occurrences from the stateful detector (#80168)
  feat(issue summary) New structured issue summary design (#80273)
  feat(workflow_engine): Return status change messages when a stateful detector resolves (#80122)
  feat(insights): Add insights query date range footer hook (#80276)
  ref(crons): Switch to cronsim in sample data generator (#80278)
  feat(issue-details): Hide merged/similar issues for non-error issues (#80284)
  feat(issue summary) Update issue summary model (#80270)
  feat(crons): Add cronsim behind an option (#80271)
  fix(anomaly detection): add alerts analytics reqs to utils/analytics.tsx (#80281)
  feat(trace-explorer): Sort traces by timestamp in EAP (#80274)
  feat(workflow_engine): Implement basic evaluation in `DataCondition` (#80118)
  ...
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 21, 2024

This branch was successfully deployed

1 active deployment
Preview — b87fe977 Deployed Nov 5, 2024 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants