Skip to content

Fix a few errors reported on sentry#6228

Open
padenot wants to merge 8 commits into
mozilla:masterfrom
padenot:clean-sentry
Open

Fix a few errors reported on sentry#6228
padenot wants to merge 8 commits into
mozilla:masterfrom
padenot:clean-sentry

Conversation

@padenot

@padenot padenot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This patch series is composed of independent commits, only related by the fact that each of those fixes one or more issues surfaced by sentry. They should be reviewed independently.

The goal is to fix some sentry errors, and prequalify some of them (usually not actionable, e.g. a transient failure of another service) to something that doesn't create a sentry entry.

@padenot padenot requested a review from suhaibmujahid June 23, 2026 14:23
@marco-c

marco-c commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What about keeping transient errors in Sentry, but ignoring them there? So if we see a huge uptick we could investigate

@padenot

padenot commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

Update w/ the 50 -> 100 turn change dropped, and marco's comment addressed

marco-c
marco-c previously approved these changes Jun 24, 2026

@marco-c marco-c left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, but there's still a linting error

padenot added 8 commits June 24, 2026 15:05
…_points()

search() was removed in qdrant-client 1.16.0. The dev deployment was
built from a standalone branch that pinned bugbug at git rev f8b31eb,
which had a loose qdrant-client>=1.15.1,<1.19.0 constraint. That let
the image resolve to 1.16+, causing REVIEWHELPER-API-25.

Fixes REVIEWHELPER-API-25
4xx responses from Searchfox (file not found, bad request) are handled
gracefully and returned as tool errors; they don't warrant Sentry events.
Unexpected exceptions (network failures, etc.) remain at error level.

Fixes REVIEWHELPER-API-21
Introduce BugNotFoundError and RevisionNotFoundError as distinct types
and add them to sentry_sdk ignore_errors. Requests for private security
bugs or restricted Phabricator revisions are expected operational
behaviour, not errors worth alerting on.

Improve the error message for bug lookups to mention the confidential
security bug case.

Fixes BUGBUG-MCP-2M
Fixes BUGBUG-MCP-2K
Fixes BUGBUG-MCP-2Q
Fixes BUGBUG-MCP-2P
Catch requests.HTTPError from the Bugzilla API in SanitizedBug.get()
and raise BugzillaAPIError instead. Add it to ignore_errors so transient
Bugzilla outages (502 Bad Gateway etc.) don't generate Sentry alerts.

Don't log Bugzilla 5xx errors to Sentry

Split BugzillaAPIError into BugzillaAPIError (4xx, remains visible) and
BugzillaTransientError (5xx, suppressed). 502/503 Bugzilla outages are
expected and don't need Sentry alerts; 4xx errors may indicate bugs in
our code and should stay visible.
A BMO outage can return a 200 with a non-standard body that lacks the
expected 'bugs' key, causing a KeyError in libmozdata's callback. Catch
it and raise BugzillaTransientError so it is suppressed in Sentry.

Fixes BUGBUG-MCP-2S
Fixes BUGBUG-MCP-2T
Two concurrent requests for the same (revision_id, diff_id) could both
pass the SELECT check and both attempt INSERT, hitting the unique
constraint. Catch IntegrityError, rollback, and re-fetch the row
inserted by the winning request.

Fixes REVIEWHELPER-API-J
Introduce InvalidDocPathError as a ToolError subclass for the
read_fx_doc_section tool and add it to ignore_errors. Models frequently
pass .html paths or non-existent paths; these are expected and don't
need Sentry alerts.

Fixes BUGBUG-MCP-2Y
Fixes BUGBUG-MCP-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants