Skip to content

Update 3.0.4#3

Merged
Sjeff merged 8 commits intomasterfrom
update-3.0.4
Apr 6, 2026
Merged

Update 3.0.4#3
Sjeff merged 8 commits intomasterfrom
update-3.0.4

Conversation

@Sjeff
Copy link
Copy Markdown
Owner

@Sjeff Sjeff commented Apr 6, 2026

in het chore/fix: datetime timezone migration + CI fix (v3.0.4)

What changed

Bug fix

  • Fixed automation cycle crash when the Steam API returns no review data
    for a game — review fields (review_score, total_positive, etc.)
    now fall back to 0 instead of None

Datetime migration (Python 3.12+)

  • Replaced all 52 uses of deprecated datetime.utcnow() with
    datetime.now(timezone.utc) across 21 source files and 19 test files
  • Added TZDateTime TypeDecorator — SQLite strips timezone info on read,
    this decorator re-attaches utc via process_result_value
  • Updated all SQLAlchemy model columns to use TZDateTime

CI

  • Tests were running 4x per PR (push + pull_request triggers).
    Push trigger now limited to master only.

Test plan

  • Backend tests pass (pytest)
  • Frontend lint + build pass
  • After merge: Docker image builds via docker-publish.yml ### Bug fixes
  • Fixed automation cycle crash when the Steam API returns no review data

Sjeff and others added 8 commits April 6, 2026 19:34
…data

  - game_service: don't overwrite NOT NULL review fields with None when Steam
    API returns no data; preserve existing values on update, default to 0 on create
  - automation: session.rollback() after each failed step so a crash in scan
    doesn't corrupt the session and block entry processing
  - automation: log step failures to notification_service so errors are visible
    in the dashboard activity feed, not only in server logs
…e.utc)

Migrated 52 call sites across 21 files to use the timezone-aware
datetime.now(timezone.utc) as required by Python 3.12+. SQLAlchemy
callable defaults updated to lambda: datetime.now(timezone.utc).
Also updated README changelog for v3.0.4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ation

Replaced datetime.utcnow() with datetime.now(timezone.utc) in all test
files. Fixed test_core_events mock to patch datetime.now instead of
datetime.utcnow, and updated the expected isoformat timestamp to include
+00:00 offset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…match

All mapped DateTime columns now use timezone=True so SQLAlchemy returns
timezone-aware datetimes, compatible with datetime.now(timezone.utc).
No migration needed — SQLite DDL is unchanged (DATETIME).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… read

SQLite stores datetimes as naive strings and strips timezone info on
read. DateTime(timezone=True) alone does not fix this. TZDateTime wraps
DateTime and calls .replace(tzinfo=timezone.utc) in process_result_value
so all model fields return timezone-aware datetimes, making them
compatible with datetime.now(timezone.utc) comparisons.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_time

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously on: [push, pull_request] caused 4 runs per PR (2 jobs x 2
triggers). Now push only fires on master; PRs use pull_request only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Sjeff Sjeff merged commit f80f490 into master Apr 6, 2026
2 checks passed
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.

1 participant