Repository navigation
Conversation
Gradle Unit and Integration Test Results555 tests +4 554 ✔️ +4 29s ⏱️ -10s Results for commit 636d316. ± Comparison against base commit 638e332. This pull request removes 13 and adds 17 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
57db0fc to
d82ef2f
Compare
# Conflicts: # src/main/kotlin/com/epam/brn/controller/UserDetailController.kt # src/main/kotlin/com/epam/brn/service/impl/UserAnalyticsServiceImpl.kt
|
|
|
Frontend test coverage: 45.59% 🤷♂️ Did not change |
…perseded endpoint path Variant A review outcome for PR #2687: - Keep the author's core: nightly UserAnalyticsJob + user_analytics table + aggregation SQL. - Repurpose the table as a daily snapshot history (snapshot_date, idempotent re-run); the live /admin/users endpoint stays realtime (N+1 already fixed on master by #2971). - Actualize to jakarta.* (Spring Boot 3.5) and the V2yearmonthday migration naming. - Drop the now-superseded serve-from-table path: UserAnalyticsServiceV1(+Impl), UsersWithAnalyticsView projection, UserDetailControllerConfig feature flag, the comparison IT, and the javax-era migration. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The per-test @AfterEach only cleared user_analytics and user_account, leaving the exercise_group/series/subgroup/exercise content behind. The second test then re-inserted the default series and hit a unique-name constraint on exercise_group. Use BaseIT.deleteInsertedTestData() to tear down the full content graph in the correct FK order. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Frontend test coverage: 72.72% (-0.02% compared to 72.74% on base) |
|
Direction for the user-analytics precompute: per-day delta + near-real-time freshness Two design points we'd like to adopt as this moves forward.
The current daily aggregation is cumulative — each row holds the all-time total as of that date (the query aggregates the whole study_history with no per-day filter). Proposal: scope each row to the activity of that day only Why this is better:
All-time values that the cumulative snapshot used to hold (lifetime first study, total time, etc.) move into a separate running per-user row (user_lifetime_analytics), upserted rather than re-scanned.
Instead of only filling analytics nightly, update today's delta row immediately when an exercise is completed:
The current daily aggregation is cumulative — each row holds the all-time total as of that date (the query aggregates the whole study_history with no per-day filter). Proposal: scope each row to the activity of that day only Why this is better:
All-time values that the cumulative snapshot used to hold (lifetime first study, total time, etc.) move into a separate running per-user row (user_lifetime_analytics), upserted rather than re-scanned.
Instead of only filling analytics nightly, update today's delta row immediately when an exercise is completed:
The nightly job then changes role from filler to reconciler: once a night it recomputes each day's delta from the raw history and overwrites it, self-healing any drift from missed or duplicated events. Net result: incremental Note this only works cleanly with the delta model — with a cumulative snapshot, an incremental update would mean recomputing all-time aggregates on every exercise. The delta model makes it a simple +1 / + seconds. Rollout order: delta migration for user_daily_analytics → event-driven incremental listener → user_lifetime_analytics for all-time columns → read views for week/month/year. |
|
Frontend test coverage: 72.74% (-0.03% compared to 72.77% on base) |
|



##2609
filling analytics table using job and view analytics using data from user_analytics table
feature flags: brn.user.analytics.use.new.version - turns off using new analytics functionality
brn.user.analytics.job.enabled - enables filling database table using job