Skip to content

Refix threadeddict #10341#10590

Merged
cdrini merged 4 commits into
masterfrom
threadeddict-part-deux
Mar 18, 2025
Merged

Refix threadeddict #10341#10590
cdrini merged 4 commits into
masterfrom
threadeddict-part-deux

Conversation

@mekarpeles
Copy link
Copy Markdown
Member

@mekarpeles mekarpeles commented Mar 17, 2025

Merge + vbump first: internetarchive/infogami#225

Closes #10341

guard against web.ctx.features, not just web.ctx

Technical

Testing

Screenshot

Stakeholders

@mekarpeles
Copy link
Copy Markdown
Member Author

This isn't a complete solution because in the else statement, the render_template is still hitting infogami and checking debug

@cdrini cdrini added Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle. State: Blocked Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed] labels Mar 18, 2025
@cdrini cdrini removed the State: Blocked Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed] label Mar 18, 2025
@cdrini cdrini assigned cdrini and unassigned jimchamp Mar 18, 2025
@cdrini
Copy link
Copy Markdown
Collaborator

cdrini commented Mar 18, 2025

Figured out a fix! Switching to context.features instead of web.ctx.features ; that did the trick!

Confusingly, it seems like sometimes (??) the loadhook for setting things up isn't called. Not sure why. It does seem like this bit is called:

def setup_context_defaults():
from infogami.utils import context
context.defaults.update({'features': [], 'user': None, 'MAX_VISIBLE_BOOKS': 5})

Which is giving the features a default, but only on context not web.ctx , which is why the fix worked.

Anyways, problem solved 😄 We'll have to get to the root cause of this at another time.

@cdrini cdrini merged commit c2ce676 into master Mar 18, 2025
@cdrini cdrini deleted the threadeddict-part-deux branch March 18, 2025 00:26
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.

Investigate production ThreadedDict AttributeErrors

3 participants