Skip to content

feat(investigations): Add the action request apply endpoint - #128681

Open
wedamija wants to merge 4 commits into
danf/inv-fu-18-update-detector-dry-runfrom
danf/inv-fu-16-apply
Open

wedamija wants to merge 4 commits into
danf/inv-fu-18-update-detector-dry-runfrom
danf/inv-fu-16-apply

Conversation

@wedamija

@wedamija wedamija commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This adds an endpoint that applies a suggested action request as the current user, or with dryRun only checks whether it would apply. Each action kind only checks and makes its change, and the shared path records what happened, so the endpoint works the same for every kind.

Depends on #128680

@wedamija
wedamija requested review from a team as code owners October 23, 2026 18:13
@github-actions github-actions Bot added Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components labels Oct 23, 2026
@wedamija
wedamija requested a review from billyvg October 23, 2026 18:18

@billyvg billyvg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 AI-assisted review, posted on behalf of @billyvg.

Comment thread src/sentry/investigations/services/action_requests.py Outdated
Comment thread src/sentry/investigations/services/action_requests.py Outdated
@wedamija
wedamija force-pushed the danf/inv-fu-18-update-detector-dry-run branch from 8c92f3b to 9566cb0 Compare October 23, 2026 23:28
@wedamija
wedamija requested a review from a team as a code owner October 23, 2026 23:28
@wedamija
wedamija force-pushed the danf/inv-fu-16-apply branch from 8189800 to 132da5c Compare October 23, 2026 23:28
wedamija added a commit that referenced this pull request Oct 23, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This applies a suggested monitor change as the user who clicked, through the detector validator, or only checks it on a dry run. If someone changed the monitor after Seer made the suggestion, nothing is applied, and the user sees which settings moved.

Depends on #128681
wedamija added a commit that referenced this pull request Oct 23, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This adds an Apply button to a suggested monitor change. When the card shows, it asks the backend with a dry run whether the change would apply, and says why when it can't, so the user only clicks a change that will save.

Depends on #128681 and #128723
@sentry

sentry Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 760 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@wedamija
wedamija requested a review from billyvg October 23, 2026 23:41
@wedamija
wedamija force-pushed the danf/inv-fu-18-update-detector-dry-run branch from 9566cb0 to 87799ce Compare October 24, 2026 01:10
@wedamija
wedamija force-pushed the danf/inv-fu-16-apply branch from 132da5c to 36395e9 Compare October 24, 2026 01:10
wedamija added a commit that referenced this pull request Oct 24, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This applies a suggested monitor change as the user who clicked, through the detector validator, or only checks it on a dry run. If someone changed the monitor after Seer made the suggestion, nothing is applied, and the user sees which settings moved.

Depends on #128681
wedamija added a commit that referenced this pull request Oct 24, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This adds an Apply button to a suggested monitor change. When the card shows, it asks the backend with a dry run whether the change would apply, and says why when it can't, so the user only clicks a change that will save.

Depends on #128681 and #128723
wedamija added a commit that referenced this pull request Oct 24, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This applies a suggested monitor change as the user who clicked, through the detector validator, or only checks it on a dry run. If someone changed the monitor after Seer made the suggestion, nothing is applied, and the user sees which settings moved.

Depends on #128681
wedamija added a commit that referenced this pull request Oct 24, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This adds an Apply button to a suggested monitor change. When the card shows, it asks the backend with a dry run whether the change would apply, and says why when it can't, so the user only clicks a change that will save.

Depends on #128681 and #128723
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This adds an endpoint that applies a suggested action request as the current user, or with dryRun only checks whether it would apply. Each action kind does its own checks and change, so the endpoint works the same for every kind.

Depends on #128680
Kinds now only make the change: they return what the activity feed shows, or raise when the action is stale or invalid, and the shared apply path updates the request. Error codes are typed, the endpoint picks the status, and a dry run rolls back whatever it touched.
@wedamija
wedamija force-pushed the danf/inv-fu-18-update-detector-dry-run branch from 87799ce to 1d4f218 Compare October 24, 2026 03:49
@wedamija
wedamija force-pushed the danf/inv-fu-16-apply branch from 5e558ca to 52db83c Compare October 24, 2026 03:49
wedamija added a commit that referenced this pull request Oct 24, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This applies a suggested monitor change as the user who clicked, through the detector validator, or only checks it on a dry run. If someone changed the monitor after Seer made the suggestion, nothing is applied, and the user sees which settings moved.

Depends on #128681
wedamija added a commit that referenced this pull request Oct 24, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This adds an Apply button to a suggested monitor change. When the card shows, it asks the backend with a dry run whether the change would apply, and says why when it can't, so the user only clicks a change that will save.

Depends on #128681 and #128723
wedamija added a commit that referenced this pull request Oct 24, 2026
Part of a series that adds follow-up actions to Seer investigations: when a run completes, Seer suggests one next step, and the user can apply a typed action, such as a monitor change, with one click.

This adds an Apply button to a suggested monitor change. When the card shows, it asks the backend with a dry run whether the change would apply, and says why when it can't, so the user only clicks a change that will save.

Depends on #128681 and #128723

This branch was successfully deployed

1 active (outdated) deployment
Preview — 132da5ca Deployed Oct 23, 2026 by vercel[bot]
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 Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants