Skip to content

feat: add archive sitemaps for best-of pages#3784

Merged
idoshamun merged 3 commits intomainfrom
feat/archive-sitemaps
Apr 12, 2026
Merged

feat: add archive sitemaps for best-of pages#3784
idoshamun merged 3 commits intomainfrom
feat/archive-sitemaps

Conversation

@idoshamun
Copy link
Copy Markdown
Member

Summary

  • Add /sitemaps/archive-index.xml endpoint listing all tag/source best-of index pages (/tags/{tag}/best-of, /sources/{source}/best-of) for every tag/source that has at least one archive
  • Add /sitemaps/archive-pages.xml endpoint listing individual archive pages (/tags/{tag}/best-of/{year}/{month}, /tags/{tag}/best-of/{year}, and equivalent source URLs)
  • Both sitemaps are included in /sitemaps/index.xml
  • Source archives resolve scopeId to the source handle via join; archives for deleted/missing sources are excluded
  • Global scope archives are excluded (only tag and source scopes)

Test plan

  • Existing 19 sitemap tests still pass
  • New test: archive-index.xml returns deduplicated index entries for tags and sources
  • New test: archive-index.xml excludes source archives when the source no longer exists
  • New test: archive-pages.xml returns correct URLs with zero-padded months and 4-digit years
  • New test: archive-pages.xml excludes global-scope archives
  • New test: index.xml includes archive-index.xml and archive-pages.xml entries

Add two new sitemap endpoints for archive best-of pages:
- /sitemaps/archive-index.xml: index pages per tag/source (/tags/{tag}/best-of, /sources/{source}/best-of)
- /sitemaps/archive-pages.xml: individual archive pages with year/month URLs

Both are registered in the sitemap index. Source archives resolve the
source handle via join; global archives are excluded. Months are
zero-padded.
@pulumi
Copy link
Copy Markdown

pulumi Bot commented Apr 12, 2026

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

✨ Neo Explanation

Routine deployment promoting commit `6b34d199` to production — all workloads (deployments and cron jobs) get the new image, and fresh DB + Clickhouse migration Jobs are queued to run. ✅ Low Risk

This is a standard application deployment rolling out a new image version (bfa6c4004df26e56) across all services. Every change is purely a container image tag and version label update — no configuration, resource limits, environment variables, or structural changes are involved.

The migration Jobs follow the expected pattern: old migration Jobs from the previous release are deleted and new ones are created for the incoming commit. Both a Postgres (api-db-migration) and Clickhouse (api-clickhouse-migration) migration will run against the new image. The migrations execute with restartPolicy: Never, so failures will surface clearly rather than looping.

🔵 Info — The GCP provider warning about missing ADC credentials is cosmetic for this update; it only affects GCP resource operations, not the Kubernetes changes being applied here.

Resource Changes

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

The sitemap spec allows up to 50k URLs per file. No need to split
into smaller pages.
Replace the single archive-pages.xml with paginated sub-sitemaps split
by scope type (tag/source) and period type (month/year), each containing
at most 10,000 URLs. The sitemap index now dynamically lists all
archive page sitemaps based on actual archive counts.

Route: /archive-pages-:scopeType-:periodType-:page.xml (0-indexed)
@idoshamun idoshamun merged commit 797e419 into main Apr 12, 2026
10 checks passed
@idoshamun idoshamun deleted the feat/archive-sitemaps branch April 12, 2026 10:26
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