[IMP] fs_attachment: use sudo() for accessing storage code in ir_attachment#559
[IMP] fs_attachment: use sudo() for accessing storage code in ir_attachment#559OCA-git-bot merged 1 commit intoOCA:18.0from
Conversation
|
Hi @lmignon, |
| ): | ||
| if self.attachment._is_file_from_a_storage(self.attachment.store_fname): | ||
| fs, _storage, fname = self.attachment._get_fs_parts() | ||
| fs, _storage, fname = self.attachment.sudo()._get_fs_parts() |
There was a problem hiding this comment.
according to the stack trace the only the sudo() required to fix the problem is the one added into the is_fs_cacheable method of the `fs.storage' model. This change should be revert.
There was a problem hiding this comment.
Based on the provided stack traces I agree. I'll give it a try and wait for the feedback of the testers.
| new_filepath, | ||
| ) = self.attachment._fs_parse_store_fname(new_store_fname) | ||
| _fs, _storage, old_filepath = self.attachment._get_fs_parts() | ||
| _fs, _storage, old_filepath = self.attachment.sudo()._get_fs_parts() |
|
@lmignon could you update your code review? The failing tests belong to fs_image. |
|
@CRogos I've to fix the tests into fs_image before being able to merge your fix. |
|
/ocabot merge patch |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 8a035d5. Thanks a lot for contributing to OCA. ❤️ |
Solves: #536
I don't know the exact reason why/when this happens, but from time to time users got access errors on attachments located in an Azure blob storage. We've added a stack trace (see below) for deeper analysis.
Since we've added these changes, these errors did not occur again.