Skip to content

Conversation

jennmueng
Copy link
Member

@jennmueng jennmueng commented Jul 16, 2025

Instead of making a doc I figured getting a fully working implementation in a draft PR makes the intention much more clear. I'll split up and make actual PRs + refine if this implementation looks good.

We want to implement webhooks to allow people to integrate with Seer Autofix. We'll introduce the below webhook event types:

SEER_ROOT_CAUSE_STARTED = "seer.root_cause_started"
SEER_ROOT_CAUSE_COMPLETED = "seer.root_cause_completed"
SEER_SOLUTION_STARTED = "seer.solution_started"
SEER_SOLUTION_COMPLETED = "seer.solution_completed"
SEER_CODING_STARTED = "seer.coding_started"
SEER_CODING_COMPLETED = "seer.coding_completed"
SEER_PR_CREATED = "seer.pr_created"

The idea is Seer calls Sentry through seer_rpc.py and each of these events have 2 main values in the payload: group_id and run_id. These should be enough to allow the third party integration to call the Autofix get state api and get the full state accordingly.

Example webhook body:

{
  "action": "coding_completed",
  "installation": {
    "uuid": "63d13673-b763-43d3-ad98-55102bb8bfff"
  },
  "data": {
    "group_id": 51,
    "run_id": 52
  },
  "actor": {
    "type": "application",
    "id": "sentry",
    "name": "Sentry"
  }
}

@github-actions github-actions bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Jul 16, 2025
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

Copy link

codecov bot commented Jul 16, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
38196 1 38195 218
View the top 1 failed test(s) by shortest run time
Resource Subscriptions initial no-access permissions renders disabled checkbox with no issue permission
Stack Traces | 0.073s run time
Error: expect(received).toHaveLength(expected)

Expected length: 3
Received length: 4
Received array:  [<input aria-label="issue" class="e1b0h4f90 css-kgzt8f-NativeHiddenCheckbox-withChonk em3r8rc2" disabled="" id="issue" type="checkbox" value="issue" />, <input aria-label="error" class="e1b0h4f90 css-kgzt8f-NativeHiddenCheckbox-withChonk em3r8rc2" disabled="" id="error" type="checkbox" value="error" />, <input aria-label="comment" class="e1b0h4f90 css-kgzt8f-NativeHiddenCheckbox-withChonk em3r8rc2" disabled="" id="comment" type="checkbox" value="comment" />, <input aria-label="seer" class="e1b0h4f90 css-kgzt8f-NativeHiddenCheckbox-withChonk em3r8rc2" disabled="" id="seer" type="checkbox" value="seer" />]
    at Object.toHaveLength (.../settings/organizationDeveloperSettings/resourceSubscriptions.spec.tsx:26:47)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1009:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:829:11)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:494:12)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@jennmueng jennmueng changed the title feat(seer-autofix): Ready to fix webhook feat(seer): Seer webhooks Jul 18, 2025
@getsantry
Copy link
Contributor

getsantry bot commented Aug 9, 2025

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Aug 9, 2025
@getsantry
Copy link
Contributor

getsantry bot commented Sep 1, 2025

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Sep 1, 2025
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.

1 participant