Skip to content

fix(autofix): Handle missing state in get_autofix_state #97556

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

seer-by-sentry[bot]
Copy link
Contributor

@seer-by-sentry seer-by-sentry bot commented Aug 9, 2025

Fixes SENTRY-43FP. The issue was that: GitHub webhook for non-Autofix PR caused Seer to return null state, leading to DictError during validation.

  • Explicitly check for a missing state key in the result of get_autofix_state.
  • Return None if the state key is missing to avoid errors when validating.

This fix was generated by Seer in Sentry, triggered by Rohan Agarwal. 👁️ Run ID: 734775

Not quite right? Click here to continue debugging with Seer.

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.

@roaga roaga changed the title fix(seer): Handle missing state in get_autofix_state fix(autofix): Handle missing state in get_autofix_state Aug 9, 2025
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 9, 2025
Copy link

codecov bot commented Aug 9, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/seer/autofix/utils.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #97556   +/-   ##
=======================================
  Coverage   80.62%   80.62%           
=======================================
  Files        8560     8560           
  Lines      376889   376892    +3     
  Branches    24538    24538           
=======================================
+ Hits       303865   303876   +11     
+ Misses      72654    72646    -8     
  Partials      370      370           

@roaga roaga added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Aug 9, 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 Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant