Skip to content

fix(server): log GitHub release-check failures at warning, not error#3019

Merged
vpetersson merged 4 commits into
masterfrom
fix/github-fetch-log-level
Jun 7, 2026
Merged

fix(server): log GitHub release-check failures at warning, not error#3019
vpetersson merged 4 commits into
masterfrom
fix/github-fetch-log-level

Conversation

@vpetersson

Copy link
Copy Markdown
Contributor

Issues Fixed

Sentry: ANTHIAS-8 (ConnectionError fetching latest release from GitHub: no data on /splash-page/).

Description

A signage device that can't reach api.github.com — offline installs, locked-down networks, GitHub outages, rate limits — is a routine condition, and the update check already degrades through it gracefully (5-minute error backoff, cached last verdict in is_up_to_date()). But the failure paths logged at ERROR, which the Sentry logging integration turns into an event, so every offline device reported on each splash-page render.

  • Downgrade every failure path in lib/github.py (transport errors, malformed/missing/unparseable tag_name) to WARNING
  • Add a regression test pinning the module as ERROR-free, plus a behavioural test on handle_github_error

Checklist

  • I have performed a self-review of my own code.
  • New and existing unit tests pass locally and on CI with my changes.
  • I have done an end-to-end test for Raspberry Pi devices.
  • I have tested my changes for x86 devices.
  • I added a documentation for the changes I have made (when necessary).

🤖 Generated with Claude Code

- A device that can't reach api.github.com (offline installs,
  locked-down networks, GitHub outages, rate limits) is a routine
  condition the update check already degrades through gracefully:
  5-minute backoff plus the cached last verdict
- ERROR-level logs land in Sentry, so every offline device produced
  events on each splash-page render (Sentry ANTHIAS-8)
- Downgrade every failure path in lib/github.py to warning and pin
  the module as ERROR-free with a regression test

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vpetersson vpetersson requested a review from a team as a code owner June 7, 2026 11:18
@vpetersson vpetersson self-assigned this Jun 7, 2026
@vpetersson vpetersson requested a review from Copilot June 7, 2026 11:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces Sentry noise from routine GitHub connectivity/update-check failures by downgrading anthias_server.lib.github logging from ERROR to WARNING, and adds regression tests to prevent error-level logging from being reintroduced.

Changes:

  • Downgraded GitHub update-check failure logs in src/anthias_server/lib/github.py from logging.error(...) to logging.warning(...).
  • Added a unit test verifying handle_github_error() logs at WARNING (not ERROR).
  • Added a “no error-level logging” regression test for the github module.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/anthias_server/lib/github.py Downgrades GitHub update-check failure logging from ERROR to WARNING across multiple failure paths.
tests/test_github.py Adds regression tests to ensure GitHub failures don’t log at ERROR level (to avoid Sentry events).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_github.py Outdated
…ging

- Replace the brittle substring check with an AST walk over actual
  logging.* calls, so comments can't false-positive and ERROR-level
  calls can't slip through renamed (Copilot)
- Patch logging by dotted path for strict mypy

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread tests/test_github.py
Comment thread tests/test_github.py Outdated
…docstring

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread tests/test_github.py
…ST guard

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Jun 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@vpetersson vpetersson merged commit 9ff20a8 into master Jun 7, 2026
10 checks passed
vpetersson added a commit that referenced this pull request Jun 9, 2026
- CalVer (YYYY.0M.MICRO); still June 2026, micro 2 -> 3
- Gives Sentry a real release boundary: every build since 2026.6.2
  reported the same base version (only the +git-hash differed), so
  resolved-in-next-release never stuck and fixed issues kept
  reopening on the next event. A version bump lets the deployed
  fixes actually clear from the board.
- Ships the crash/noise fixes merged since 2026.6.2: SQLite WAL +
  busy timeout (#3015), celery migration-gate (#3016) and
  asset-probe soft limits (#3017), transient-redis/CancelledError
  Sentry filtering + redis healthcheck (#3018/#3028), GitHub
  update-check log level (#3019), webview respawn on D-Bus death at
  setup and mid-play (#3020/#3031), resilient static-file scan
  (#3026), Wayland-socket wait (#3030), and Sentry release/board
  triage tags (#3021/#3025)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vpetersson added a commit that referenced this pull request Jun 9, 2026
…ings (#3023)

- A bare 'no data' hid the host/timeout info str(exc) carries —
  Sentry ANTHIAS-8 read 'ConnectionError fetching latest release
  from GitHub: no data', which said nothing actionable
- Ported from #3014 (the rest of that PR shipped via #3019)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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