Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Enable session_redis to work with Sentry #474

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

dnplkndll
Copy link
Contributor

ref: avoinsystems@a09a813

When the sentry module is loaded, it overrides odoo.http.Application with a middleware object that wraps the original, but does not proxy it. Thus the session_store property that session_redis monkeypatches is no longer there.

This fix intends to avoid that, without having very specific knowledge about the sentry module baked in.

The solution seems to work, but has the risk that if the Application class is fully replaced (i.e. if it is not even wrapped), then this new method may lead to this module simply not working, and the reasons for it may be difficult to debug. But the only way around that would be to explicitly check the wrapper object contains the expected class, and that is basically the same as depending on the sentry module.

When the sentry module is loaded, it overrides odoo.http.Application
with a middleware object that wraps the original, but does not proxy it.
Thus the session_store property that session_redis monkeypatches is no
longer there.

This fix intends to avoid that, without having very specific knowledge
about the sentry module baked in.

The solution seems to work, but has the risk that if the Application
class is fully replaced (i.e. if it is not even wrapped), then this new
method may lead to this module simply not working, and the reasons for
it may be difficult to debug. But the only way around that would be to
explicitly check the wrapper object contains the expected class, and
that is basically the same as depending on the sentry module.
@dnplkndll
Copy link
Contributor Author

@vrenaville who would review this?

for support with OCA/server-tools#3174
and necessary for volume free deployment

@dnplkndll
Copy link
Contributor Author

this does not seem to actually work. so WIP. it works for some time then started to write to the file store session.

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