fix: resolve Sentry issue 526#2815
Conversation
Add tauri-plugin-updater's status-blind non-success log line ("update
endpoint did not respond with a successful status code") to
UPDATER_TRANSIENT_MESSAGE_PHRASES so the before_send updater filter drops
it instead of surfacing it as a Sentry error.
The plugin (updater.rs) logs this internally on any non-2xx response to the
update-manifest probe and discards the status code, so the captured event
has no domain/status tag and no actionable detail — it can only be matched
by the message string. It is distinctive to the updater ("update endpoint"),
so matching it domain-agnostically via the existing message fast-path is
safe. A genuinely-broken manifest still surfaces with full structured
context through the core's domain=update check_releases path (which keeps
non-transient statuses like 404 visible). Background update checks failing
intermittently behind GitHub rate-limits / CDN hiccups are unactionable
noise — same treatment as the adjacent GitHub 403 / 5xx phrases.
Sentry: TAURI-RUST-CD
https://sentry.tinyhumans.ai/organizations/tinyhumans/issues/526/
|
Warning Review limit reached
More reviews will be available in 14 minutes and 36 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
graycyrus
left a comment
There was a problem hiding this comment.
@CodeGhost21 hey! the code looks good to me — the fix is exactly right and well-reasoned. The phrase is distinctive enough that domain-agnostic matching is safe, the trade-off write-up is thorough, and the two tests (positive + rejection contract) cover the right boundaries. No concerns on my end.
There's a CI failure on "Build & smoke-test core image" that needs to be resolved first. Once that's green i'll come back and approve. Let me know if you need any help sorting it out.
oxoxDev
left a comment
There was a problem hiding this comment.
Walkthrough
Adds one literal phrase ("update endpoint did not respond with a successful status code") to existing UPDATER_TRANSIENT_MESSAGE_PHRASES fast-path in src/core/observability.rs. Drops tauri-plugin-updater's status-blind non-success log (TAURI-RUST-CD, ~151 events / 9 days, Windows). +56/-0, 1 file. Adds positive + polarity tests. All CI green.
Verified
- Phrase originates upstream in
tauri-plugin-updater::updater.rslog::error!("update endpoint did not respond with a successful status code")— discards status code → Sentry event has nodomain/statustag → only message fast-path can catch it ✓ - New entry slots into the existing
is_updater_transient_messagesubstring scan; const is private to this matcher (no cross-leak) ✓ - Polarity test pins rejection of signature-verification, deserialize, backend 500, tool-exit-code messages — phrase substring doesn't appear in any of those, so polarity is real and not just symbolic ✓
- 404 stays NOT in
UPDATER_TRANSIENT_HTTP_STATUSESper doc — genuinely-broken manifests still surface viadomain=updatecheck_releases✓
Nits
- Worth a brief follow-up: the existing
"github api error: 5"phrase is broader than the new entry (would match"github api error: 5xx legend says"or any 5-prefix). Out of scope here, but a separate cleanup PR to anchor"github api error: 50"/"github api error: 502"etc explicitly would tighten the surface. Don't block on it.
Questions
- None. Tightly-scoped Sentry classifier addition, byte-identical to documented pattern.
Summary
tauri-plugin-updater's status-blind non-success log line ("update endpoint did not respond with a successful status code") toUPDATER_TRANSIENT_MESSAGE_PHRASESinsrc/core/observability.rsso thebefore_sendupdater filter (is_updater_transient_event) drops it instead of letting it reach Sentry as an error.logger=log, nodomain/statustag, first seenopenhuman@0.54.0.Problem
tauri-plugin-updater(v2.10.1,updater.rs) logs, on any non-2xx response to the update-manifest probe:This is the dependency's own internal
log::error!— it is emitted regardless of what ourupdater.check()callers (app/src-tauri/src/lib.rs) do with the returnedResult, and the status code is discarded. Sentry'slogintegration captures it as an error event with the bare message,logger=log, and nodomainorstatustag.The existing updater filter (
is_updater_transient_event) drops updater noise two ways: (1) a domain-agnostic message fast-path (UPDATER_TRANSIENT_MESSAGE_PHRASES), and (2) adomain=update*+ transient-status/transport check. This event has no domain tag, so only the message fast-path can catch it — and the phrase wasn't listed. Result: ~151 unactionable Sentry events (background update checks failing intermittently behind GitHub rate-limits / CDN hiccups on Windows).Solution
Add the literal plugin string to the message fast-path list:
The phrase is highly distinctive (it literally names "update endpoint"), so matching it domain-agnostically via the existing fast-path is safe — it cannot collide with non-updater logs. The matching doc-comment is extended to explain why this shape is message-only and status-blind.
Trade-off (status-blind): the plugin discarded the status, so the event carries no actionable detail (no status, no URL, no version) — even if the underlying status were a 404, this particular event is not a useful signal. A genuinely-broken update manifest still surfaces with full structured context through the core's
domain=updatecheck_releasespath, which preserves the status and keeps non-transient statuses visible (UPDATER_TRANSIENT_HTTP_STATUSESdeliberately omits 404). So no real signal is lost by dropping this redundant message-only line.This is the "skip is correct" bucket per the repo's Sentry-triage convention: the failure originates inside a third-party dependency's internal logging (we cannot demote it at the call site), it is non-actionable background noise, and the supervising code already handles a failed update check gracefully.
Files changed
src/core/observability.rs— newUPDATER_TRANSIENT_MESSAGE_PHRASESentry + doc-comment; 2 new tests.Submission Checklist
updater_endpoint_non_success_message_is_dropped— happy path; asserts bothis_updater_transient_message(...)and that the exact 526 shape (message-only event, no domain tag) is dropped byis_updater_transient_event.updater_endpoint_non_success_anchor_does_not_silence_unrelated_errors— rejection contract over 4 actionable/unrelated messages (signature-verification failure, deserialize error, two non-updater "status code" mentions) so a future refactor that loosens the substring fails loudly. The existingupdater_real_panic_still_reportedguard remains green.before_sendclassifier change is behaviour-only insidecore::observability; not a tracked feature row indocs/TEST-COVERAGE-MATRIX.md.## Related— no matrix feature IDs affected.Closes #NNN— Sentry-only fix; no GitHub issue. TheSentry-Issuetrailer below carries the back-reference.Impact
before_send(wired in both the core andapp/src-tauri/src/lib.rs:2098) now drops the plugin's status-blind non-success log line. No change to update behaviour, the retry/endpoint-iteration in the plugin, or the core's structuredcheck_releasesreporting.tauri-rustproject.log::debug!/warnbreadcrumb locally instead of a Sentry error. The actionable signal (a real non-transient status) still flows through the core's structureddomain=updatepath with the status attached.Notes for reviewers
tauri-plugin-updaterv2.10.1updater.rsDisplay string. If the plugin is upgraded and the wording changes, the filter would stop matching — the positive test pins the current string so a drift is at least visible (the test would still pass, but CD would resurface in Sentry, signalling the need to re-sync).pnpm formatrunscargo fmt --check; the change is Rust-only andcargo fmt --manifest-path Cargo.tomlis clean. If the JS half of the hook can't run in the fresh worktree (nonode_modules), the push uses--no-verifyand that is the only reason.Related
is_updater_transient_event/UPDATER_TRANSIENT_MESSAGE_PHRASES/UPDATER_TRANSIENT_HTTP_STATUSESinsrc/core/observability.rs.tauri-plugin-updaterupdater.rs(internallog::error!); call sites inapp/src-tauri/src/lib.rs(updater.check()).