Skip to content

fix(archive): filter out deleted posts from archive items#3863

Merged
idoshamun merged 1 commit into
mainfrom
eng-1421-fix-500-on-best-of-archive-pages-filter-out-deleted-posts-in
May 10, 2026
Merged

fix(archive): filter out deleted posts from archive items#3863
idoshamun merged 1 commit into
mainfrom
eng-1421-fix-500-on-best-of-archive-pages-filter-out-deleted-posts-in

Conversation

@idoshamun
Copy link
Copy Markdown
Member

Summary

  • Add EXISTS check on Archive.items GraphORM relation to exclude ArchiveItem rows whose referenced post is deleted or missing
  • Add deleted = false condition on ArchiveItem.post relation as a secondary guard
  • Add integration test verifying deleted posts are excluded from archive query results

Archive pages returned 500 when ArchiveItem rows referenced deleted posts — the frontend crashed on item.post.id because post was null. The fix filters at the query level so deleted-post items never reach the client.

Closes ENG-1421


Created by Huginn 🐦‍⬛

Archive pages returned 500 when ArchiveItem rows referenced deleted
posts. Add EXISTS check on Archive.items relation and deleted=false
on ArchiveItem.post relation to exclude deleted posts from the
GraphQL response. Add integration test for the scenario.

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

pulumi Bot commented May 10, 2026

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

✨ Neo Explanation

Routine deployment of a bug fix that suppresses soft-deleted posts from archive GraphQL responses; all changes are image tag updates and migration job rotations. ✅ Low Risk

This is a routine application deployment rolling out a new image (1651b96248bba348) that contains a GraphORM fix: archive queries now filter out items whose associated post has been soft-deleted (deleted = false). The DB and Clickhouse migration jobs are recycled per-commit as expected (old jobs deleted, new ones created for the new SHA). No schema changes are evident from the diff — the migration jobs are a standard part of every deploy.

Resource Changes

    Name                                                       Type                           Operation
~   vpc-native-clean-zombie-users-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-expired-better-auth-sessions-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-expire-super-agent-trial-cron                   kubernetes:batch/v1:CronJob    update
+   vpc-native-api-db-migration-48bba348                       kubernetes:batch/v1:Job        create
~   vpc-native-update-tags-str-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-validate-active-users-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-generate-search-invites-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-worker-job-deployment                           kubernetes:apps/v1:Deployment  update
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-achievement-rarity-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-channel-highlights-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-weekly-quests-cron                       kubernetes:batch/v1:CronJob    update
~   vpc-native-deployment                                      kubernetes:apps/v1:Deployment  update
~   vpc-native-user-profile-updated-sync-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                             kubernetes:apps/v1:Deployment  update
+   vpc-native-api-clickhouse-migration-48bba348               kubernetes:batch/v1:Job        create
~   vpc-native-clean-zombie-user-companies-cron                kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-1651b962               kubernetes:batch/v1:Job        delete
~   vpc-native-update-tag-materialized-views-cron              kubernetes:batch/v1:CronJob    update
-   vpc-native-api-db-migration-1651b962                       kubernetes:batch/v1:Job        delete
~   vpc-native-calculate-top-readers-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-opportunities-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-generic-referral-reminder-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-public-threshold-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-private-deployment                              kubernetes:apps/v1:Deployment  update
~   vpc-native-post-analytics-history-day-clickhouse-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-stale-user-transactions-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-yearly-best-post-archives-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                          kubernetes:batch/v1:CronJob    update
~   vpc-native-bg-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-user-posts-analytics-refresh-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-highlights-cron                         kubernetes:batch/v1:CronJob    update
... and 11 other changes

@idoshamun idoshamun merged commit a3bfb11 into main May 10, 2026
10 checks passed
@idoshamun idoshamun deleted the eng-1421-fix-500-on-best-of-archive-pages-filter-out-deleted-posts-in branch May 10, 2026 17:01
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