Skip to content

Release: fix stale search results after publishing - #194

Merged
saqibmanan merged 5 commits into
mainfrom
dev
Sep 16, 2026
Merged

saqibmanan merged 5 commits into
mainfrom
dev

Conversation

@saqibmanan

Copy link
Copy Markdown
Contributor

Takes #192 to prod (fixed in #193).

What ships (7 files vs main): search cache invalidation now runs after a refreshed Elasticsearch write, and its version key never expires. Applies to datasets, use cases and collaboratives, plus tests/test_search_cache_invalidation.py.

Why it matters for prod: a stale search total failed the prod read-only sitemap check on frontend deploy 35085603469 and rolled it back.

Verified:

  • Dev deploy 35091627464 fully green, including report-only provider.
  • Merge into main is clean; the merged tree passes 197 Django tests (190 + 7 new).
  • dataset_data stays reverted on main — unchanged by this release.

Merge with Create a merge commit, not rebase.

It was set with the cache's default 300s timeout, so it fell back to 0 while
results stayed cached for 3600s, making results cached under an earlier
version 0 reachable again. One helper now owns the key and the bump.
The bump ran before the Elasticsearch write, so a search in that gap cached
the old total under the new version for an hour. Sitemap and search then
disagreed and the prod read-only check rolled back a deploy.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@saqibmanan
saqibmanan merged commit fff26b2 into main Sep 16, 2026
30 of 31 checks passed
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.

2 participants