Skip to content

fix: exclude milestone quests from community pulse stats#3808

Merged
AmarTrebinjac merged 1 commit intomainfrom
eng-1281-exclude-milestone-quests-from-community-pulse
Apr 19, 2026
Merged

fix: exclude milestone quests from community pulse stats#3808
AmarTrebinjac merged 1 commit intomainfrom
eng-1281-exclude-milestone-quests-from-community-pulse

Conversation

@AmarTrebinjac
Copy link
Copy Markdown
Contributor

Summary

  • Filter questCompletionStats query to exclude milestone-type quests (e.g. "Read 1000 articles") from all three community pulse metrics: total count, all-time leader, and weekly leader
  • Added qr.type IN ('daily', 'weekly') allowlist filter to getTopCompletedQuest (covers both leader queries) and the total count query in getQuestCompletionStats
  • No schema or frontend changes — purely a backend query filter

Test plan

  • Added integration test verifying milestone quests are excluded from totalCount, allTimeLeader, and weeklyLeader
  • Existing questCompletionStats test still passes with unchanged assertions
  • Build and lint pass

Closes ENG-1281


Created by Huginn 🐦‍⬛

Milestone quests (e.g. "Read 1000 articles") dominate community pulse
because virtually every active user completes them. Filter them out so
only daily and weekly quest activity is reflected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pulumi
Copy link
Copy Markdown

pulumi Bot commented Apr 19, 2026

🍹 The Update (preview) for dailydotdev/api/prod (at 058d3e4) was successful.

✨ Neo Explanation

Routine deployment of a new application version (`058d3e4e...beac59a0`) across all Kubernetes Deployments and CronJobs, with fresh database and ClickHouse migration jobs executing as part of the release. ✅ Low Risk

This is a standard application deployment rolling commit 9f8962cabeac59a0 across all workloads. Every deployment and CronJob is getting its container image and version label updated to the new image tag. The two migration Jobs (PostgreSQL via TypeORM and ClickHouse) are being replaced with new instances tied to the new commit hash — this is the expected pattern where each release runs fresh migration jobs named after the commit SHA.

🔵 Info — The new migration jobs (vpc-native-api-db-migration-beac59a0 and vpc-native-api-clickhouse-migration-beac59a0) will run against the databases on apply. The old migration jobs from the previous release are being deleted, which is normal cleanup. Verify the PR contains no destructive schema changes (DROP TABLE/COLUMN) if there's any concern about rollback safety.

The GCP credentials warning on the default_9_12_0 provider is unrelated to the Kubernetes changes and appears to be a pre-existing issue with ADC in the CI environment; no GCP resources are being modified.

Resource Changes

    Name                                                       Type                           Operation
~   vpc-native-clean-zombie-users-cron                         kubernetes:batch/v1:CronJob    update
-   vpc-native-api-db-migration-9f8962ca                       kubernetes:batch/v1:Job        delete
~   vpc-native-post-analytics-clickhouse-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-validate-active-users-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-expire-super-agent-trial-cron                   kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-9f8962ca               kubernetes:batch/v1:Job        delete
~   vpc-native-clean-channel-highlights-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-weekly-quests-cron                       kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-images-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tags-str-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-monthly-best-post-archives-cron     kubernetes:batch/v1:CronJob    update
~   vpc-native-update-views-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-user-companies-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment                  kubernetes:apps/v1:Deployment  update
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                             kubernetes:apps/v1:Deployment  update
+   vpc-native-api-clickhouse-migration-beac59a0               kubernetes:batch/v1:Job        create
~   vpc-native-user-profile-updated-sync-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-yearly-best-post-archives-cron      kubernetes:batch/v1:CronJob    update
+   vpc-native-api-db-migration-beac59a0                       kubernetes:batch/v1:Job        create
~   vpc-native-clean-expired-better-auth-sessions-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-ws-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-post-analytics-history-day-clickhouse-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-clickhouse-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-public-threshold-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-deployment                                      kubernetes:apps/v1:Deployment  update
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-private-deployment                              kubernetes:apps/v1:Deployment  update
~   vpc-native-channel-highlights-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-calculate-top-readers-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-generic-referral-reminder-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-opportunities-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-bg-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-user-posts-analytics-refresh-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-cron                        kubernetes:batch/v1:CronJob    update
... and 11 other changes

@AmarTrebinjac AmarTrebinjac merged commit f3ca0e4 into main Apr 19, 2026
10 checks passed
@AmarTrebinjac AmarTrebinjac deleted the eng-1281-exclude-milestone-quests-from-community-pulse branch April 19, 2026 19:56
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