Repository navigation
fix: stop serving stale cached org pages for blocked organizations IN-1399 - #2322
Conversation
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
PR SummaryMedium Risk Overview The public API Organization schema now documents that Reviewed by Cursor Bugbot for commit a2386dc. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The PR title includes IN-1399, contrary to the repository rule prohibiting JIRA tickets in PR titles.
Review effort: Balanced
Findings: None
What changed in this PR
Documents that organizations without public pages use an empty slug and verifies pass-through behavior.
Changes:
- Clarifies the
Organization.slugAPI contract. - Tests empty-slug responses.
| File | Description |
|---|---|
api/src/lib/organizations.ts |
Documents empty organization slugs. |
api/tests/contributors-organization-leaderboard.test.ts |
Verifies empty slugs remain unchanged. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>

Summary
/organization/**and/api/organization-page/**now setswr: false, so an expired entry recomputes inline and the 404 reaches the visitor. Entries written before this deploy are invalidated because the cache options change the entry hash, so no manual purge is expected.slugis''for organizations without a public page (blocked organizations stay listed on leaderboards without a link), with a test.Why
After the Tinybird pipes started returning no rows for blocked organizations, production kept serving 200 for
/organization/garden-linuxand/api/organization-page/garden-linux. Nitro's stale-while-revalidate keeps the stale entry when the refresh throws, and those Redis entries had no TTL.Deploy order
lfx_insightsfrom its branch; that PR is still open.Runtime impact
maxAge.Test plan
frontend/setup/caching.test.tscovers the production and development rulesapi/tests/contributors-organization-leaderboard.test.tscovers the empty slug/organization/garden-linuxand/api/organization-page/garden-linux/kpisreturn 404, a live organization such assap-sestill returns 200, and the logs show no[cache]errorsCommit format
Signed off and GPG signed;
type: description IN-1399.Checklist
JIRA: https://linuxfoundation.atlassian.net/browse/IN-1399