8000 [FIX] fs_storage: test connection by creating a hidden file by kobros-tech · Pull Request #478 · OCA/storage · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[FIX] fs_storage: test connection by creating a hidden file #478

New iss 8000 ue

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

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

Conversation

kobros-tech
Copy link
Contributor

the lis opton in test connection is fine, but the create option was not functionnning correctly.

< 8000 !-- '"` -->

@kobros-tech
Copy link
Contributor Author
kobros-tech commented Jun 2, 2025
fs_storage_fix_2.mp4

@kobros-tech
Copy link
Contributor Author

@kobros-tech kobros-tech force-pushed the 16.0-fix-fs_storage-1 branch 2 times, most recently from 41ebc7c to 42c071e Compare June 2, 2025 15:25
@kobros-tech
Copy link
Contributor Author

@wlin-kencove

@etobella
Copy link
Member
etobella commented Jun 2, 2025

This is only failing on s3. I am not sure if it makes sense (also, you are requiring a test bucket, I don't know if it makes sense).

@kobros-tech
Copy link
Contributor Author

bucket

ok, I am using s3 cloudflare in my test a real prod. s3
my employer uses aws s3

I agree with no it does not make sense, but why do't we approve the commit?

@@ -290,11 +290,14 @@ def _get_marker_file_name(self):
return ".odoo_fs_storage_%s.marker" % self.id

def _marker_file_check_connection(self, fs):
bucket_name = "test"
fs.makedirs(bucket_name, exist_ok=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry but I don't see the point here. This code makes no sens to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what if someone run test connection and get the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the point is you have to specify dir name not just file name

if you don't like creating a test dir, then there must be a value for path directory and be used in test connection.

in any case dir name must be specified.

Copy link
Member

Choose a reason for hiding this comment

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

In this case, it is more useful to add a comment in order to ask the user to check both of them, as there are false negatives some times

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will try something more meaningful

Copy link
Member
@etobella etobella left a comment

Choose a reason for hiding this comment

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

I think it is not necessary

@kobros-tech kobros-tech force-pushed the 16.0-fix-fs_storage-1 branch from 42c071e to 3802f38 Compare June 8, 2025 15:53
@kobros-tech kobros-tech requested review from etobella and lmignon June 8, 2025 15:58
@kobros-tech
Copy link
Contributor Author

@etobella
@lmignon

I think this one is more meaningful than the previous approach?

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.

3 participants
0