-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
[17.0][IMP] fs_storage: invalidate orm cache when connection fails #384
base: 17.0
Are you sure you want to change the base?
Conversation
Thank you @Algosse for all your hard work. I don't work with Odoo version 17. It is therefore difficult for me to give an in-depth review of the proposed changes. I will try to take the time to install a version 17 and understand the problem you are experiencing. |
…r non admin users
@Algosse Is your fix still required with the last changes on 16.0? |
Hello Guys, Thanks for the forward of V16! Sorry for the delay, I did not find the time to properly check and run the changes. I'm not sure the forward will solve my issue. In my previous tests, I figured the problem was the ormcache of the get_fs_by_code method If the connection fails, the method keeps returning the same faulty fs. It does not access the fs property so it does not triger the check_connection method. I don't have the time to look at it now, I will be able in a few weeks. If someone wants to try, the "best" way I found to crash the connection was to use a fs_storage with SFTP protocol, linked it to a model (for example sale.order) and drag & drop multiple files at once in the chatter (I think Odoo tries to upload files in parallel and fsspec does not like it, at least for SFTP). |
Fixes #374
I adapted a some parts of the code related to _check_connection from V16.0 (started in #320) and implemented it in V17.0.
Also, I added a check_connection everytime the fs is accessed to detected if it should be generated again or not.