-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(autofix automation): Use user preference as upper bound for stopping point [feature flagged] #103237
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
Conversation
…ping point [feature flagged]
| return preference.get("automated_run_stopping_point") | ||
| return None | ||
| except Exception: | ||
| logger.warning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we work at sentry, it'd be ideal if we could use sentry's error capturing instead of logging the stacktrace. you can do so by doing `sentry.capture_exception(e,level='warning').
additionally, should this be warning? seems like if this happens it would be bad. maybe just capture the exception as error level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not that bad because if we can't fetch this since we will still have the fixability stopping point and Seer had additional checks and preference fetching logic (in some cases).
I'll make it an error for now so we don't ignore it and see how often it fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but why wouldn't we be able to fetch it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case Seer autofix pods are completely down, networking issues making them unreachable, or they are overloaded leading to timeouts. It's rare but it can happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, so i think that an error level makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense it's exception now and capturing it via sentry.
| logger.info("Fixability-based stopping point: %s", fixability_stopping_point) | ||
|
|
||
| # Fetch user preference and apply as upper bound | ||
| user_preference = _fetch_user_preference(group.project.id) | ||
| logger.info("User preference stopping point: %s", user_preference) | ||
|
|
||
| stopping_point = _apply_user_preference_upper_bound( | ||
| fixability_stopping_point, user_preference | ||
| ) | ||
| logger.info("Final stopping point after upper bound: %s", stopping_point) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these logs necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are a bit extra but I was thinking to keep them in for now to validate everything and in case we see something unexpected. I do plan to remove them soon.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #103237 +/- ##
============================================
+ Coverage 68.84% 80.70% +11.85%
============================================
Files 9220 9226 +6
Lines 393563 393995 +432
Branches 25089 25089
============================================
+ Hits 270947 317970 +47023
+ Misses 122168 75577 -46591
Partials 448 448 |
…ping point [feature flagged] (#103237) + With the V0 launch, we are asking the model to decide a stopping stage for autofix but we are still keeping the user setting to decide the stopping point. + This adds logic to upper bound the stopping stage with the user preference. + Notion doc [reference](https://www.notion.so/sentry/Triage-Signals-V0-Technical-Implementation-Details-2a18b10e4b5d8086a7ceddaf4194849a?source=copy_link#2a98b10e4b5d808c8799cb0000aaa853) + Further optimization - we can cache user preferences for a an hour or so reduce API calls.
Uh oh!
There was an error while loading. Please reload this page.