feat: publish post trending events#3880
Conversation
76eb84c to
0a8a2c6
Compare
|
🍹 The Update (preview) for dailydotdev/api/prod (at 0a8a2c6) was successful. ✨ Neo ExplanationThis deployment ships a new post-trending CDC event, removes the Flyting/live-room feature (ingress, subscriptions, secrets), and consolidates Apple auth from a K8s secret volume to a config-only entry — with the main risk being potential message loss in the deleted PubSub subscriptions, particularly `user-deletion-cleanup`. 🟡 Moderate RiskThis deployment bundles several distinct changes: the PR's new What's driving the broad changes: The code diff only shows the trending event addition, but the infrastructure reflects a larger cleanup effort happening in the same commit:
🟡 Warning — PubSub subscription deletions with potential message loss: The 🟡 Warning — Ingress backend swap: The subs ingress is consolidating from two path rules ( 🔵 Info — New Resource Changes Name Type Operation
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
+ api-sub-api.agentic-digest-tweet gcp:pubsub/subscription:Subscription create
~ vpc-native-channel-highlights-cron kubernetes:batch/v1:CronJob update
~ vpc-native-worker-job-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
- api-sub-api.live-room-starting-soon-notification gcp:pubsub/subscription:Subscription delete
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-expired-better-auth-sessions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-squad-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
- api-sub-api.live-room-started gcp:pubsub/subscription:Subscription delete
~ vpc-native-update-achievement-rarity-cron kubernetes:batch/v1:CronJob update
- api-sub-api.live-room-ended gcp:pubsub/subscription:Subscription delete
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-db-migration-0b3b0a7d kubernetes:batch/v1:Job delete
+- vpc-native-k8s-secret kubernetes:core/v1:Secret create-replacement
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-channel-digests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-materialize-monthly-best-post-archives-cron kubernetes:batch/v1:CronJob update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-history-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-expire-super-agent-trial-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-clickhouse-migration-0b3b0a7d kubernetes:batch/v1:Job delete
- api-sub-api.user-deletion-cleanup gcp:pubsub/subscription:Subscription delete
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
- api-sub-api.new-highlight-real-time gcp:pubsub/subscription:Subscription delete
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-clickhouse-migration-d612e808 kubernetes:batch/v1:Job create
... and 21 other changes |
Summary
api.v1.post-trendingPub/Sub eventpost.trendingchanges from nullish to a positive numbertrendingAtas an ISO timestamp derived from the row after-imagelastTrendingvalueImpact
Consumers can subscribe to a dedicated trending-post signal instead of inferring trendiness from visibility or generic content updates. The event now carries when the post became trending, matching the
lastTrendingtimestamp written by the trendiness recalculation job.Validation
pnpm exec prettier --write src/common/typedPubsub.ts src/workers/cdc/primary.ts __tests__/workers/cdc/primary.tspnpm exec tsc --noEmitpnpm exec jest __tests__/workers/cdc/primary.ts --runInBand, blocked locally by Postgres auth:password authentication failed for user "postgres"