Skip to content

fix: normalize tag keyword queries#3900

Merged
rebelchris merged 1 commit into
mainfrom
eng-1497-normalize-tag-input-to-lowercase-in-tagfeed-and-related
May 22, 2026
Merged

fix: normalize tag keyword queries#3900
rebelchris merged 1 commit into
mainfrom
eng-1497-normalize-tag-input-to-lowercase-in-tagfeed-and-related

Conversation

@rebelchris
Copy link
Copy Markdown
Contributor

Summary

  • Normalize tag and keyword inputs in the shared feed SQL helpers before comparing against post_keyword.keyword.
  • Add focused integration coverage for tagFeed, keywordFeed, mostUpvotedFeed tag filtering, and deprecated postsByTag casing variants.

Key Decisions

  • Normalize in whereTags and whereKeyword so current and future callers inherit the behavior without resolver-level duplication.
  • Keep helper signatures and cache key behavior unchanged; casing variants can cache separately while resolving to the same dataset.

Verification

  • NODE_ENV=test pnpm exec jest __tests__/feeds.ts __tests__/compatibility.ts --testEnvironment=node --runInBand -t 'query tagFeed|query keywordFeed|query mostUpvotedFeed|query postsByTag'
  • pnpm exec eslint src/common/feedGenerator.ts __tests__/feeds.ts __tests__/compatibility.ts --max-warnings 0
  • pnpm exec tsc --noEmit --pretty false
  • git diff --check origin/main...HEAD

Closes ENG-1497


Created by Huginn 🐦‍⬛

@pulumi
Copy link
Copy Markdown

pulumi Bot commented May 22, 2026

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

✨ Neo Explanation

Standard application deployment with a case-insensitive tag/keyword feed fix; includes routine DB and Clickhouse migration jobs for the new commit. ✅ Low Risk

This is a routine code deployment rolling out commit d106c1c (from d07fa517). The application change makes tag and keyword feed queries case-insensitive by lowercasing inputs before matching against the PostKeyword table, with new tests validating the behavior. All deployments and cron jobs are simply picking up the new container image. The migration Jobs follow the standard pattern of creating new Jobs for the new commit hash and deleting the old ones.

Resource Changes

    Name                                                   Type                           Operation
~   vpc-native-validate-active-users-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-check-analytics-report-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-yearly-best-post-archives-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-highlights-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-update-views-cron                           kubernetes:batch/v1:CronJob    update
-   vpc-native-api-db-migration-d07fa517                   kubernetes:batch/v1:Job        delete
~   vpc-native-user-profile-updated-sync-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tag-materialized-views-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                           kubernetes:batch/v1:CronJob    update
~   vpc-native-bg-deployment                               kubernetes:apps/v1:Deployment  update
~   vpc-native-calculate-top-readers-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-hourly-notification-cron                    kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-d07fa517           kubernetes:batch/v1:Job        delete
~   vpc-native-clean-channel-highlights-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment              kubernetes:apps/v1:Deployment  update
~   vpc-native-rotate-daily-quests-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-stale-user-transactions-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-ws-deployment                               kubernetes:apps/v1:Deployment  update
~   vpc-native-update-source-public-threshold-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-images-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-digests-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-clickhouse-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-user-posts-analytics-refresh-cron           kubernetes:batch/v1:CronJob    update
~   vpc-native-expire-super-agent-trial-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                         kubernetes:apps/v1:Deployment  update
~   vpc-native-generic-referral-reminder-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-user-companies-cron            kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron              kubernetes:batch/v1:CronJob    update
+   vpc-native-api-clickhouse-migration-412c842d           kubernetes:batch/v1:Job        create
+   vpc-native-api-db-migration-412c842d                   kubernetes:batch/v1:Job        create
~   vpc-native-worker-job-deployment                       kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-zombie-opportunities-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-history-day-clickhouse-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tags-str-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-achievement-rarity-cron              kubernetes:batch/v1:CronJob    update
... and 12 other changes

@rebelchris rebelchris merged commit 4dbf4a3 into main May 22, 2026
9 checks passed
@rebelchris rebelchris deleted the eng-1497-normalize-tag-input-to-lowercase-in-tagfeed-and-related branch May 22, 2026 08:10
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