Skip to content

Move web.ctx check outside of cached function #10318#10353

Merged
mekarpeles merged 2 commits intomasterfrom
10318/hotfix/homepage-memcache-stats
Jan 17, 2025
Merged

Move web.ctx check outside of cached function #10318#10353
mekarpeles merged 2 commits intomasterfrom
10318/hotfix/homepage-memcache-stats

Conversation

@mekarpeles
Copy link
Copy Markdown
Member

Moves ("dev" in web.ctx.features) check to a devmode function param so web.ctx is no longer needed within our cached function.

While the initial computer of the get_homepage() function works fine (because web.ctx is in scope) the web.ctx ThreadedDict may no longer be accessible once passed to a memcache thread for it's subsequent re-compute after timeout hit)

Closes #10318

Resolves https://sentry.archive.org/organizations/ia-ux/issues/541018/?query=is%3Aunresolved+threadeddict&referrer=issue-stream&statsPeriod=14d

Addresses instance of #10341

Technical

See investigation here: #10318 (comment)

Testing

hotfix patch deploy should show a drop in errors on sentry and hopefully stats showing up again on prod.

Stakeholders

@schu96 @cdrini @RayBB @jimchamp

Moves `("dev" in web.ctx.features)` check to a `devmode` function param so `web.ctx` is no longer needed within our cached function.

While the initial computer of the `get_homepage()` function works fine (because `web.ctx` is in scope) the `web.ctx` `ThreadedDict` may no longer be accessible once passed to a memcache thread for it's subsequent re-compute after timeout hit)
@mekarpeles mekarpeles marked this pull request as draft January 17, 2025 18:47
@mekarpeles mekarpeles added the Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle. label Jan 17, 2025
@cdrini cdrini marked this pull request as ready for review January 17, 2025 19:26
Copy link
Copy Markdown
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, great sleuthing! Mek tested on testing / patch deployed

Co-authored-by: Drini Cami <cdrini@gmail.com>
@mekarpeles mekarpeles merged commit e7fd7aa into master Jan 17, 2025
@mekarpeles mekarpeles deleted the 10318/hotfix/homepage-memcache-stats branch January 17, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stats are missing from the homepage

2 participants