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

[MIG] fs_storage: Migration to 18.0 #399

Merged
merged 54 commits into from
Oct 28, 2024
Merged

Conversation

qgroulard
Copy link

@qgroulard qgroulard commented Oct 7, 2024

Including commits from #397

@sbidoul
Copy link
Member

sbidoul commented Oct 7, 2024

/ocabot migration fs_storage

Can you cherry-pick the commits from #397 ?

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Oct 7, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 7, 2024
13 tasks
Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

Code review only, no tests

lmignon and others added 20 commits October 15, 2024 07:12
This addon define a new model 'fs.storage'  used to get access to a filesystem storage (ftp, sftp, s3, azure, ...) through an unified interface provided by the 'fsspec' python library (https://filesystem-spec.readthedocs.io/en/latest)
…dav. It is not possible to specify a tuple in json
Add history for commit included from OCA#285 and the author to the contributors list
Before this change, users with basic access rights was no more able to create an attachment. The problem was caused by the need to access system information to determine in which file system the attachment should be created, when this sensitive information is not accessible to everyone. The change consists of reading this information in sudo to bypass this security restriction in this specific context.
Currently translated at 100.0% (37 of 37 strings)

Translation: storage-16.0/storage-16.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/es/
Currently translated at 100.0% (37 of 37 strings)

Translation: storage-16.0/storage-16.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/es/
Currently translated at 100.0% (37 of 37 strings)

Translation: storage-16.0/storage-16.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/es/
Currently translated at 100.0% (37 of 37 strings)

Translation: storage-16.0/storage-16.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/it/
Before the change, reading the options protocol might not be in sync
with the record protocol.
This is particularly the case if the record is save in the middle of editing
as the value resets, which can be quite confusing.
mymage and others added 20 commits October 15, 2024 07:12
Currently translated at 92.1% (35 of 38 strings)

Translation: storage-17.0/storage-17.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_storage/it/
Currently translated at 92.1% (35 of 38 strings)

Translation: storage-17.0/storage-17.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_storage/it/
Currently translated at 100.0% (38 of 38 strings)

Translation: storage-17.0/storage-17.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_storage/es/
Since fsspec/filesystem_spec@da77548 it is necessary to set in make_path_posix() only 1 argument
Currently translated at 100.0% (38 of 38 strings)

Translation: storage-17.0/storage-17.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_storage/it/
Currently translated at 100.0% (38 of 38 strings)

Translation: storage-17.0/storage-17.0-fs_storage
Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_storage/zh_CN/
Since protocol is under server_environment control, it seems its default value takes priority over a value set in an XML record.

Since it does really make much sense to create a storage backend without specifying
the protocol, we remove the default value.
…should only apply to file name, not full path
This is necessary for non admin users to access file systems, for
instance for attachments.

This went unnoticed so far presumably because the filesystem is cached
and likely accessed by the server during server bootstrap.
@sbidoul
Copy link
Member

sbidoul commented Oct 15, 2024

Rebased to pick-up the dotfiles update. The new xml autoformatter cleaned up one xml file a bit.

@lmignon
Copy link
Contributor

lmignon commented Oct 28, 2024

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-399-by-lmignon-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 264dd15 into OCA:18.0 Oct 28, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 6881734. Thanks a lot for contributing to OCA. ❤️

@sbidoul sbidoul deleted the 18.0-mig-fs_storage branch October 28, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.