Skip to content

fix(seer-issues-patch) More parsing of functions for Python #86558

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

Merged
merged 3 commits into from
Mar 8, 2025

Conversation

kddubey
Copy link
Contributor

@kddubey kddubey commented Mar 6, 2025

The issue-fetching query includes function names parsed out of patches so that they can be matched against event stackframes. The current suite of parsers look at the excerpt from hunk headers, probably to minimize false negatives. This misses important positives, e.g., component_filtered_report is not extracted from this patch.

This PR additionally extracts functions from the bodies. Precision isn't perfect, e.g,. running the parser on a patch containing a string like this—

"""
def not_an_actual_fxn(): ...
"""

—returns {"not_an_actual_fxn"} instead of {}. But for our use cases—matching function names and file names to stackframes, and then having an LLM process issues further (as done in relevant warnings)—this trade-off is largely worth it.

Currently, only Python parsing has been extended. Will see if others can be safely extended.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 6, 2025
Copy link

codecov bot commented Mar 6, 2025

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   #86558      +/-   ##
==========================================
- Coverage   87.83%   87.81%   -0.03%     
==========================================
  Files        9751     9764      +13     
  Lines      552488   553148     +660     
  Branches    21542    21542              
==========================================
+ Hits       485287   485740     +453     
- Misses      66852    67059     +207     
  Partials      349      349              

@kddubey kddubey changed the title fix(seer-issues-patch) More parsing of functions fix(seer-issues-patch) More parsing of functions for Python Mar 7, 2025
@kddubey kddubey marked this pull request as ready for review March 7, 2025 22:39
@kddubey kddubey requested a review from a team as a code owner March 7, 2025 22:39
@kddubey kddubey requested a review from jennmueng March 7, 2025 22:40
@kddubey kddubey merged commit 6b19a6b into master Mar 8, 2025
49 checks passed
@kddubey kddubey deleted the kddubey/seer/fetch-issues-more-parsing branch March 8, 2025 01:16
jan-auer added a commit that referenced this pull request Mar 10, 2025
* master: (57 commits)
  ref(getting-started): Change code to always update loader script when products changes (#86583)
  ref(spans): Detect performance issues directly in segments consumer (#86595)
  ref(getting-started): Update copies, replacing 'Sentry dashboard' with 'Sentry Issues' (#86672)
  ref(product-selection): Update code to not strip url (#86582)
  ref(quick-start): Replace 'record' with 'create_or_update' in 'record_new_project' (#86663)
  ref(assemble): Remove old `find_missing_chunks` method (#86588)
  fix(views):Exclude newly added views from last visited update as well (#86653)
  feat(workflow_engine): Only execute enabled Detectors (#86652)
  fix(autofix): Github links, remove seer branding, and UI cleanup (#86640)
  fix(seer-issues-patch) More parsing of functions for Python (#86558)
  ref(ui): Remove sentry.eot (#86649)
  feat(alerts): Restrict uptime/crons overview buttons for alerts:write (#86436)
  chore(deps): bump axios from 1.7.7 to 1.8.2 (#86642)
  deps(ui): Upgrade prettier (#86634)
  deps(ui): Upgrade eslint, biome (#86630)
  fix(shared-views): Fix default view passing to last visited endpoint (#86632)
  feat(billing): update copy for payg disabled CTA (#86143)
  ref(ui): Remove usage of withOrganization from organizationAuthList (#86554)
  fix(crons): Fix disabled state of disable button (#86637)
  feat(ui): Replace OrganizationAuth DeprecatedAsyncComponent (#86556)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2025
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.

2 participants